autofront 2.0.0 → 2.0.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.
- package/README.md +1 -1
- package/index.js +8 -8
- package/package.json +2 -2
package/README.md
CHANGED
package/index.js
CHANGED
|
@@ -73,21 +73,21 @@ gulp.task('browser', gulp.series('build:tmp', (cb) => {
|
|
|
73
73
|
browserSyncInit(paths.tmp);
|
|
74
74
|
cb();
|
|
75
75
|
}));
|
|
76
|
-
|
|
76
|
+
gulp.task('serve', gulp.series('browser', () => {
|
|
77
77
|
gulp.watch([paths.srcIndexHtml, paths.srcJs], gulp.task('index'));
|
|
78
78
|
gulp.watch([paths.srcSass, paths.srcLess], gulp.task('styles'));
|
|
79
79
|
gulp.watch(paths.srcOthers, gulp.task('others'));
|
|
80
80
|
gulp.watch(paths.tmp+allFiles, function(event) {
|
|
81
81
|
browserSync.reload(event.path);
|
|
82
82
|
});
|
|
83
|
-
});
|
|
83
|
+
}));
|
|
84
84
|
|
|
85
85
|
gulp.task('del:dist', () => delFolder(paths.dist));
|
|
86
86
|
gulp.task('copy', gulp.series('del:dist', () => gulp.src(paths.tmp+allFiles).pipe(gulp.dest(paths.dist))));
|
|
87
|
-
gulp.task('templates-build', () => gulp.src([paths.dist+getFiles('html'), '!'+paths.dist+indexHtmlFile]).pipe($.cleanDest(paths.dist)).pipe(minifyHtml()).pipe($.angularTemplatecache(jsTemplatesFile, {module: 'app'})).pipe(gulp.dest(paths.dist)));
|
|
87
|
+
gulp.task('templates-build', () => gulp.src([paths.dist+getFiles('html'), '!'+paths.dist+indexHtmlFile]).pipe($.cleanDest(paths.dist)).pipe(minifyHtml()).pipe($.angularTemplatecache(jsTemplatesFile, {module: 'app', transformUrl: function(url) {return url.slice(1);}})).pipe(gulp.dest(paths.dist)));
|
|
88
88
|
gulp.task('templates-clean', () => require('delete-empty')(paths.dist));
|
|
89
89
|
gulp.task('templates', gulp.series('templates-build', 'templates-clean'));
|
|
90
|
-
|
|
90
|
+
gulp.task('build', gulp.series('build:tmp', 'copy', 'templates', () => {
|
|
91
91
|
const indexHtmlFilter = filter('html'),
|
|
92
92
|
cssFilter = filter('css'),
|
|
93
93
|
jsFilter = filter('js'),
|
|
@@ -104,10 +104,10 @@ exports.build = gulp.series('build:tmp', 'copy', 'templates', () => {
|
|
|
104
104
|
.pipe(jsonFilter).pipe($.jsonmin()).pipe(jsonFilter.restore)
|
|
105
105
|
.pipe($.size({showFiles: true}))
|
|
106
106
|
.pipe(gulp.dest(paths.dist));
|
|
107
|
-
});
|
|
108
|
-
|
|
107
|
+
}));
|
|
108
|
+
gulp.task('serve:dist', gulp.series('build', () => browserSyncInit(paths.dist)));
|
|
109
109
|
|
|
110
|
-
|
|
110
|
+
gulp.task('default', gulp.task('serve'));
|
|
111
111
|
|
|
112
112
|
function html5Mode() {
|
|
113
113
|
const pathPrefix = '/';
|
|
@@ -131,7 +131,7 @@ function filter(ext, isUnrestored) {
|
|
|
131
131
|
}
|
|
132
132
|
|
|
133
133
|
function browserSyncInit(path) {
|
|
134
|
-
|
|
134
|
+
browserSync.init({
|
|
135
135
|
server: {
|
|
136
136
|
baseDir: path
|
|
137
137
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "autofront",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.0.3",
|
|
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",
|