rename prod server file
parent
9b0026ca1d
commit
1d0af70caa
|
@ -185,12 +185,12 @@
|
|||
}
|
||||
},
|
||||
"scripts": {
|
||||
"dev": "glob-exec --foreach --parallel \"src/*.ts\" -- \"ncc build {{file}} --watch -o dist/{{file.toString().replace(/^src\\//, '').replace(/\\.ts$/, '')}}\"",
|
||||
"build": "glob-exec --foreach --parallel \"src/*.ts\" -- \"ncc build {{file}} -o dist/{{file.toString().replace(/^src\\//, '').replace(/\\.ts$/, '')}}\"",
|
||||
"dev": "npm run clean && glob-exec --foreach --parallel \"src/*.ts\" -- \"ncc build {{file}} --watch -o dist/{{file.toString().replace(/^src\\//, '').replace(/\\.ts$/, '')}}\"",
|
||||
"build": "npm run clean && glob-exec --foreach --parallel \"src/*.ts\" -- \"ncc build {{file}} -o dist/{{file.toString().replace(/^src\\//, '').replace(/\\.ts$/, '')}}\" && mv dist/server/index.js dist/server/tailwindServer.js && npm run minify",
|
||||
"minify": "glob-exec --foreach --parallel \"dist/**/*.js\" -- \"terser {{file}} --compress --mangle --output {{file.toString()}}\"",
|
||||
"package": "vsce package",
|
||||
"publish": "vsce publish",
|
||||
"vscode:prepublish": "npm run clean && npm run build && npm run minify",
|
||||
"vscode:prepublish": "npm run build",
|
||||
"clean": "rimraf dist",
|
||||
"test": "jest"
|
||||
},
|
||||
|
|
|
@ -82,8 +82,15 @@ function getUserLanguages(folder?: WorkspaceFolder): Record<string, string> {
|
|||
return isObject(langs) ? langs : {}
|
||||
}
|
||||
|
||||
export function activate(context: ExtensionContext) {
|
||||
export async function activate(context: ExtensionContext) {
|
||||
let module = context.asAbsolutePath(path.join('dist', 'server', 'index.js'))
|
||||
let prod = path.join('dist', 'server', 'tailwindServer.js')
|
||||
|
||||
try {
|
||||
await Workspace.fs.stat(Uri.joinPath(context.extensionUri, prod))
|
||||
module = context.asAbsolutePath(prod)
|
||||
} catch (_) {}
|
||||
|
||||
let outputChannel: OutputChannel
|
||||
|
||||
context.subscriptions.push(
|
||||
|
|
Loading…
Reference in New Issue