UNPKG

@zohodesk/client_build_tool

Version:

A CLI tool to build web applications and client libraries

19 lines (17 loc) 679 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.REGEXP_CONTENTHASH = void 0; exports.hasContentHash = hasContentHash; // export const REGEXP_CHUNKHASH = /\[chunkhash(?::(\d+))?\]/gi; // export const REGEXP_HASH = /\[hash(?::(\d+))?\]/gi; // export const REGEXP_NAME = /\[name\]/gi; // export const REGEXP_PLACEHOLDERS = /\[(name|id|chunkhash)\]/gi; // TODO: want to choose file type for i18n load const REGEXP_CONTENTHASH = /\[contenthash(?::(\d+))?\]/gi; exports.REGEXP_CONTENTHASH = REGEXP_CONTENTHASH; function hasContentHash(filenameTemplate) { REGEXP_CONTENTHASH.lastIndex = 0; return REGEXP_CONTENTHASH.test(filenameTemplate); }