Skip to content

Commit

Permalink
feat: use bili to bundle extension
Browse files Browse the repository at this point in the history
  • Loading branch information
fjc0k committed Mar 13, 2019
1 parent 9142e6d commit 338575f
Show file tree
Hide file tree
Showing 5 changed files with 2,025 additions and 114 deletions.
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
node_modules
*.log
out
out
dist
.rpt2_cache
6 changes: 5 additions & 1 deletion .vscodeignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,8 @@ vsc-extension-quickstart.md
**/tsconfig.json
**/tslint.json
**/*.map
**/*.ts
**/*.ts
out
node_modules
.rpt2_cache
yarn.lock
17 changes: 17 additions & 0 deletions bili.config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
import { Config } from 'bili'

const config: Config = {
input: 'src/extension.ts',
output: {
dir: 'dist',
format: 'cjs-min',
sourceMap: false,
},
bundleNodeModules: true,
externals: ['vscode'],
plugins: {
typescript2: false,
},
}

export default config
21 changes: 13 additions & 8 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@
"version": "0.4.0",
"license": "MIT",
"publisher": "JayFong",
"browserslist": [
"node 8"
],
"engines": {
"vscode": "^1.32.0"
},
Expand All @@ -19,7 +22,7 @@
"activationEvents": [
"onCommand:extension.generateIndex"
],
"main": "./out/extension.js",
"main": "./dist/extension.min.js",
"contributes": {
"commands": [
{
Expand All @@ -44,9 +47,9 @@
}
},
"scripts": {
"vscode:prepublish": "yarn run compile",
"compile": "tsc -p ./",
"watch": "tsc -watch -p ./",
"vscode:prepublish": "yarn run build",
"compile": "bili",
"watch": "bili --watch",
"postinstall": "node ./node_modules/vscode/bin/install",
"test": "yarn run compile && node ./node_modules/vscode/bin/test",
"release": "standard-version -a && git push --follow-tags origin master && vsce publish"
Expand All @@ -66,20 +69,22 @@
}
},
"eslintIgnore": [
"out"
"out",
"dist"
],
"devDependencies": {
"@types/lodash": "^4.14.123",
"@types/mocha": "^2.2.42",
"@types/node": "^10.12.21",
"bili": "^4.4.0",
"eslint": "^5.15.1",
"eslint-config-io": "^0.1.1",
"standard-version": "^5.0.1",
"typescript": "^3.3.1",
"typescript": "^3.3.3333",
"vscode": "^1.1.28"
},
"dependencies": {
"change-case": "^3.1.0",
"globby": "^9.1.0",
"lodash": "^4.17.11"
"vtils": "^0.78.0"
}
}

0 comments on commit 338575f

Please sign in to comment.