Skip to content
This repository was archived by the owner on Mar 13, 2025. It is now read-only.

Commit aa01541

Browse files
committed
Fix build issue
1 parent debb212 commit aa01541

File tree

4 files changed

+301
-783
lines changed

4 files changed

+301
-783
lines changed

Diff for: gulp/browserify.js

+3-2
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,8 @@ const browserify = require('browserify');
33
const uglify = require('gulp-uglify');
44
const buffer = require('vinyl-buffer');
55
const source = require('vinyl-source-stream');
6-
const gutil = require('gulp-util');
6+
const colors = require('ansi-colors')
7+
const log = require('fancy-log')
78
const fs = require('fs');
89
const { styles } = require('./styles');
910

@@ -31,7 +32,7 @@ const browserifyFn = () => {
3132
.pipe(buffer())
3233
.pipe(uglify())
3334
.on('error', function (e) {
34-
gutil.log("Browserify Error", gutil.colors.red(e.message));
35+
log.error("Browserify Error", colors.red(e.message));
3536
})
3637
.pipe(gulp.dest(gulp.paths.tmp + '/serve/app'));
3738
};

Diff for: gulp/build.js

+14-15
Original file line numberDiff line numberDiff line change
@@ -14,16 +14,17 @@ const partials = () => {
1414
paths.src + '/{app,components}/**/*.html',
1515
paths.tmp + '/{app,components}/**/*.html'
1616
])
17-
.pipe($.minifyHtml({
18-
empty: true,
19-
spare: true,
20-
quotes: true
17+
.pipe($.htmlmin({
18+
removeEmptyAttributes: true,
19+
removeAttributeQuotes: true,
20+
processConditionalComments: true,
21+
collapseWhitespace: true,
2122
}))
2223
.pipe($.angularTemplatecache('templateCacheHtml.js', {
2324
module: 'topcoderX',
2425
root: 'app',
2526
}))
26-
.pipe(gulp.dest(paths.tmp + '/partials/'));
27+
.pipe(gulp.dest(paths.tmp + '/partials/'))
2728
}
2829
gulp.task('partials', partials);
2930

@@ -40,17 +41,17 @@ const htmlFn = () => {
4041
return gulp.src(paths.tmp + '/serve/*.html')
4142
.pipe($.inject(partialsInjectFile, partialsInjectOptions))
4243
.pipe($.useref())
43-
.pipe(rev())
44+
.pipe(gulpIf('!**/*.html', rev()))
4445
.pipe(gulpIf('**/*.js', $.ngAnnotate()))
4546
.pipe(gulpIf('**/*.js', $.uglify()))
4647
.pipe(gulpIf('**/*.css', $.replace(/\.?\.?\/node_modules\/\w+-?\/?\w+\/fonts\/?/g, '../fonts/')))
4748
.pipe(gulpIf('**/*.css', $.csso()))
4849
.pipe($.revReplace())
49-
.pipe(gulpIf('**/*.html', $.minifyHtml({
50-
empty: true,
51-
spare: true,
52-
quotes: true,
53-
conditionals: true
50+
.pipe(gulpIf('**/*.html', $.htmlmin({
51+
removeEmptyAttributes: true,
52+
removeAttributeQuotes: true,
53+
processConditionalComments: true,
54+
collapseWhitespace: true,
5455
})))
5556
.pipe(gulp.dest(paths.dist + '/'))
5657
.pipe($.size({ title: paths.dist + '/', showFiles: true }))
@@ -59,7 +60,7 @@ const htmlFn = () => {
5960
});
6061
}
6162
const html = gulp.series(inject, partials, htmlFn);
62-
gulp.task('html', htmlFn);
63+
gulp.task('html', html);
6364

6465
const images = () => {
6566
return gulp.src(paths.src + '/assets/images/**/*')
@@ -106,9 +107,7 @@ const lint = () => {
106107
.src(['src/**/*.js', '!src/front/e2e/**/*.js', '!src/public/**', '!gulp/**', '!node_modules/**'])
107108
// eslint() attaches the lint output to the "eslint" property
108109
// of the file object so it can be used by other modules.
109-
.pipe(eslint({
110-
fix: true
111-
}))
110+
.pipe(eslint({ fix: true }))
112111
// eslint.format() outputs the lint results to the console.
113112
// Alternatively use eslint.formatEach() (see Docs).
114113
.pipe(eslint.format())

0 commit comments

Comments
 (0)