Cleanup dependencies (#195026)

* move build dependencies to devDependencies

* build: bump tree-sitter

* dependencies cleanup

* remove leftover file
This commit is contained in:
João Moreno
2023-10-09 08:34:15 +01:00
committed by GitHub
parent 55d1cfea45
commit a5d71aad39
15 changed files with 382 additions and 903 deletions

View File

@@ -7,7 +7,6 @@ import * as fs from 'fs';
import * as path from 'path';
import * as vfs from 'vinyl-fs';
import * as filter from 'gulp-filter';
import * as _ from 'underscore';
import * as util from './util';
import { getVersion } from './getVersion';
@@ -29,7 +28,15 @@ const root = path.dirname(path.dirname(__dirname));
const product = JSON.parse(fs.readFileSync(path.join(root, 'product.json'), 'utf8'));
const commit = getVersion(root);
const darwinCreditsTemplate = product.darwinCredits && _.template(fs.readFileSync(path.join(root, product.darwinCredits), 'utf8'));
function createTemplate(input: string): (params: Record<string, string>) => string {
return (params: Record<string, string>) => {
return input.replace(/<%=\s*([^\s]+)\s*%>/g, (match, key) => {
return params[key] || match;
});
};
}
const darwinCreditsTemplate = product.darwinCredits && createTemplate(fs.readFileSync(path.join(root, product.darwinCredits), 'utf8'));
/**
* Generate a `DarwinDocumentType` given a list of file extensions, an icon name, and an optional suffix or file type name.
@@ -201,12 +208,13 @@ function getElectron(arch: string): () => NodeJS.ReadWriteStream {
const electron = require('@vscode/gulp-electron');
const json = require('gulp-json-editor') as typeof import('gulp-json-editor');
const electronOpts = _.extend({}, config, {
const electronOpts = {
...config,
platform: process.platform,
arch: arch === 'armhf' ? 'arm' : arch,
ffmpegChromium: false,
keepDefaultApp: true
});
};
return vfs.src('package.json')
.pipe(json({ name: product.nameShort }))