remove a ton of unused stuff
This commit is contained in:
parent
79101728a8
commit
ce4f135b34
3 changed files with 45 additions and 2911 deletions
2921
package-lock.json
generated
2921
package-lock.json
generated
File diff suppressed because it is too large
Load diff
|
@ -2,7 +2,7 @@
|
||||||
"name": "vsc-material-theme-but-i-wont-sue-you",
|
"name": "vsc-material-theme-but-i-wont-sue-you",
|
||||||
"displayName": "Material Theme (But I Won't Sue You)",
|
"displayName": "Material Theme (But I Won't Sue You)",
|
||||||
"description": "A Apache-2 licensed fork of Material Theme with no threats of legal action",
|
"description": "A Apache-2 licensed fork of Material Theme with no threats of legal action",
|
||||||
"version": "34.5.2",
|
"version": "35.0.0",
|
||||||
"publisher": "t3dotgg",
|
"publisher": "t3dotgg",
|
||||||
"license": "Apache-2.0",
|
"license": "Apache-2.0",
|
||||||
"author": "Theo",
|
"author": "Theo",
|
||||||
|
@ -165,12 +165,10 @@
|
||||||
],
|
],
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@moxer/vscode-theme-generator": "1.21.0",
|
"@moxer/vscode-theme-generator": "1.21.0",
|
||||||
"@types/browserify": "12.0.36",
|
|
||||||
"@types/fs-extra": "8.1.0",
|
"@types/fs-extra": "8.1.0",
|
||||||
"@types/rimraf": "3.0.2",
|
"@types/rimraf": "3.0.2",
|
||||||
"@typescript-eslint/eslint-plugin": "3.3.0",
|
"@typescript-eslint/eslint-plugin": "3.3.0",
|
||||||
"@typescript-eslint/parser": "3.3.0",
|
"@typescript-eslint/parser": "3.3.0",
|
||||||
"browserify": "16.5.1",
|
|
||||||
"eslint": "7.2.0",
|
"eslint": "7.2.0",
|
||||||
"eslint-config-xo-space": "0.25.0",
|
"eslint-config-xo-space": "0.25.0",
|
||||||
"eslint-config-xo-typescript": "0.31.0",
|
"eslint-config-xo-typescript": "0.31.0",
|
||||||
|
|
|
@ -1,44 +1,17 @@
|
||||||
import * as fs from 'fs-extra';
|
import * as fs from 'fs-extra';
|
||||||
import * as path from 'path';
|
import * as path from 'path';
|
||||||
import browserify from 'browserify';
|
|
||||||
|
|
||||||
import {BUILD_FOLDER_PATH, SRC_FOLDER_PATH, TS_BUILD_FOLDER_PATH} from '../../src/env';
|
import {BUILD_FOLDER_PATH} from '../../src/env';
|
||||||
|
|
||||||
const UI_FOLDER_PATH = path.join(SRC_FOLDER_PATH, 'webviews', 'ui');
|
|
||||||
const UI_JS_FOLDER_PATH = path.join(TS_BUILD_FOLDER_PATH, 'src', 'webviews', 'ui');
|
|
||||||
const UI_FOLDER_BUILD_PATH = path.join(BUILD_FOLDER_PATH, 'ui');
|
const UI_FOLDER_BUILD_PATH = path.join(BUILD_FOLDER_PATH, 'ui');
|
||||||
|
|
||||||
const copyStatics = async (): Promise<void[]> => {
|
|
||||||
const paths = [{
|
|
||||||
src: path.join(UI_FOLDER_PATH, 'release-notes', 'release-notes.html'),
|
|
||||||
dest: path.join(UI_FOLDER_BUILD_PATH, 'release-notes.html')
|
|
||||||
}, {
|
|
||||||
src: path.join(UI_FOLDER_PATH, 'release-notes', 'style.css'),
|
|
||||||
dest: path.join(UI_FOLDER_BUILD_PATH, 'release-notes.css')
|
|
||||||
}];
|
|
||||||
|
|
||||||
return Promise.all(paths.map(async path => fs.copyFile(path.src, path.dest)));
|
|
||||||
};
|
|
||||||
|
|
||||||
const buildJs = async (type: 'release-notes'): Promise<void> => {
|
|
||||||
const jsBuildPath = path.join(UI_FOLDER_BUILD_PATH, `${type}.js`);
|
|
||||||
const b = browserify();
|
|
||||||
await fs.createFile(jsBuildPath);
|
|
||||||
const jsBuildFileStream = fs.createWriteStream(jsBuildPath);
|
|
||||||
b.add(path.join(UI_JS_FOLDER_PATH, type, 'index.js'));
|
|
||||||
b.bundle().pipe(jsBuildFileStream);
|
|
||||||
return Promise.resolve();
|
|
||||||
};
|
|
||||||
|
|
||||||
const run = async (): Promise<void> => {
|
const run = async (): Promise<void> => {
|
||||||
try {
|
try {
|
||||||
await fs.mkdirp(UI_FOLDER_BUILD_PATH);
|
await fs.mkdirp(UI_FOLDER_BUILD_PATH);
|
||||||
await copyStatics();
|
|
||||||
await buildJs('release-notes');
|
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.error('ERROR build:ui:', error);
|
console.error('ERROR build:ui:', error);
|
||||||
process.exit(1);
|
process.exit(1);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
run();
|
void run();
|
||||||
|
|
Loading…
Add table
Reference in a new issue