@madebyseed/seed-cli-tools 2.1.1 → 2.2.1
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/lib/tasks/build-js.js
CHANGED
|
@@ -16,10 +16,6 @@ var chokidar = require('chokidar');
|
|
|
16
16
|
|
|
17
17
|
var minify = composer(uglifyjs, console);
|
|
18
18
|
|
|
19
|
-
var gulpWebpack = require('webpack-stream');
|
|
20
|
-
|
|
21
|
-
var webpack = require('webpack');
|
|
22
|
-
|
|
23
19
|
var utils = require("./includes/utilities");
|
|
24
20
|
|
|
25
21
|
var config = require('./includes/config.js');
|
|
@@ -30,7 +26,9 @@ function processThemeJs() {
|
|
|
30
26
|
messages.logProcessFiles('build:js');
|
|
31
27
|
return gulp.src([config.roots.js, "!".concat(config.roots.vendorJs)], {
|
|
32
28
|
allowEmpty: true
|
|
33
|
-
}).pipe(plumber(utils.errorHandler)).pipe(
|
|
29
|
+
}).pipe(plumber(utils.errorHandler)).pipe(include({
|
|
30
|
+
separateInputs: true
|
|
31
|
+
})).pipe(gulpif(config.optimize && !config.usesModuleBundler, minify())).pipe(gulp.dest(config.dist.assets));
|
|
34
32
|
}
|
|
35
33
|
|
|
36
34
|
function processVendorJs() {
|
package/lib/tasks/build-utils.js
CHANGED
|
@@ -17,7 +17,7 @@ var utils = require("./includes/utilities.js");
|
|
|
17
17
|
var messages = require("./includes/messages.js");
|
|
18
18
|
|
|
19
19
|
var assetsPaths = [config.src.assets, config.src.templates, config.src.sections, config.src.snippets, config.src.blocks, config.src.locales, config.src.config, config.src.layout];
|
|
20
|
-
var themeSettingsAssets = [config.tmp.templates, config.tmp.config];
|
|
20
|
+
var themeSettingsAssets = [config.tmp.templates, config.tmp.config, config.tmp.sectionsJson, config.tmp.blocksJson, config.tmp.locales];
|
|
21
21
|
/**
|
|
22
22
|
* Copies files from one fold to another, creating a new dir if doesn't exists and
|
|
23
23
|
* overwriting if it does exist
|
|
@@ -95,7 +95,9 @@ var config = {
|
|
|
95
95
|
templates: "tmp/templates/**/*",
|
|
96
96
|
snippets: "tmp/snippets/*",
|
|
97
97
|
sections: "tmp/sections/*",
|
|
98
|
+
sectionsJson: "tmp/sections/*.json",
|
|
98
99
|
blocks: "tmp/blocks/*",
|
|
100
|
+
blocksJson: "tmp/blocks/*.json",
|
|
99
101
|
locales: "tmp/locales/*",
|
|
100
102
|
config: "tmp/config/*",
|
|
101
103
|
layout: "tmp/layout/*",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@madebyseed/seed-cli-tools",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.2.1",
|
|
4
4
|
"description": "Seed CLI Tools",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"scripts": {
|
|
@@ -8,6 +8,7 @@
|
|
|
8
8
|
"start": "npm run clean && babel -w -d lib/ src/",
|
|
9
9
|
"test": "npm run lint",
|
|
10
10
|
"prepublish": "npm test && npm run clean && babel -d lib/ src/",
|
|
11
|
+
"dev": "npm run prepublish && npm link",
|
|
11
12
|
"lint": "eslint --max-warnings 0 src/",
|
|
12
13
|
"lint-allow-warning": "eslint src/"
|
|
13
14
|
},
|
|
@@ -56,5 +57,5 @@
|
|
|
56
57
|
"webpack-stream": "^7.0.0",
|
|
57
58
|
"yargs": "^17.0.1"
|
|
58
59
|
},
|
|
59
|
-
"gitHead": "
|
|
60
|
+
"gitHead": "bf1fc8efec7921816461f48b7c8f5fae70bb6a64"
|
|
60
61
|
}
|
package/src/tasks/build-js.js
CHANGED
|
@@ -6,8 +6,7 @@ const include = require('gulp-include');
|
|
|
6
6
|
const plumber = require('gulp-plumber');
|
|
7
7
|
const chokidar = require('chokidar');
|
|
8
8
|
const minify = composer(uglifyjs, console)
|
|
9
|
-
|
|
10
|
-
const webpack = require('webpack');
|
|
9
|
+
|
|
11
10
|
|
|
12
11
|
const utils = require("./includes/utilities");
|
|
13
12
|
const config = require('./includes/config.js');
|
|
@@ -15,9 +14,10 @@ const messages = require('./includes/messages.js');
|
|
|
15
14
|
|
|
16
15
|
function processThemeJs() {
|
|
17
16
|
messages.logProcessFiles('build:js');
|
|
17
|
+
|
|
18
18
|
return gulp.src([config.roots.js, `!${config.roots.vendorJs}`], { allowEmpty: true })
|
|
19
19
|
.pipe(plumber(utils.errorHandler))
|
|
20
|
-
.pipe(
|
|
20
|
+
.pipe(include({ separateInputs: true }))
|
|
21
21
|
.pipe(gulpif(config.optimize && !config.usesModuleBundler, minify()))
|
|
22
22
|
.pipe(gulp.dest(config.dist.assets))
|
|
23
23
|
}
|
package/src/tasks/build-utils.js
CHANGED
|
@@ -19,7 +19,13 @@ const assetsPaths = [
|
|
|
19
19
|
config.src.layout,
|
|
20
20
|
];
|
|
21
21
|
|
|
22
|
-
const themeSettingsAssets = [
|
|
22
|
+
const themeSettingsAssets = [
|
|
23
|
+
config.tmp.templates,
|
|
24
|
+
config.tmp.config,
|
|
25
|
+
config.tmp.sectionsJson,
|
|
26
|
+
config.tmp.blocksJson,
|
|
27
|
+
config.tmp.locales
|
|
28
|
+
];
|
|
23
29
|
|
|
24
30
|
/**
|
|
25
31
|
* Copies files from one fold to another, creating a new dir if doesn't exists and
|
|
@@ -90,7 +90,9 @@ const config = {
|
|
|
90
90
|
templates: "tmp/templates/**/*",
|
|
91
91
|
snippets: "tmp/snippets/*",
|
|
92
92
|
sections: "tmp/sections/*",
|
|
93
|
+
sectionsJson: "tmp/sections/*.json",
|
|
93
94
|
blocks: "tmp/blocks/*",
|
|
95
|
+
blocksJson: "tmp/blocks/*.json",
|
|
94
96
|
locales: "tmp/locales/*",
|
|
95
97
|
config: "tmp/config/*",
|
|
96
98
|
layout: "tmp/layout/*",
|