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

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.
@@ -277,7 +277,9 @@ var _default = {
277
277
  i18nTemplate: ''
278
278
  },
279
279
  manifestJson: {
280
- enable: false
280
+ enable: false,
281
+ i18nManifestJson: false,
282
+ licenseManifest: false
281
283
  },
282
284
  changeRuntimeChunkChar: '~',
283
285
  serviceWorker: {
@@ -22,7 +22,7 @@ function createManifestJson({
22
22
  if (option.needInitialEntries) {
23
23
  const initialFileNames = (0, _findInitialFileNames.findInitialFileNames)(compilation);
24
24
  const initialEntries = (0, _createInitialEntries.createInitialEntriesForManifestJson)(initialFileNames, hashDigestLength);
25
- manifestJson.initialEntries = initialEntries;
25
+ manifestJson.entryFiles = initialEntries;
26
26
  }
27
27
 
28
28
  const outputJson = (0, _addFilesNamesToManifestJson.addFilesNamesToManifestJson)({
@@ -9,24 +9,36 @@ var _ManifestJsonPlugin = require("../custom_plugins/ManifestJsonPlugin");
9
9
 
10
10
  function configManifestJsonPlugin(options) {
11
11
  const {
12
- manifestJson
13
- } = options;
12
+ enable,
13
+ i18nManifestJson,
14
+ licenseManifest
15
+ } = options.manifestJson;
14
16
 
15
- if (!manifestJson.enable) {
17
+ if (!enable) {
16
18
  return null;
17
19
  }
18
20
 
19
- return new _ManifestJsonPlugin.AddFileToManifestJson([{
21
+ const params = [{
20
22
  outputJsonFileName: 'manifest.json',
21
23
  test: f => !/\.i18n\.js$|\.LICENSE\.txt$|\.map$/.test(f),
22
24
  needInitialEntries: true
23
- }, {
24
- outputJsonFileName: 'i18nManifest.json',
25
- test: f => /\.i18n\.js$/g.test(f),
26
- needInitialEntries: false
27
- }, {
28
- outputJsonFileName: 'licenseManifest.json',
29
- test: f => /\.LICENSE\.txt$/g.test(f),
30
- needInitialEntries: false
31
- }]);
25
+ }];
26
+
27
+ if (i18nManifestJson) {
28
+ params.push({
29
+ outputJsonFileName: 'i18nManifest.json',
30
+ test: f => /\.i18n\.js$/g.test(f),
31
+ needInitialEntries: false
32
+ });
33
+ }
34
+
35
+ if (licenseManifest) {
36
+ params.push({
37
+ outputJsonFileName: 'licenseManifest.json',
38
+ test: f => /\.LICENSE\.txt$/g.test(f),
39
+ needInitialEntries: false
40
+ });
41
+ }
42
+
43
+ return new _ManifestJsonPlugin.AddFileToManifestJson(params);
32
44
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zohodesk/client_build_tool",
3
- "version": "0.0.6-exp.31",
3
+ "version": "0.0.6-exp.32",
4
4
  "description": "A CLI tool to build web applications and client libraries",
5
5
  "main": "lib/index.js",
6
6
  "bin": {