@zohodesk/client_build_tool 0.0.6-exp.32 → 0.0.6-exp.34

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -14,14 +14,14 @@ var _modeUtils = require("./modeUtils");
14
14
  // NOTE: array[0] is dev mode file templates and array[1] is prod mode file templates
15
15
  const defaultTemplates = {
16
16
  html: ['index.html', 'index.[contenthash].html'],
17
- js: ['js/[name].js', 'js/[name].[contenthash].js'],
18
- chunkjs: ['js-chunk/[name].js', 'js-chunks/[name].[contenthash].js'],
19
- i18njs: ['i18n-chunk/[locale]/[name].i18n.js', 'i18n-chunk/[locale]/[name].[chunkhash].i18n.js'],
17
+ js: ['js/[name].js', 'js/[name].[contenthash]_.js'],
18
+ chunkjs: ['js-chunk/[name].js', 'js-chunks/[name].[contenthash]_.js'],
19
+ i18njs: ['i18n-chunk/[locale]/[name].i18n.js', 'i18n-chunk/[locale]/[name].[chunkhash]_.i18n.js'],
20
20
  i18nchunkjs: ['i18n-chunk/[locale]/[name].i18n.js', // 'i18n-chunk/[locale]/[name].[chunkhash].i18n.js'
21
- 'i18n-chunk/[locale]/[name].[contenthash].i18n.js'],
21
+ 'i18n-chunk/[locale]/[name].[contenthash]_.i18n.js'],
22
22
  i18nmanifest: ['i18n-manifest.json', 'i18n-manifest.json'],
23
23
  workerjs: ['js/[name].js', 'js/[name].[contenthash].js'],
24
- css: ['css/[name].css', 'css/[name].[contenthash].css'],
24
+ css: ['css/[name].css', 'css/[name].[contenthash]_.css'],
25
25
 
26
26
  /**
27
27
  * NOTE: when you change (cssdir) this line it will have affect on Below files will be affected
@@ -29,7 +29,7 @@ const defaultTemplates = {
29
29
  * pluginConfigs/configMiniCSSExtractPlugin.js
30
30
  * pluginConfigs/configRtlCssPlugin.js
31
31
  * */
32
- cssdir: ['css/[name].[dir].css', 'css/[name].[contenthash].[dir].css'],
32
+ cssdir: ['css/[name].[dir].css', 'css/[name].[contenthash]_.[dir].css'],
33
33
  image: ['images/[name][ext]', 'images/[name].[contenthash][ext]'],
34
34
  font: ['fonts/[name][ext]', 'fonts/[name].[contenthash][ext]'],
35
35
  svg: ['fonts/[name][ext]', 'fonts/[name].[contenthash][ext]'],
@@ -5,8 +5,12 @@ Object.defineProperty(exports, "__esModule", {
5
5
  });
6
6
  exports.addFilesNamesToManifestJson = addFilesNamesToManifestJson;
7
7
 
8
+ var _path = _interopRequireDefault(require("path"));
9
+
8
10
  var _removeHashFromFileName = require("./removeHashFromFileName");
9
11
 
12
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
13
+
10
14
  function addFilesNamesToManifestJson({
11
15
  manifestJson,
12
16
  option,
@@ -15,9 +19,11 @@ function addFilesNamesToManifestJson({
15
19
  }) {
16
20
  const json = manifestJson;
17
21
  Object.keys(assets).forEach(filename => {
22
+ const fileName = _path.default.parse(filename).base;
23
+
18
24
  if (option.test(filename)) {
19
- const filenameNameWithoutHash = (0, _removeHashFromFileName.removeHashFromFileName)(filename, hashDigestLength);
20
- json[filenameNameWithoutHash] = filename;
25
+ const filenameNameWithoutHash = (0, _removeHashFromFileName.removeHashFromFileName)(fileName, hashDigestLength);
26
+ json[filenameNameWithoutHash] = fileName;
21
27
  }
22
28
  });
23
29
  return json;
@@ -5,11 +5,17 @@ Object.defineProperty(exports, "__esModule", {
5
5
  });
6
6
  exports.createInitialEntriesForManifestJson = createInitialEntriesForManifestJson;
7
7
 
8
+ var _path = _interopRequireDefault(require("path"));
9
+
8
10
  var _removeHashFromFileName = require("./removeHashFromFileName");
9
11
 
12
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
13
+
10
14
  function createInitialEntriesForManifestJson(initialFileNames, hashLength) {
11
15
  const initialEntries = {};
12
- initialFileNames.forEach(fileName => {
16
+ initialFileNames.forEach(filename => {
17
+ const fileName = _path.default.parse(filename).base;
18
+
13
19
  const filenameNameWithoutHash = (0, _removeHashFromFileName.removeHashFromFileName)(fileName, hashLength);
14
20
  initialEntries[filenameNameWithoutHash] = fileName;
15
21
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zohodesk/client_build_tool",
3
- "version": "0.0.6-exp.32",
3
+ "version": "0.0.6-exp.34",
4
4
  "description": "A CLI tool to build web applications and client libraries",
5
5
  "main": "lib/index.js",
6
6
  "bin": {