Add rollup sourcemap and fix launch.json

This commit is contained in:
Edwin Cheng 2019-12-09 03:58:43 +08:00
parent e3a9e806ba
commit 81ce9833a5
4 changed files with 58 additions and 1 deletions

2
.vscode/launch.json vendored
View file

@ -16,7 +16,7 @@
"env": { "env": {
"__RA_LSP_SERVER_DEBUG": "${workspaceFolder}/target/debug/ra_lsp_server" "__RA_LSP_SERVER_DEBUG": "${workspaceFolder}/target/debug/ra_lsp_server"
}, },
"outFiles": ["${workspaceFolder}/editors/code/out/**/*.js"], "outFiles": ["${workspaceFolder}/editors/code/bundle/**/*.js"],
"preLaunchTask": "Build All" "preLaunchTask": "Build All"
}, },
{ {

View file

@ -131,6 +131,12 @@
"sprintf-js": "~1.0.2" "sprintf-js": "~1.0.2"
} }
}, },
"atob": {
"version": "2.1.2",
"resolved": "https://registry.npmjs.org/atob/-/atob-2.1.2.tgz",
"integrity": "sha512-Wm6ukoaOGJi/73p/cl2GvLjTI5JM1k/O14isD73YML8StrH/7/lRFgmg8nICZgD3bZZvjwCGxtMOD3wWNAu8cg==",
"dev": true
},
"azure-devops-node-api": { "azure-devops-node-api": {
"version": "7.2.0", "version": "7.2.0",
"resolved": "https://registry.npmjs.org/azure-devops-node-api/-/azure-devops-node-api-7.2.0.tgz", "resolved": "https://registry.npmjs.org/azure-devops-node-api/-/azure-devops-node-api-7.2.0.tgz",
@ -324,6 +330,12 @@
"integrity": "sha1-9lNNFRSCabIDUue+4m9QH5oZEpA=", "integrity": "sha1-9lNNFRSCabIDUue+4m9QH5oZEpA=",
"dev": true "dev": true
}, },
"decode-uri-component": {
"version": "0.2.0",
"resolved": "https://registry.npmjs.org/decode-uri-component/-/decode-uri-component-0.2.0.tgz",
"integrity": "sha1-6zkTMzRYd1y4TNGh+uBiEGu4dUU=",
"dev": true
},
"define-properties": { "define-properties": {
"version": "1.1.3", "version": "1.1.3",
"resolved": "https://registry.npmjs.org/define-properties/-/define-properties-1.1.3.tgz", "resolved": "https://registry.npmjs.org/define-properties/-/define-properties-1.1.3.tgz",
@ -1084,6 +1096,12 @@
"path-parse": "^1.0.6" "path-parse": "^1.0.6"
} }
}, },
"resolve-url": {
"version": "0.2.1",
"resolved": "https://registry.npmjs.org/resolve-url/-/resolve-url-0.2.1.tgz",
"integrity": "sha1-LGN/53yJOv0qZj/iGqkIAGjiBSo=",
"dev": true
},
"rimraf": { "rimraf": {
"version": "2.7.1", "version": "2.7.1",
"resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.7.1.tgz", "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.7.1.tgz",
@ -1158,6 +1176,16 @@
} }
} }
}, },
"rollup-plugin-sourcemaps": {
"version": "0.4.2",
"resolved": "https://registry.npmjs.org/rollup-plugin-sourcemaps/-/rollup-plugin-sourcemaps-0.4.2.tgz",
"integrity": "sha1-YhJaqUCHqt97g+9N+vYptHMTXoc=",
"dev": true,
"requires": {
"rollup-pluginutils": "^2.0.1",
"source-map-resolve": "^0.5.0"
}
},
"rollup-plugin-typescript": { "rollup-plugin-typescript": {
"version": "1.0.1", "version": "1.0.1",
"resolved": "https://registry.npmjs.org/rollup-plugin-typescript/-/rollup-plugin-typescript-1.0.1.tgz", "resolved": "https://registry.npmjs.org/rollup-plugin-typescript/-/rollup-plugin-typescript-1.0.1.tgz",
@ -1241,6 +1269,25 @@
} }
} }
}, },
"source-map-resolve": {
"version": "0.5.2",
"resolved": "https://registry.npmjs.org/source-map-resolve/-/source-map-resolve-0.5.2.tgz",
"integrity": "sha512-MjqsvNwyz1s0k81Goz/9vRBe9SZdB09Bdw+/zYyO+3CuPk6fouTaxscHkgtE8jKvf01kVfl8riHzERQ/kefaSA==",
"dev": true,
"requires": {
"atob": "^2.1.1",
"decode-uri-component": "^0.2.0",
"resolve-url": "^0.2.1",
"source-map-url": "^0.4.0",
"urix": "^0.1.0"
}
},
"source-map-url": {
"version": "0.4.0",
"resolved": "https://registry.npmjs.org/source-map-url/-/source-map-url-0.4.0.tgz",
"integrity": "sha1-PpNdfd1zYxuXZZlW1VEo6HtQhKM=",
"dev": true
},
"sourcemap-codec": { "sourcemap-codec": {
"version": "1.4.6", "version": "1.4.6",
"resolved": "https://registry.npmjs.org/sourcemap-codec/-/sourcemap-codec-1.4.6.tgz", "resolved": "https://registry.npmjs.org/sourcemap-codec/-/sourcemap-codec-1.4.6.tgz",
@ -1409,6 +1456,12 @@
"integrity": "sha1-Tz+1OxBuYJf8+ctBCfKl6b36UCI=", "integrity": "sha1-Tz+1OxBuYJf8+ctBCfKl6b36UCI=",
"dev": true "dev": true
}, },
"urix": {
"version": "0.1.0",
"resolved": "https://registry.npmjs.org/urix/-/urix-0.1.0.tgz",
"integrity": "sha1-2pN/emLiH+wf0Y1Js1wpNQZ6bHI=",
"dev": true
},
"url-join": { "url-join": {
"version": "1.1.0", "version": "1.1.0",
"resolved": "https://registry.npmjs.org/url-join/-/url-join-1.1.0.tgz", "resolved": "https://registry.npmjs.org/url-join/-/url-join-1.1.0.tgz",

View file

@ -48,6 +48,7 @@
"rollup-plugin-commonjs": "^10.1.0", "rollup-plugin-commonjs": "^10.1.0",
"rollup-plugin-node-resolve": "^5.2.0", "rollup-plugin-node-resolve": "^5.2.0",
"rollup-plugin-typescript": "^1.0.1", "rollup-plugin-typescript": "^1.0.1",
"rollup-plugin-sourcemaps": "^0.4.2",
"shx": "^0.3.1", "shx": "^0.3.1",
"tslint": "^5.20.1", "tslint": "^5.20.1",
"tslint-config-prettier": "^1.18.0", "tslint-config-prettier": "^1.18.0",

View file

@ -1,12 +1,14 @@
import typescript from 'rollup-plugin-typescript'; import typescript from 'rollup-plugin-typescript';
import resolve from 'rollup-plugin-node-resolve'; import resolve from 'rollup-plugin-node-resolve';
import commonjs from 'rollup-plugin-commonjs'; import commonjs from 'rollup-plugin-commonjs';
import sourcemaps from 'rollup-plugin-sourcemaps'
import nodeBuiltins from 'builtin-modules'; import nodeBuiltins from 'builtin-modules';
export default { export default {
input: './src/extension.ts', input: './src/extension.ts',
plugins: [ plugins: [
typescript(), typescript(),
sourcemaps(),
resolve(), resolve(),
commonjs({ commonjs({
namedExports: { namedExports: {
@ -22,6 +24,7 @@ export default {
], ],
output: { output: {
file: './bundle/extension.js', file: './bundle/extension.js',
sourcemap: true,
format: 'cjs', format: 'cjs',
} }
}; };