@bigcommerce/stencil-cli 8.4.1 → 8.5.0
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.
- package/bin/stencil-bundle.js +1 -0
- package/bin/stencil-push.js +2 -0
- package/lib/stencil-bundle.js +4 -1
- package/package.json +1 -1
package/bin/stencil-bundle.js
CHANGED
|
@@ -13,6 +13,7 @@ program
|
|
|
13
13
|
'-d, --dest [dest]',
|
|
14
14
|
'Where to save the zip file. It defaults to the current directory you are in when bundling',
|
|
15
15
|
)
|
|
16
|
+
.option('-S, --source-maps', 'Include source-maps in the bundle. This is useful for debugging')
|
|
16
17
|
.option(
|
|
17
18
|
'-n, --name [filename]',
|
|
18
19
|
'What do you want to call the zip file. It defaults to stencil-bundle.zip',
|
package/bin/stencil-push.js
CHANGED
|
@@ -9,6 +9,7 @@ program
|
|
|
9
9
|
.version(PACKAGE_INFO.version)
|
|
10
10
|
.option('-f, --file [filename]', 'specify the filename of the bundle to upload')
|
|
11
11
|
.option('-s, --save [filename]', 'specify the filename to save the bundle as')
|
|
12
|
+
.option('-S, --source-maps', 'Include source-maps in the bundle. This is useful for debugging')
|
|
12
13
|
.option('-a, --activate [variationname]', 'specify the variation of the theme to activate')
|
|
13
14
|
.option('-d, --delete', 'delete oldest private theme if upload limit reached')
|
|
14
15
|
.option(
|
|
@@ -25,6 +26,7 @@ const options = {
|
|
|
25
26
|
saveBundleName: cliOptions.save,
|
|
26
27
|
deleteOldest: cliOptions.delete,
|
|
27
28
|
allChannels: cliOptions.all_channels,
|
|
29
|
+
sourceMaps: cliOptions.source_maps,
|
|
28
30
|
};
|
|
29
31
|
stencilPush(options, (err, result) => {
|
|
30
32
|
if (err) {
|
package/lib/stencil-bundle.js
CHANGED
|
@@ -18,7 +18,7 @@ const MAX_SIZE_BUNDLE = MEGABYTE * 50;
|
|
|
18
18
|
const PATHS_TO_ZIP = [
|
|
19
19
|
{
|
|
20
20
|
pattern: 'assets/**/*',
|
|
21
|
-
ignore: ['assets/cdn/**'
|
|
21
|
+
ignore: ['assets/cdn/**'],
|
|
22
22
|
},
|
|
23
23
|
{ pattern: 'CHANGELOG.md' },
|
|
24
24
|
{ pattern: 'config.json' },
|
|
@@ -387,6 +387,9 @@ class Bundle {
|
|
|
387
387
|
*/
|
|
388
388
|
_bundleThemeFiles(archive, themePath) {
|
|
389
389
|
for (const { pattern, ignore } of PATHS_TO_ZIP) {
|
|
390
|
+
if (pattern === 'assets/**/*' && !this.options.sourceMaps) {
|
|
391
|
+
ignore.push('assets/**/*.js.map');
|
|
392
|
+
}
|
|
390
393
|
archive.glob(pattern, { ignore, cwd: themePath });
|
|
391
394
|
}
|
|
392
395
|
}
|