autofront 2.0.2 → 2.0.5

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.
Files changed (3) hide show
  1. package/README.md +1 -1
  2. package/index.js +8 -6
  3. package/package.json +2 -2
package/README.md CHANGED
@@ -6,7 +6,7 @@
6
6
 
7
7
  ### Tasks
8
8
 
9
- The Gulp ones are the following:
9
+ Mainly the Gulp ones are the following:
10
10
 
11
11
  - `gulp` or `gulp serve` are for running a test server and develop with live reload.
12
12
  - `gulp build` only builds the distributable version.
package/index.js CHANGED
@@ -54,10 +54,11 @@ gulp.task('index', gulp.series('index-build', 'index-domain'));
54
54
  gulp.task('styles', () => {
55
55
  return mergeStream(getCssStream('scss', gulpSass, '@import "variables";'), getCssStream('less', $.less))
56
56
  .pipe($.concat(cssFullFilename))
57
- .pipe(gulp.dest(paths.tmp+stylesFolder));
57
+ .pipe(gulp.dest(paths.tmp+stylesFolder))
58
+ .pipe(browserSync.stream());
58
59
 
59
60
  function getCssStream(ext, process, extraCode) {
60
- return gulp.src(paths.src+stylesFolder+cssFilename+'.'+ext).pipe(injStr.prepend((extraCode?extraCode+nl:'')+'// bower:'+ext+nl+'// endbower'+nl)).pipe($.wiredep()).pipe(process()).on('error', notifyError);
61
+ return gulp.src(paths.src+stylesFolder+cssFilename+'.'+ext, {allowEmpty: true}).pipe(injStr.prepend((extraCode?extraCode+nl:'')+'// bower:'+ext+nl+'// endbower'+nl)).pipe($.wiredep()).pipe(process()).on('error', notifyError);
61
62
  }
62
63
  });
63
64
  gulp.task('fonts', () => gulp.src(mainBowerFiles()).pipe(filter(['eot','otf','svg','ttf','woff','woff2'], true)).pipe(gulp.dest(paths.tmp+'fonts/')));
@@ -77,8 +78,9 @@ gulp.task('serve', gulp.series('browser', () => {
77
78
  gulp.watch([paths.srcIndexHtml, paths.srcJs], gulp.task('index'));
78
79
  gulp.watch([paths.srcSass, paths.srcLess], gulp.task('styles'));
79
80
  gulp.watch(paths.srcOthers, gulp.task('others'));
80
- gulp.watch(paths.tmp+allFiles, function(event) {
81
- browserSync.reload(event.path);
81
+ gulp.watch([paths.tmp+allFiles, '!'+paths.tmp+stylesFolder+cssFullFilename], function(cb) {
82
+ browserSync.reload();
83
+ cb();
82
84
  });
83
85
  }));
84
86
 
@@ -122,7 +124,7 @@ function getFiles(ext) {
122
124
  }
123
125
 
124
126
  function delFolder(path) {
125
- return gulp.src(path, {read: false})
127
+ return gulp.src(path, {allowEmpty: true, read: false})
126
128
  .pipe($.clean());
127
129
  }
128
130
 
@@ -131,7 +133,7 @@ function filter(ext, isUnrestored) {
131
133
  }
132
134
 
133
135
  function browserSyncInit(path) {
134
- return browserSync.init({
136
+ browserSync.init({
135
137
  server: {
136
138
  baseDir: path
137
139
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "autofront",
3
- "version": "2.0.2",
3
+ "version": "2.0.5",
4
4
  "description": "Gulp settings for front-end projects.",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -27,7 +27,7 @@
27
27
  "dependencies": {
28
28
  "browser-sync": "^2.26.3",
29
29
  "delete-empty": "^2.0.0",
30
- "get-gulp-args": "0.0.1",
30
+ "get-gulp-args": "^0.0.1",
31
31
  "gulp": "^4.0.2",
32
32
  "gulp-about": "^1.1.0",
33
33
  "gulp-angular-filesort": "^1.2.1",