aboutsummaryrefslogtreecommitdiff
path: root/generate.js
diff options
context:
space:
mode:
authorGravatar Daniel Smith <rdnlsmith@gmail.com> 2019-05-04 21:53:39 -0400
committerGravatar Daniel Smith <rdnlsmith@gmail.com> 2019-05-04 21:53:39 -0400
commitd567d0727c5ee72376ead5b7aa0195187a8d8381 (patch)
treea307a21111ef1773e4d0d23a9274edaf3fd024e1 /generate.js
parentdb2bde1d1ba9a32e6bd7b7dc81ec06bb695ebf17 (diff)
Add Gulp for live theme editing
Run `npm start` from terminal to launch an extension host window and start watching the TypeScript source files. You can still open VS Code and press F5 if using a version older than 1.30 (January 2019).
Diffstat (limited to 'generate.js')
-rw-r--r--generate.js48
1 files changed, 0 insertions, 48 deletions
diff --git a/generate.js b/generate.js
deleted file mode 100644
index 6f7a867..0000000
--- a/generate.js
+++ /dev/null
@@ -1,48 +0,0 @@
-var glob = require('glob');
-var fs = require('fs');
-var path = require('path');
-var childProcess = require('child_process');
-
-// Run compiled theme generators
-glob.sync('./themes/ts-built/**/*.js').forEach(function(file) {
- childProcess.spawnSync('node', [ path.resolve(file) ]);
-});
-
-// Move generated themes to the correct folders
-glob.sync('./themes/ts-built/dark/*.json').forEach(function(file) {
- fs.renameSync(file, path.join(__dirname, 'themes', 'dark', path.basename(file)));
-});
-
-glob.sync('./themes/ts-built/light/*.json').forEach(function(file) {
- fs.renameSync(file, path.join(__dirname, 'themes', 'light', path.basename(file)));
-});
-
-// Populate the "contributes" property in package.json
-var themes = [];
-
-glob.sync('./themes/dark/*.json').forEach(function(file) {
- var theme = require(file);
- themes.push({
- label: theme.name,
- uiTheme: 'vs-dark',
- path: file
- });
-});
-
-glob.sync('./themes/light/*.json').forEach(function(file) {
- var theme = require(file);
- themes.push({
- label: theme.name,
- uiTheme: 'vs',
- path: file
- });
-});
-
-var package = require('./package.json');
-
-package.contributes.themes = themes;
-
-fs.writeFile('./package.json', JSON.stringify(package, null, 2), function(err) {
- if (err) return console.log(err);
- console.log('package.json updated');
-}); \ No newline at end of file