autofront 2.2.1 → 2.2.2
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/README.md +6 -8
- package/index.js +8 -4
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -66,9 +66,9 @@ Other command options, that appear immediately below, are available. And to use
|
|
|
66
66
|
|
|
67
67
|
Mainly the Gulp ones are the following:
|
|
68
68
|
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
69
|
+
- `gulp` or `gulp serve` are for running a test server and develop with live reload.
|
|
70
|
+
- `gulp build` only builds production code, the distributable application (`dist` folder).
|
|
71
|
+
- With `gulp serve:dist`, a combination of the above is achieved: Specifically, the server runs that last version but without reload.
|
|
72
72
|
|
|
73
73
|
### Domains
|
|
74
74
|
|
|
@@ -125,8 +125,6 @@ Any asset (e.g. a PDF document) will keep the location path and, particularly at
|
|
|
125
125
|
|
|
126
126
|
Fixes and improvements to do:
|
|
127
127
|
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
* Replace Bower as dependency manager.
|
|
132
|
-
* Migrate AngularJS to new [Angular](https://angular.io).
|
|
128
|
+
- Once the server watch for changes, synchronize also the deletion of source files.
|
|
129
|
+
- Replace Bower as dependency manager.
|
|
130
|
+
- Migrate AngularJS to new [Angular](https://angular.io).
|
package/index.js
CHANGED
|
@@ -26,10 +26,11 @@ const paths = {
|
|
|
26
26
|
dist: 'dist/'
|
|
27
27
|
};
|
|
28
28
|
paths.srcIndexHtml = paths.src + indexHtmlFile;
|
|
29
|
+
paths.srcCss = paths.src + stylesFolder + cssFullFilename;
|
|
29
30
|
paths.srcSass = paths.src + getFiles('scss');
|
|
30
31
|
paths.srcLess = paths.src + getFiles('less');
|
|
31
32
|
paths.srcJs = paths.src + getFiles('js');
|
|
32
|
-
paths.srcOthers = [paths.src + allFiles, '!' + paths.srcIndexHtml, '!' + paths.srcSass, '!' + paths.srcLess, '!' + paths.srcJs];
|
|
33
|
+
paths.srcOthers = [paths.src + allFiles, '!' + paths.srcIndexHtml, '!' + paths.srcCss, '!' + paths.srcSass, '!' + paths.srcLess, '!' + paths.srcJs];
|
|
33
34
|
|
|
34
35
|
const nl = '\n',
|
|
35
36
|
tab = ' ';
|
|
@@ -57,13 +58,16 @@ gulp.task('index-build', () => gulp.src(paths.srcIndexHtml).pipe(injStr.after('<
|
|
|
57
58
|
gulp.task('index-domain', () => gulp.src(paths.tmp + getFiles('js')).pipe(injStr.replace('{{AUTOFRONT_DOMAIN}}', domain)).pipe(gulp.dest(paths.tmp)));
|
|
58
59
|
gulp.task('index', gulp.series('index-build', 'index-domain'));
|
|
59
60
|
gulp.task('styles', () => {
|
|
60
|
-
return mergeStream(getCssStream('scss', gulpSass, '@import "variables";'), getCssStream('less', $.less))
|
|
61
|
+
return mergeStream(getCssStream('css'), getCssStream('scss', gulpSass, '@import "variables";'), getCssStream('less', $.less))
|
|
61
62
|
.pipe($.concat(cssFullFilename))
|
|
62
63
|
.pipe(gulp.dest(paths.tmp + stylesFolder))
|
|
63
64
|
.pipe(browserSync.stream());
|
|
64
65
|
|
|
65
66
|
function getCssStream(ext, process, extraCode) {
|
|
66
|
-
|
|
67
|
+
let stream = gulp.src(paths.src + stylesFolder + cssFilename + '.' + ext, { allowEmpty: true });
|
|
68
|
+
if (process)
|
|
69
|
+
return stream.pipe(injStr.prepend((extraCode ? extraCode + nl : '') + '// bower:' + ext + nl + '// endbower' + nl)).pipe($.wiredep()).pipe(process()).on('error', notifyError);
|
|
70
|
+
return stream;
|
|
67
71
|
}
|
|
68
72
|
});
|
|
69
73
|
gulp.task('fonts', () => gulp.src(mainBowerFiles()).pipe(filter(['eot', 'otf', 'svg', 'ttf', 'woff', 'woff2'], true)).pipe(gulp.dest(paths.tmp + 'fonts/')));
|
|
@@ -81,7 +85,7 @@ gulp.task('browser', gulp.series('build:tmp', (cb) => {
|
|
|
81
85
|
}));
|
|
82
86
|
gulp.task('serve', gulp.series('browser', () => {
|
|
83
87
|
gulp.watch([paths.srcIndexHtml, paths.srcJs], gulp.task('index'));
|
|
84
|
-
gulp.watch([paths.srcSass, paths.srcLess], gulp.task('styles'));
|
|
88
|
+
gulp.watch([paths.srcCss, paths.srcSass, paths.srcLess], gulp.task('styles'));
|
|
85
89
|
gulp.watch(paths.srcOthers, gulp.task('others'));
|
|
86
90
|
gulp.watch([paths.tmp + allFiles, '!' + paths.tmp + stylesFolder + cssFullFilename], function (cb) {
|
|
87
91
|
browserSync.reload();
|