@madebyseed/seed-cli-tools 1.3.2 → 1.3.3

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.
@@ -19,6 +19,7 @@ var utils = require('./includes/utilities.js');
19
19
  var messages = require('./includes/messages.js');
20
20
 
21
21
  var assetsPaths = [config.src.assets, config.src.templates, config.src.sections, config.src.snippets, config.src.locales, config.src.config, config.src.layout];
22
+ var rootAssets = [config.shopifyIgnore];
22
23
  /**
23
24
  * Copies assets to the `/dist` directory
24
25
  *
@@ -36,6 +37,24 @@ function processAssets(files) {
36
37
  pretty: true
37
38
  })).pipe(gulp.dest(config.dist.root));
38
39
  }
40
+ /**
41
+ * Copies root assets to the `/dist` directory
42
+ *
43
+ * @param {Array} files
44
+ * @returns {Stream}
45
+ * @private
46
+ */
47
+
48
+
49
+ function processRootAssets(files) {
50
+ messages.logProcessFiles('build:assets');
51
+ return gulp.src(files, {
52
+ allowEmpty: true
53
+ }).pipe(plumber(utils.errorHandler)).pipe(size({
54
+ showFiles: true,
55
+ pretty: true
56
+ })).pipe(gulp.dest(config.dist.root));
57
+ }
39
58
  /**
40
59
  * Deletes specified files
41
60
  *
@@ -66,6 +85,7 @@ function removeAssets(files) {
66
85
 
67
86
 
68
87
  gulp.task('build:assets', function () {
88
+ processRootAssets(rootAssets);
69
89
  return processAssets(assetsPaths);
70
90
  });
71
91
  /**
@@ -86,4 +106,10 @@ gulp.task('watch:assets', function () {
86
106
  eventCache.addEvent(event, path);
87
107
  utils.processCache(eventCache, processAssets, removeAssets);
88
108
  });
109
+ chokidar.watch(rootAssets, {
110
+ ignoreInitial: true
111
+ }).on('all', function (event, path) {
112
+ messages.logFileEvent(event, path);
113
+ processRootAssets(rootAssets);
114
+ });
89
115
  });
@@ -46,7 +46,7 @@ gulp.task('build:css', function () {
46
46
  */
47
47
 
48
48
  gulp.task('watch:css', function () {
49
- chokidar.watch(config.src.css, {
49
+ chokidar.watch([config.src.css, config.tailwindConfig], {
50
50
  ignoreInitial: true
51
51
  }).on('all', function (event, path) {
52
52
  messages.logFileEvent(event, path);
@@ -61,6 +61,7 @@ var config = {
61
61
  packageJson: pkg,
62
62
  tailwindConfig: tailwindConfig,
63
63
  seedConfig: "seed.config.js",
64
+ shopifyIgnore: join(themeRoot, '.shopifyignore'),
64
65
  src: {
65
66
  root: "src/",
66
67
  js: "src/scripts/**/*.{js,js.liquid}",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@madebyseed/seed-cli-tools",
3
- "version": "1.3.2",
3
+ "version": "1.3.3",
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": "664511c9ff5705270fb7146e07f92a4c51b9508b"
55
+ "gitHead": "724a9e9b60d213c5ae240ff68f397e028983435f"
56
56
  }
@@ -19,6 +19,10 @@ const assetsPaths = [
19
19
  config.src.layout,
20
20
  ];
21
21
 
22
+ const rootAssets = [
23
+ config.shopifyIgnore
24
+ ]
25
+
22
26
  /**
23
27
  * Copies assets to the `/dist` directory
24
28
  *
@@ -37,6 +41,24 @@ function processAssets(files) {
37
41
  .pipe(gulp.dest(config.dist.root));
38
42
  }
39
43
 
44
+ /**
45
+ * Copies root assets to the `/dist` directory
46
+ *
47
+ * @param {Array} files
48
+ * @returns {Stream}
49
+ * @private
50
+ */
51
+ function processRootAssets(files) {
52
+ messages.logProcessFiles('build:assets');
53
+ return gulp.src(files, { allowEmpty: true })
54
+ .pipe(plumber(utils.errorHandler))
55
+ .pipe(size({
56
+ showFiles: true,
57
+ pretty: true,
58
+ }))
59
+ .pipe(gulp.dest(config.dist.root));
60
+ }
61
+
40
62
  /**
41
63
  * Deletes specified files
42
64
  *
@@ -69,6 +91,7 @@ function removeAssets(files) {
69
91
  * @static
70
92
  */
71
93
  gulp.task('build:assets', () => {
94
+ processRootAssets(rootAssets);
72
95
  return processAssets(assetsPaths);
73
96
  });
74
97
 
@@ -90,4 +113,11 @@ gulp.task('watch:assets', () => {
90
113
  eventCache.addEvent(event, path);
91
114
  utils.processCache(eventCache, processAssets, removeAssets);
92
115
  });
116
+
117
+ chokidar.watch(rootAssets, {
118
+ ignoreInitial: true,
119
+ }).on('all', (event, path) => {
120
+ messages.logFileEvent(event, path);
121
+ processRootAssets(rootAssets);
122
+ });
93
123
  });
@@ -42,9 +42,11 @@ gulp.task('build:css', () => {
42
42
  * @static
43
43
  */
44
44
  gulp.task('watch:css', () => {
45
- chokidar.watch(config.src.css, {ignoreInitial: true})
45
+ chokidar.watch([config.src.css, config.tailwindConfig], {ignoreInitial: true})
46
46
  .on('all', (event, path) => {
47
47
  messages.logFileEvent(event, path)
48
48
  processCss();
49
49
  });
50
50
  });
51
+
52
+
@@ -55,6 +55,8 @@ const config = {
55
55
 
56
56
  seedConfig: "seed.config.js",
57
57
 
58
+ shopifyIgnore: join(themeRoot, '.shopifyignore'),
59
+
58
60
  src: {
59
61
  root: "src/",
60
62
  js: "src/scripts/**/*.{js,js.liquid}",