@bigcommerce/stencil-cli 3.9.2 → 3.10.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/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,10 @@
|
|
|
1
|
+
### Draft
|
|
2
|
+
|
|
3
|
+
### 3.10.0 (2022-02-08)
|
|
4
|
+
|
|
5
|
+
- fix(storefront): bctheme-1000 handle regular css in stencil ([845](https://github.com/bigcommerce/stencil-cli/pull/845))
|
|
6
|
+
- chore: bump paper to 3.0.0 ([868](https://github.com/bigcommerce/stencil-cli/pull/868))
|
|
7
|
+
|
|
1
8
|
### 3.9.2 (2022-01-31)
|
|
2
9
|
|
|
3
10
|
- chore: bump paper to latest ([863](https://github.com/bigcommerce/stencil-cli/pull/863))
|
package/lib/stencil-bundle.js
CHANGED
|
@@ -110,7 +110,12 @@ class Bundle {
|
|
|
110
110
|
bundle: true,
|
|
111
111
|
};
|
|
112
112
|
return (callback) => {
|
|
113
|
-
|
|
113
|
+
let basePath;
|
|
114
|
+
if (compiler === 'css') {
|
|
115
|
+
basePath = path.join(this.themePath, 'assets/dist', compiler);
|
|
116
|
+
} else {
|
|
117
|
+
basePath = path.join(this.themePath, 'assets', compiler);
|
|
118
|
+
}
|
|
114
119
|
|
|
115
120
|
console.log('%s Parsing Started...', compiler.toUpperCase());
|
|
116
121
|
fs.readdir(basePath, (err, files) => {
|
|
@@ -395,7 +400,12 @@ class Bundle {
|
|
|
395
400
|
case 'css':
|
|
396
401
|
// Create the parsed tree files
|
|
397
402
|
for (const [filename, data] of Object.entries(result)) {
|
|
398
|
-
|
|
403
|
+
const ext =
|
|
404
|
+
this.configuration.css_compiler === 'css'
|
|
405
|
+
? this.configuration.css_compiler
|
|
406
|
+
: 'scss';
|
|
407
|
+
|
|
408
|
+
archiveJsonFile(data, `parsed/${ext}/${filename}.json`);
|
|
399
409
|
}
|
|
400
410
|
break;
|
|
401
411
|
|
package/package-lock.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@bigcommerce/stencil-cli",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.10.0",
|
|
4
4
|
"lockfileVersion": 1,
|
|
5
5
|
"requires": true,
|
|
6
6
|
"dependencies": {
|
|
@@ -537,9 +537,9 @@
|
|
|
537
537
|
}
|
|
538
538
|
},
|
|
539
539
|
"@bigcommerce/stencil-paper": {
|
|
540
|
-
"version": "3.0.0
|
|
541
|
-
"resolved": "https://registry.npmjs.org/@bigcommerce/stencil-paper/-/stencil-paper-3.0.0
|
|
542
|
-
"integrity": "sha512
|
|
540
|
+
"version": "3.0.0",
|
|
541
|
+
"resolved": "https://registry.npmjs.org/@bigcommerce/stencil-paper/-/stencil-paper-3.0.0.tgz",
|
|
542
|
+
"integrity": "sha512-+8Zyln2L7yvoFabDzgXgSE+7it01Q5UZml+pq70qrx9GtsX+leIhdY01RoziDnES1I12qIx+bPUX+vM7oD1NZg==",
|
|
543
543
|
"requires": {
|
|
544
544
|
"@bigcommerce/stencil-paper-handlebars": "4.5.1",
|
|
545
545
|
"accept-language-parser": "~1.4.1",
|
|
@@ -15436,9 +15436,9 @@
|
|
|
15436
15436
|
"integrity": "sha512-6Gurc1n//gjp9eQNXjD9O3M/sMwVtN5S8Lv9bvOYBfKfDNiIIhqiyi01vMBO45u4zkDE420w/e0se7Vs+sIg+g=="
|
|
15437
15437
|
},
|
|
15438
15438
|
"uglify-js": {
|
|
15439
|
-
"version": "3.15.
|
|
15440
|
-
"resolved": "https://registry.npmjs.org/uglify-js/-/uglify-js-3.15.
|
|
15441
|
-
"integrity": "sha512-
|
|
15439
|
+
"version": "3.15.1",
|
|
15440
|
+
"resolved": "https://registry.npmjs.org/uglify-js/-/uglify-js-3.15.1.tgz",
|
|
15441
|
+
"integrity": "sha512-FAGKF12fWdkpvNJZENacOH0e/83eG6JyVQyanIJaBXCN1J11TUQv1T1/z8S+Z0CG0ZPk1nPcreF/c7lrTd0TEQ==",
|
|
15442
15442
|
"optional": true
|
|
15443
15443
|
},
|
|
15444
15444
|
"uglify-to-browserify": {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@bigcommerce/stencil-cli",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.10.0",
|
|
4
4
|
"description": "CLI tool to run BigCommerce Stores locally for theme development.",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"engines": {
|
|
@@ -45,7 +45,7 @@
|
|
|
45
45
|
"package-lock.json"
|
|
46
46
|
],
|
|
47
47
|
"dependencies": {
|
|
48
|
-
"@bigcommerce/stencil-paper": "3.0.0
|
|
48
|
+
"@bigcommerce/stencil-paper": "3.0.0",
|
|
49
49
|
"@bigcommerce/stencil-styles": "2.1.1",
|
|
50
50
|
"@hapi/boom": "^8.0.1",
|
|
51
51
|
"@hapi/glue": "^6.2.0",
|
|
@@ -60,21 +60,21 @@ internals.cssHandler = async (request, h) => {
|
|
|
60
60
|
request.app.themeConfig.setVariation(variationIndex);
|
|
61
61
|
|
|
62
62
|
// Get the theme configuration
|
|
63
|
+
const configuration = await request.app.themeConfig.getConfig();
|
|
63
64
|
const fileName = internals.getOriginalFileName(request.params.fileName);
|
|
64
65
|
const fileParts = path.parse(fileName);
|
|
65
|
-
const
|
|
66
|
-
const
|
|
66
|
+
const ext = configuration.css_compiler === 'css' ? configuration.css_compiler : 'scss';
|
|
67
|
+
const pathToFile = path.join(fileParts.dir, `${fileParts.name}.${ext}`);
|
|
68
|
+
const basePath = path.join(internals.getThemeAssetsPath(), `${ext}`);
|
|
67
69
|
|
|
68
70
|
let files;
|
|
69
71
|
try {
|
|
70
|
-
files = await promisify(cssAssembler.assemble)(pathToFile, basePath,
|
|
72
|
+
files = await promisify(cssAssembler.assemble)(pathToFile, basePath, `${ext}`, {});
|
|
71
73
|
} catch (err) {
|
|
72
74
|
console.error(err);
|
|
73
75
|
throw Boom.badData(err);
|
|
74
76
|
}
|
|
75
77
|
|
|
76
|
-
const configuration = await request.app.themeConfig.getConfig();
|
|
77
|
-
|
|
78
78
|
const params = {
|
|
79
79
|
data: files[pathToFile],
|
|
80
80
|
files,
|