Skip to content

Commit dabda8f

Browse files
committed
Chore: remove unused files from dist
1 parent 6c39bb6 commit dabda8f

File tree

6 files changed

+52
-36
lines changed

6 files changed

+52
-36
lines changed

package.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -39,17 +39,17 @@
3939
"build": "cross-env NODE_ENV=production run-s clean build:* -s",
4040
"build:html": "appcache-manifest-fixer src/index.html -o dist/index.html",
4141
"build:js": "webpack --progress --hide-modules",
42-
"build:monaco": "cpx node_modules/monaco-editor/min/vs/**/* dist/vs",
43-
"build:manifest": "appcache-manifest \"dist/**/*.{css,html,js,svg}\" --prefix /vue-eslint-demo --network-star -o dist/index.appcache && node scripts/tweak-manifest",
42+
"build:monaco": "node scripts/copy-monaco",
43+
"build:manifest": "appcache-manifest \"dist/**/*.{css,html,js,svg}\" --prefix /vue-eslint-demo --network-star -o dist/index.appcache",
4444
"build:versions": "node scripts/make-versions",
4545
"clean": "rimraf dist",
4646
"deploy": "node scripts/deploy",
4747
"preversion": "npm run build",
4848
"postversion": "git push && git push --tags && npm run deploy",
4949
"watch": "cross-env NODE_ENV=development run-p watch:* -s",
50-
"watch:html": "cpx src/*.html dist --watch",
50+
"watch:html": "cpx src/index.html dist --watch",
5151
"watch:js": "webpack-dev-server --open --hot",
52-
"watch:monaco": "cpx node_modules/monaco-editor/min/vs/**/* dist/vs --watch"
52+
"watch:monaco": "node scripts/copy-monaco --watch"
5353
},
5454
"repository": {
5555
"type": "git",

scripts/.eslintrc.json

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
{
2+
"root": true,
3+
"extends": [
4+
"mysticatea",
5+
"mysticatea/node"
6+
],
7+
"rules": {
8+
"no-console": "off"
9+
}
10+
}

scripts/copy-monaco.js

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
"use strict"
2+
3+
const childProcess = require("child_process")
4+
const args = process.argv.slice(2)
5+
const root = "node_modules/monaco-editor/min/vs/"
6+
const files = [
7+
"base/worker/workerMain.js",
8+
"basic-languages/src/html.js",
9+
"editor/editor.main.css",
10+
"editor/editor.main.js",
11+
"editor/editor.main.nls.js",
12+
"editor/contrib/suggest/browser/media/String_16x.svg",
13+
"editor/contrib/suggest/browser/media/String_inverse_16x.svg",
14+
"editor/standalone/browser/quickOpen/symbol-sprite.svg",
15+
"language/css/cssMode.js",
16+
"language/css/cssWorker.js",
17+
"language/html/htmlMode.js",
18+
"language/html/htmlWorker.js",
19+
"language/typescript/lib/typescriptServices.js",
20+
"language/typescript/src/mode.js",
21+
"language/typescript/src/worker.js",
22+
"loader.js",
23+
]
24+
const binFile = "node_modules/cpx/bin/index.js"
25+
const glob = `${root}{${files.join(",")}}`
26+
const dist = "dist/vs"
27+
28+
console.log("> cpx", glob, dist, ...args)
29+
const cp = childProcess.spawn(
30+
process.execPath,
31+
[binFile, glob, dist, ...args],
32+
{ stdio: "inherit" }
33+
)
34+
cp.on("exit", (exitCode) => {
35+
process.exitCode = exitCode
36+
})

scripts/deploy.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/*eslint-env node */
1+
"use strict"
22

33
const sh = require("shelljs")
44

scripts/make-versions.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/*eslint-env node */
1+
"use strict"
22

33
const fs = require("fs")
44

scripts/tweak-manifest.js

Lines changed: 0 additions & 30 deletions
This file was deleted.

0 commit comments

Comments
 (0)