Double quotes replaced by single quotes in source files on `gulp build`
isaacalves opened this issue · comments
isaac commented
If i have my working tree clean, run gulp build
and then git status
, I see that all my files inside /scripts
have changed. If I do diff
I see that all my double quotes had been replace by single quotes:
-import Stats from "stats.js";
+import Stats from 'stats.js';
Any idea what is going on? Why do these files get replaced on gulp build? Could this be Prettier.js?
My build related tasks do nothing with Prettier anyway.
Here are my build related tasks (pretty much the same as in the boilerplate):
gulp.task("lint", () => {
return lint("app/scripts/**/*.js").pipe(gulp.dest("app/scripts"));
});
gulp.task("lint:test", () => {
return lint("test/spec/**/*.js").pipe(gulp.dest("test/spec"));
});
gulp.task("html", ["styles", "scripts"], () => {
return gulp
.src("app/*.html")
.pipe($.useref({ searchPath: [".tmp", "app", "."] }))
.pipe($.if(/\.js$/, $.uglify({ compress: { drop_console: true } })))
.pipe($.if(/\.css$/, $.cssnano({ safe: true, autoprefixer: false })))
.pipe(
$.if(
/\.html$/,
$.htmlmin({
collapseWhitespace: true,
minifyCSS: true,
minifyJS: { compress: { drop_console: true } },
processConditionalComments: true,
removeComments: true,
removeEmptyAttributes: true,
removeScriptTypeAttributes: true,
removeStyleLinkTypeAttributes: true
})
)
)
.pipe(gulp.dest("dist"));
});
gulp.task("images", () => {
return gulp
.src("app/images/**/*")
.pipe($.cache($.imagemin()))
.pipe(gulp.dest("dist/images"));
});
gulp.task("fonts", () => {
return gulp
.src(
require("main-bower-files")("**/*.{eot,svg,ttf,woff,woff2}", function(
err
) {}).concat("app/fonts/**/*")
)
.pipe($.if(dev, gulp.dest(".tmp/fonts"), gulp.dest("dist/fonts")));
});
gulp.task("extras", () => {
return gulp
.src(["app/*", "!app/*.html"], {
dot: true
})
.pipe(gulp.dest("dist"));
});
gulp.task("build", ["lint", "html", "images", "fonts", "extras"], () => {
return gulp.src("dist/**/*").pipe($.size({ title: "build", gzip: true }));
});
Ulises Gascón commented
I assume that this bug was fixed in #737. If not we can re-open it again 😃