mirror of
https://github.com/Microsoft/vscode
synced 2024-08-27 04:49:35 +00:00
fix eslint issues in build/gulpfile.*
This commit is contained in:
parent
84013e2ef0
commit
2141437fdc
|
@ -17,14 +17,14 @@ const compilation = require('./lib/compilation');
|
|||
const monacoapi = require('./monaco/api');
|
||||
const fs = require('fs');
|
||||
|
||||
var root = path.dirname(__dirname);
|
||||
var sha1 = util.getVersion(root);
|
||||
var semver = require('./monaco/package.json').version;
|
||||
var headerVersion = semver + '(' + sha1 + ')';
|
||||
let root = path.dirname(__dirname);
|
||||
let sha1 = util.getVersion(root);
|
||||
let semver = require('./monaco/package.json').version;
|
||||
let headerVersion = semver + '(' + sha1 + ')';
|
||||
|
||||
// Build
|
||||
|
||||
var editorEntryPoints = [
|
||||
let editorEntryPoints = [
|
||||
{
|
||||
name: 'vs/editor/editor.main',
|
||||
include: [],
|
||||
|
@ -40,11 +40,11 @@ var editorEntryPoints = [
|
|||
}
|
||||
];
|
||||
|
||||
var editorResources = [
|
||||
let editorResources = [
|
||||
'out-editor-build/vs/base/browser/ui/codiconLabel/**/*.ttf'
|
||||
];
|
||||
|
||||
var BUNDLED_FILE_HEADER = [
|
||||
let BUNDLED_FILE_HEADER = [
|
||||
'/*!-----------------------------------------------------------',
|
||||
' * Copyright (c) Microsoft Corporation. All rights reserved.',
|
||||
' * Version: ' + headerVersion,
|
||||
|
@ -263,7 +263,7 @@ const finalEditorResourcesTask = task.define('final-editor-resources', () => {
|
|||
// package.json
|
||||
gulp.src('build/monaco/package.json')
|
||||
.pipe(es.through(function (data) {
|
||||
var json = JSON.parse(data.contents.toString());
|
||||
let json = JSON.parse(data.contents.toString());
|
||||
json.private = false;
|
||||
data.contents = Buffer.from(JSON.stringify(json, null, ' '));
|
||||
this.emit('data', data);
|
||||
|
@ -307,10 +307,10 @@ const finalEditorResourcesTask = task.define('final-editor-resources', () => {
|
|||
return;
|
||||
}
|
||||
|
||||
var relativePathToMap = path.relative(path.join(data.relative), path.join('min-maps', data.relative + '.map'));
|
||||
let relativePathToMap = path.relative(path.join(data.relative), path.join('min-maps', data.relative + '.map'));
|
||||
|
||||
var strContents = data.contents.toString();
|
||||
var newStr = '//# sourceMappingURL=' + relativePathToMap.replace(/\\/g, '/');
|
||||
let strContents = data.contents.toString();
|
||||
let newStr = '//# sourceMappingURL=' + relativePathToMap.replace(/\\/g, '/');
|
||||
strContents = strContents.replace(/\/\/# sourceMappingURL=[^ ]+$/, newStr);
|
||||
|
||||
data.contents = Buffer.from(strContents);
|
||||
|
|
|
@ -118,7 +118,7 @@ function mixinServer(watch) {
|
|||
const packageJSONPath = path.join(path.dirname(__dirname), 'package.json');
|
||||
function exec(cmdLine) {
|
||||
console.log(cmdLine);
|
||||
cp.execSync(cmdLine, { stdio: "inherit" });
|
||||
cp.execSync(cmdLine, { stdio: 'inherit' });
|
||||
}
|
||||
function checkout() {
|
||||
const packageJSON = JSON.parse(fs.readFileSync(packageJSONPath).toString());
|
||||
|
|
|
@ -121,9 +121,9 @@ gulp.task(minifyVSCodeTask);
|
|||
* @return {Object} A map of paths to checksums.
|
||||
*/
|
||||
function computeChecksums(out, filenames) {
|
||||
var result = {};
|
||||
let result = {};
|
||||
filenames.forEach(function (filename) {
|
||||
var fullPath = path.join(process.cwd(), out, filename);
|
||||
let fullPath = path.join(process.cwd(), out, filename);
|
||||
result[filename] = computeChecksum(fullPath);
|
||||
});
|
||||
return result;
|
||||
|
@ -136,9 +136,9 @@ function computeChecksums(out, filenames) {
|
|||
* @return {string} The checksum for `filename`.
|
||||
*/
|
||||
function computeChecksum(filename) {
|
||||
var contents = fs.readFileSync(filename);
|
||||
let contents = fs.readFileSync(filename);
|
||||
|
||||
var hash = crypto
|
||||
let hash = crypto
|
||||
.createHash('md5')
|
||||
.update(contents)
|
||||
.digest('base64')
|
||||
|
@ -428,7 +428,7 @@ gulp.task('vscode-translations-pull', function () {
|
|||
});
|
||||
|
||||
gulp.task('vscode-translations-import', function () {
|
||||
var options = minimist(process.argv.slice(2), {
|
||||
let options = minimist(process.argv.slice(2), {
|
||||
string: 'location',
|
||||
default: {
|
||||
location: '../vscode-translations-import'
|
||||
|
|
|
@ -23,7 +23,7 @@ const commit = util.getVersion(root);
|
|||
const linuxPackageRevision = Math.floor(new Date().getTime() / 1000);
|
||||
|
||||
function getDebPackageArch(arch) {
|
||||
return { x64: 'amd64', arm: 'armhf', arm64: "arm64" }[arch];
|
||||
return { x64: 'amd64', arm: 'armhf', arm64: 'arm64' }[arch];
|
||||
}
|
||||
|
||||
function prepareDebPackage(arch) {
|
||||
|
@ -117,7 +117,7 @@ function getRpmBuildPath(rpmArch) {
|
|||
}
|
||||
|
||||
function getRpmPackageArch(arch) {
|
||||
return { x64: 'x86_64', arm: 'armhf', arm64: "arm64" }[arch];
|
||||
return { x64: 'x86_64', arm: 'armhf', arm64: 'arm64' }[arch];
|
||||
}
|
||||
|
||||
function prepareRpmPackage(arch) {
|
||||
|
|
Loading…
Reference in a new issue