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); filepath = path.join(process.cwd(), PATHS.ICONS, filepath);
destpath = path.join(process.cwd(), PATHS.ICONS, destpath); 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; return;
} }
fs.writeFileSync(pathTemp, contents, CHARSET); fs.writeFileSync(pathTemp, contents, { encoding: CHARSET });
gutil.log(gutil.colors.gray(HR)); gutil.log(gutil.colors.gray(HR));
gutil.log(MESSAGE_GENERATED, gutil.colors.green(pathTemp)); 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 templateJSON: any = JSON.parse(mustache.render(themeTemplateFileContent, templateData));
let templateJSONStringified: string = JSON.stringify(templateJSON, null, 2); 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)); gulpUtil.log(MESSAGE_GENERATED, gulpUtil.colors.green(filePath));
}); });

18
.vscode/tasks.json vendored
View file

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

View file

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