Skip to content

Commit 493b1aa

Browse files
committed
[FIX] Template error
1 parent 523ba5b commit 493b1aa

File tree

2 files changed

+15
-24
lines changed

2 files changed

+15
-24
lines changed

Diff for: gulpfile.js

+14-23
Original file line numberDiff line numberDiff line change
@@ -26,23 +26,9 @@ gulp.task('lint', function () {
2626
});
2727

2828
gulp.task('minify:js', function () {
29-
var assets = useref.assets();
30-
return gulp.src('./csp/index.html')
31-
.pipe(assets)
32-
.pipe(gulpIf("*.js",replace('"{{package.json.version}}"', '"' + p.version + '"')))
33-
.pipe(gulpIf("*.js",traceur()))
34-
.pipe(gulpIf("*.js",uglify()))
35-
.pipe(gulpIf("*.html",htmlmin({empty: false})))
36-
.pipe(assets.restore())
37-
.pipe(useref())
38-
//.pipe(gulp.dest('build'))
39-
.pipe(through.obj(function (chunk, enc, cb) {
40-
if (!fs.existsSync("./build")) fs.mkdirSync("./build");
41-
if (!fs.existsSync("./build/src")) fs.mkdirSync("./build/src");
42-
fs.writeFileSync("./build/"+chunk.relative, chunk.contents);
43-
cb(null, chunk);
44-
}))
45-
.pipe(debug({title: "after save"}));
29+
return gulp.src('csp/src/**/*.*')
30+
.pipe(gulpIf('*.js', replace('"{{package.json.version}}"', '"' + p.version + '"')))
31+
.pipe(gulp.dest('build/src'));
4632
});
4733

4834
gulp.task('minify:css', function () {
@@ -52,27 +38,32 @@ gulp.task('minify:css', function () {
5238
.pipe(gulp.dest('build/css'))
5339
});
5440

55-
gulp.task('minify:template', function () {
41+
/*gulp.task('minify:template', function () {
5642
return gulp.src('csp/src/view/*.html')
5743
.pipe(htmlmin({empty: false}))
5844
.pipe(templateCache({root:"src/view"}))
5945
.pipe(gulp.dest('build/src/'))
60-
});
46+
});*/
6147

62-
gulp.task('concat-with-templates', function () {
48+
/*gulp.task('concat-with-templates', function () {
6349
return gulp.src(['build/src/app.js', 'build/src/templates.js'])
6450
.pipe(concat('app.js'))
6551
.pipe(gulp.dest('build/src'))
66-
});
52+
});*/
6753

6854
gulp.task('copy:csslibs', function () {
6955
return gulp.src('csp/css/*.min.css')
7056
.pipe(gulp.dest('build/css'));
7157
});
7258

73-
gulp.task('copy:jslibs', function () {
59+
/*gulp.task('copy:jslibs', function () {
7460
return gulp.src('csp/src/lib/*.*')
7561
.pipe(gulp.dest('build/src/lib'))
62+
});*/
63+
64+
gulp.task('copy:jslibs', function () {
65+
return gulp.src('csp/index.html')
66+
.pipe(gulp.dest('build'))
7667
});
7768

7869
gulp.task('copy:fonts', function () {
@@ -221,7 +212,7 @@ gulp.task('cleanup:after-creating-installer', function () {
221212
});
222213
});
223214

224-
gulp.task('minify', gulp.series(gulp.parallel('minify:js','minify:css','minify:template'), 'concat-with-templates'));
215+
gulp.task('minify', gulp.series(gulp.parallel('minify:js','minify:css'/*,'minify:template'*/)/*, 'concat-with-templates'*/));
225216
gulp.task('copy', gulp.parallel('copy:csslibs','copy:jslibs','copy:fonts'));
226217
gulp.task('build', gulp.series(gulp.parallel('lint','cleanup:before-build'),gulp.parallel('minify','copy'),'cleanup:after-build'));
227218
gulp.task('create-xml-installer', gulp.series(

Diff for: package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
"gulp-replace": "^0.6.1",
1818
"gulp-traceur-compiler": "^1.1.4",
1919
"gulp-uglify": "^3.0.0",
20-
"gulp-useref": "^1.3.0",
20+
"gulp-useref": "^3.1.3",
2121
"jshint": "^2.9.5",
2222
"through2": "^2.0.3"
2323
},

0 commit comments

Comments
 (0)