@madebyseed/seed-cli-tools 1.3.3 → 1.4.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/gulpfile.js +3 -3
- package/lib/tasks/build-css.js +18 -13
- package/lib/tasks/shopify-cli.js +3 -3
- package/package.json +2 -2
- package/src/gulpfile.js +3 -3
- package/src/tasks/build-css.js +33 -18
- package/src/tasks/shopify-cli.js +3 -3
package/lib/gulpfile.js
CHANGED
|
@@ -47,7 +47,7 @@ gulp.task("watch", gulp.series("build", gulp.parallel("watch:src", "watch:dist",
|
|
|
47
47
|
/**
|
|
48
48
|
*
|
|
49
49
|
* @summary pulls theme from specified environment theme into src
|
|
50
|
-
* @function
|
|
50
|
+
* @function pull
|
|
51
51
|
* @memberof slate-cli.tasks.deploy
|
|
52
52
|
* @static
|
|
53
53
|
*/
|
|
@@ -58,7 +58,7 @@ gulp.task("pull", gulp.series("shopify:pull:origin:src"));
|
|
|
58
58
|
* theme using shopify theme push, by default with the --no-delete flag
|
|
59
59
|
*
|
|
60
60
|
* @summary pulls theme settings from specified environment theme into src
|
|
61
|
-
* @function
|
|
61
|
+
* @function pull:settings
|
|
62
62
|
* @memberof slate-cli.tasks.deploy
|
|
63
63
|
* @static
|
|
64
64
|
*/
|
|
@@ -83,7 +83,7 @@ gulp.task("deploy", gulp.series("sync-settings", "build", "shopify:push:dist"));
|
|
|
83
83
|
*
|
|
84
84
|
* @summary Deploy your built files to the Shopify Store set in
|
|
85
85
|
* `slate-cli.config`
|
|
86
|
-
* @function deploy
|
|
86
|
+
* @function deploy:no-sync
|
|
87
87
|
* @memberof slate-cli.tasks.deploy:no-sync
|
|
88
88
|
* @static
|
|
89
89
|
*/
|
package/lib/tasks/build-css.js
CHANGED
|
@@ -1,18 +1,24 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var path = require("path");
|
|
4
4
|
|
|
5
|
-
var
|
|
5
|
+
var gulp = require("gulp");
|
|
6
6
|
|
|
7
|
-
var
|
|
7
|
+
var sass = require("gulp-sass")(require("sass"));
|
|
8
8
|
|
|
9
|
-
var
|
|
9
|
+
var postcss = require("gulp-postcss");
|
|
10
10
|
|
|
11
|
-
var
|
|
11
|
+
var plumber = require("gulp-plumber");
|
|
12
12
|
|
|
13
|
-
var
|
|
13
|
+
var chokidar = require("chokidar");
|
|
14
14
|
|
|
15
|
-
var
|
|
15
|
+
var config = require("./includes/config.js");
|
|
16
|
+
|
|
17
|
+
var messages = require("./includes/messages.js");
|
|
18
|
+
|
|
19
|
+
var tailwindConfig = require(path.join(config.themeRoot, config.tailwindConfig));
|
|
20
|
+
|
|
21
|
+
var assets = tailwindConfig.mode === "jit" ? [config.src.css, config.src.sections, config.src.layout, config.src.snippets, config.src.assets, config.src.js, config.tailwindConfig] : [config.src.css, config.tailwindConfig];
|
|
16
22
|
/**
|
|
17
23
|
* Concatenate css via gulp-cssimport and copys to the `/dist` folder
|
|
18
24
|
*
|
|
@@ -21,9 +27,8 @@ var messages = require('./includes/messages.js');
|
|
|
21
27
|
* @private
|
|
22
28
|
*/
|
|
23
29
|
|
|
24
|
-
|
|
25
30
|
function processCss() {
|
|
26
|
-
return gulp.src(config.roots.css).pipe(plumber()).pipe(postcss(config.plugins.postcss)).pipe(sass().on(
|
|
31
|
+
return gulp.src(config.roots.css).pipe(plumber()).pipe(postcss(config.plugins.postcss)).pipe(sass().on("error", sass.logError)).pipe(gulp.dest(config.dist.assets));
|
|
27
32
|
}
|
|
28
33
|
/**
|
|
29
34
|
* Concatenate css via gulp-cssimport
|
|
@@ -34,7 +39,7 @@ function processCss() {
|
|
|
34
39
|
*/
|
|
35
40
|
|
|
36
41
|
|
|
37
|
-
gulp.task(
|
|
42
|
+
gulp.task("build:css", function () {
|
|
38
43
|
return processCss();
|
|
39
44
|
});
|
|
40
45
|
/**
|
|
@@ -45,10 +50,10 @@ gulp.task('build:css', function () {
|
|
|
45
50
|
* @static
|
|
46
51
|
*/
|
|
47
52
|
|
|
48
|
-
gulp.task(
|
|
49
|
-
chokidar.watch(
|
|
53
|
+
gulp.task("watch:css", function () {
|
|
54
|
+
chokidar.watch(assets, {
|
|
50
55
|
ignoreInitial: true
|
|
51
|
-
}).on(
|
|
56
|
+
}).on("all", function (event, path) {
|
|
52
57
|
messages.logFileEvent(event, path);
|
|
53
58
|
processCss();
|
|
54
59
|
});
|
package/lib/tasks/shopify-cli.js
CHANGED
|
@@ -71,9 +71,9 @@ gulp.task("shopify:pull:dev:tmp", function (done) {
|
|
|
71
71
|
return shopifyCLI.pull(devThemeId, config.tmp.root);
|
|
72
72
|
});
|
|
73
73
|
/**
|
|
74
|
-
* Pulls theme files from the seed config theme enviroment into
|
|
74
|
+
* Pulls theme files from the seed config theme enviroment into tmp
|
|
75
75
|
*
|
|
76
|
-
* @function shopify:pull:
|
|
76
|
+
* @function shopify:pull:origin:tmp
|
|
77
77
|
* @memberof seed-cli.tasks.deploy
|
|
78
78
|
* @static
|
|
79
79
|
*/
|
|
@@ -85,7 +85,7 @@ gulp.task("shopify:pull:origin:tmp", function () {
|
|
|
85
85
|
/**
|
|
86
86
|
* Pulls theme files from the seed config theme enviroment into src
|
|
87
87
|
*
|
|
88
|
-
* @function shopify:pull:
|
|
88
|
+
* @function shopify:pull:origin:src
|
|
89
89
|
* @memberof seed-cli.tasks.deploy
|
|
90
90
|
* @static
|
|
91
91
|
*/
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@madebyseed/seed-cli-tools",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.4.1",
|
|
4
4
|
"description": "Seed CLI Tools",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"scripts": {
|
|
@@ -52,5 +52,5 @@
|
|
|
52
52
|
"vinyl-paths": "^3.0.1",
|
|
53
53
|
"yargs": "^17.0.1"
|
|
54
54
|
},
|
|
55
|
-
"gitHead": "
|
|
55
|
+
"gitHead": "5ffec2a6cdf2a839f84799d0d6784cf882b6ddb1"
|
|
56
56
|
}
|
package/src/gulpfile.js
CHANGED
|
@@ -67,7 +67,7 @@ gulp.task(
|
|
|
67
67
|
/**
|
|
68
68
|
*
|
|
69
69
|
* @summary pulls theme from specified environment theme into src
|
|
70
|
-
* @function
|
|
70
|
+
* @function pull
|
|
71
71
|
* @memberof slate-cli.tasks.deploy
|
|
72
72
|
* @static
|
|
73
73
|
*/
|
|
@@ -78,7 +78,7 @@ gulp.task(
|
|
|
78
78
|
* theme using shopify theme push, by default with the --no-delete flag
|
|
79
79
|
*
|
|
80
80
|
* @summary pulls theme settings from specified environment theme into src
|
|
81
|
-
* @function
|
|
81
|
+
* @function pull:settings
|
|
82
82
|
* @memberof slate-cli.tasks.deploy
|
|
83
83
|
* @static
|
|
84
84
|
*/
|
|
@@ -104,7 +104,7 @@ gulp.task("deploy", gulp.series("sync-settings", "build", "shopify:push:dist"));
|
|
|
104
104
|
*
|
|
105
105
|
* @summary Deploy your built files to the Shopify Store set in
|
|
106
106
|
* `slate-cli.config`
|
|
107
|
-
* @function deploy
|
|
107
|
+
* @function deploy:no-sync
|
|
108
108
|
* @memberof slate-cli.tasks.deploy:no-sync
|
|
109
109
|
* @static
|
|
110
110
|
*/
|
package/src/tasks/build-css.js
CHANGED
|
@@ -1,12 +1,29 @@
|
|
|
1
|
-
const
|
|
2
|
-
const
|
|
3
|
-
const
|
|
4
|
-
const
|
|
5
|
-
const
|
|
1
|
+
const path = require("path");
|
|
2
|
+
const gulp = require("gulp");
|
|
3
|
+
const sass = require("gulp-sass")(require("sass"));
|
|
4
|
+
const postcss = require("gulp-postcss");
|
|
5
|
+
const plumber = require("gulp-plumber");
|
|
6
|
+
const chokidar = require("chokidar");
|
|
6
7
|
|
|
7
|
-
const config = require(
|
|
8
|
-
const messages = require(
|
|
8
|
+
const config = require("./includes/config.js");
|
|
9
|
+
const messages = require("./includes/messages.js");
|
|
10
|
+
const tailwindConfig = require(path.join(
|
|
11
|
+
config.themeRoot,
|
|
12
|
+
config.tailwindConfig
|
|
13
|
+
));
|
|
9
14
|
|
|
15
|
+
const assets =
|
|
16
|
+
tailwindConfig.mode === "jit"
|
|
17
|
+
? [
|
|
18
|
+
config.src.css,
|
|
19
|
+
config.src.sections,
|
|
20
|
+
config.src.layout,
|
|
21
|
+
config.src.snippets,
|
|
22
|
+
config.src.assets,
|
|
23
|
+
config.src.js,
|
|
24
|
+
config.tailwindConfig,
|
|
25
|
+
]
|
|
26
|
+
: [config.src.css, config.tailwindConfig];
|
|
10
27
|
|
|
11
28
|
/**
|
|
12
29
|
* Concatenate css via gulp-cssimport and copys to the `/dist` folder
|
|
@@ -16,10 +33,11 @@ const messages = require('./includes/messages.js');
|
|
|
16
33
|
* @private
|
|
17
34
|
*/
|
|
18
35
|
function processCss() {
|
|
19
|
-
return gulp
|
|
36
|
+
return gulp
|
|
37
|
+
.src(config.roots.css)
|
|
20
38
|
.pipe(plumber())
|
|
21
39
|
.pipe(postcss(config.plugins.postcss))
|
|
22
|
-
.pipe(sass().on(
|
|
40
|
+
.pipe(sass().on("error", sass.logError))
|
|
23
41
|
.pipe(gulp.dest(config.dist.assets));
|
|
24
42
|
}
|
|
25
43
|
|
|
@@ -30,7 +48,7 @@ function processCss() {
|
|
|
30
48
|
* @memberof seed-cli.tasks.build
|
|
31
49
|
* @static
|
|
32
50
|
*/
|
|
33
|
-
gulp.task(
|
|
51
|
+
gulp.task("build:css", () => {
|
|
34
52
|
return processCss();
|
|
35
53
|
});
|
|
36
54
|
|
|
@@ -41,12 +59,9 @@ gulp.task('build:css', () => {
|
|
|
41
59
|
* @memberof seed-cli.tasks.watch
|
|
42
60
|
* @static
|
|
43
61
|
*/
|
|
44
|
-
gulp.task(
|
|
45
|
-
chokidar.watch(
|
|
46
|
-
.
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
});
|
|
62
|
+
gulp.task("watch:css", () => {
|
|
63
|
+
chokidar.watch(assets, { ignoreInitial: true }).on("all", (event, path) => {
|
|
64
|
+
messages.logFileEvent(event, path);
|
|
65
|
+
processCss();
|
|
66
|
+
});
|
|
50
67
|
});
|
|
51
|
-
|
|
52
|
-
|
package/src/tasks/shopify-cli.js
CHANGED
|
@@ -70,9 +70,9 @@ gulp.task("shopify:pull:dev:tmp", (done) => {
|
|
|
70
70
|
});
|
|
71
71
|
|
|
72
72
|
/**
|
|
73
|
-
* Pulls theme files from the seed config theme enviroment into
|
|
73
|
+
* Pulls theme files from the seed config theme enviroment into tmp
|
|
74
74
|
*
|
|
75
|
-
* @function shopify:pull:
|
|
75
|
+
* @function shopify:pull:origin:tmp
|
|
76
76
|
* @memberof seed-cli.tasks.deploy
|
|
77
77
|
* @static
|
|
78
78
|
*/
|
|
@@ -87,7 +87,7 @@ gulp.task("shopify:pull:origin:tmp", () => {
|
|
|
87
87
|
/**
|
|
88
88
|
* Pulls theme files from the seed config theme enviroment into src
|
|
89
89
|
*
|
|
90
|
-
* @function shopify:pull:
|
|
90
|
+
* @function shopify:pull:origin:src
|
|
91
91
|
* @memberof seed-cli.tasks.deploy
|
|
92
92
|
* @static
|
|
93
93
|
*/
|