chore: Fixes build system.

This commit is contained in:
OctoD 2017-07-18 14:27:08 +02:00
parent 305eeb566b
commit 479eca2a4c
5 changed files with 10 additions and 16 deletions

View file

@ -22,7 +22,7 @@ function writeIconVariant(filepath: string, destpath: string, colour: string): v
filepath = path.join(process.cwd(), PATHS.ICONS, filepath);
destpath = path.join(process.cwd(), PATHS.ICONS, destpath);
fs.writeFileSync(destpath, fs.readFileSync(filepath, CHARSET).replace(regexp, ($0, $1) => $0.replace($1, colour)), CHARSET) ;
fs.writeFileSync(destpath, fs.readFileSync(filepath, CHARSET).replace(regexp, ($0, $1) => $0.replace($1, colour)), { encoding: CHARSET }) ;
}

View file

@ -55,7 +55,7 @@ export default gulp.task('build:icons', cb => {
return;
}
fs.writeFileSync(pathTemp, contents, CHARSET);
fs.writeFileSync(pathTemp, contents, { encoding: CHARSET });
gutil.log(gutil.colors.gray(HR));
gutil.log(MESSAGE_GENERATED, gutil.colors.green(pathTemp));

View file

@ -43,7 +43,7 @@ export default gulp.task('build:themes', () => {
let templateJSON: any = JSON.parse(mustache.render(themeTemplateFileContent, templateData));
let templateJSONStringified: string = JSON.stringify(templateJSON, null, 2);
fs.writeFileSync(filePath, templateJSONStringified, CHARSET);
fs.writeFileSync(filePath, templateJSONStringified, { encoding: CHARSET });
gulpUtil.log(MESSAGE_GENERATED, gulpUtil.colors.green(filePath));
});

18
.vscode/tasks.json vendored
View file

@ -15,12 +15,13 @@
"run",
"build"
],
"isBuildCommand": true,
"command": "npm",
"dependsOn": "tsc",
"echoCommand": true,
"isShellCommand": true,
"taskName": "build",
"group": {
"kind": "build",
"isDefault": true
},
"problemMatcher": []
},
{
@ -42,8 +43,7 @@
"f",
"-delete"
],
"command": "find",
"isShellCommand": true
"command": "find"
},
"osx": {
"args": [
@ -63,11 +63,9 @@
"f",
"-delete"
],
"command": "find",
"isShellCommand": true
"command": "find"
},
"command": "",
"echoCommand": true,
"taskName": "clean project"
},
{
@ -76,8 +74,6 @@
"changelog"
],
"command": "npm",
"echoCommand": true,
"isShellCommand": true,
"taskName": "changelog"
},
{
@ -87,8 +83,6 @@
],
"command": "tsc",
"dependsOn": "clean project",
"echoCommand": true,
"isShellCommand": true,
"taskName": "tsc"
}
]

View file

@ -76,5 +76,5 @@ export function getPackageJSON(): IPackageJSON {
export function writeFile(filename: string, filecontent: string): void {
filename = path.join(PATHS.VSIX_DIR, filename);
console.log(arguments)
fs.writeFileSync(filename, filecontent, CHARSET);
fs.writeFileSync(filename, filecontent, { encoding: CHARSET });
}