[css] webpack
parent
df77466bfa
commit
2042b73fd2
|
@ -1,11 +1,21 @@
|
|||
test/**
|
||||
.vscode/**
|
||||
client/src/**
|
||||
client/tsconfig.json
|
||||
server/src/**
|
||||
server/test/**
|
||||
server/out/test/**
|
||||
server/.vscode/**
|
||||
node_modules/**
|
||||
server/node_modules/**
|
||||
client/src/**
|
||||
server/src/**
|
||||
client/out/**
|
||||
server/out/**
|
||||
client/tsconfig.json
|
||||
server/tsconfig.json
|
||||
**/node_modules/@types/**
|
||||
**/node_modules/*/lib/esm/**
|
||||
server/test/**
|
||||
server/bin/**
|
||||
server/build/**
|
||||
server/yarn.lock
|
||||
server/.npmignore
|
||||
yarn.lock
|
||||
server/extension.webpack.config.js
|
||||
extension.webpack.config.js
|
||||
!node_modules/vscode-nls/**
|
||||
!server/node_modules/vscode-nls/**
|
|
@ -4,6 +4,7 @@
|
|||
*--------------------------------------------------------------------------------------------*/
|
||||
'use strict';
|
||||
import * as path from 'path';
|
||||
import * as fs from 'fs';
|
||||
|
||||
import * as nls from 'vscode-nls';
|
||||
const localize = nls.loadMessageBundle();
|
||||
|
@ -14,8 +15,9 @@ import { LanguageClient, LanguageClientOptions, ServerOptions, TransportKind, Di
|
|||
// this method is called when vs code is activated
|
||||
export function activate(context: ExtensionContext) {
|
||||
|
||||
// The server is implemented in node
|
||||
let serverModule = context.asAbsolutePath(path.join('server', 'out', 'cssServerMain.js'));
|
||||
let serverMain = readJSONFile(context.asAbsolutePath('./server/package.json')).main;
|
||||
let serverModule = context.asAbsolutePath(path.join('server', serverMain));
|
||||
|
||||
// The debug options for the server
|
||||
let debugOptions = { execArgv: ['--nolazy', '--inspect=6044'] };
|
||||
|
||||
|
@ -120,3 +122,12 @@ export function activate(context: ExtensionContext) {
|
|||
}
|
||||
}
|
||||
|
||||
function readJSONFile(location: string) {
|
||||
try {
|
||||
return JSON.parse(fs.readFileSync(location).toString());
|
||||
} catch (e) {
|
||||
console.log(`Problems reading ${location}: ${e}`);
|
||||
return {};
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -0,0 +1,40 @@
|
|||
/*---------------------------------------------------------------------------------------------
|
||||
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
* Licensed under the MIT License. See License.txt in the project root for license information.
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
|
||||
//@ts-check
|
||||
|
||||
'use strict';
|
||||
|
||||
const withDefaults = require('../shared.webpack.config');
|
||||
const CopyWebpackPlugin = require('copy-webpack-plugin');
|
||||
const path = require('path');
|
||||
|
||||
module.exports = withDefaults({
|
||||
context: path.join(__dirname, 'client'),
|
||||
entry: {
|
||||
extension: './src/cssMain.ts',
|
||||
},
|
||||
resolve: {
|
||||
mainFields: ['module', 'main'],
|
||||
extensions: ['.ts', '.js'] // support ts-files and js-files
|
||||
},
|
||||
node: {
|
||||
__dirname: false // leave the __dirname-behaviour intact
|
||||
},
|
||||
output: {
|
||||
filename: 'cssMain.js',
|
||||
path: path.join(__dirname, 'client', 'dist'),
|
||||
libraryTarget: "commonjs",
|
||||
},
|
||||
externals: {
|
||||
'./files': 'commonjs', // ignored because it doesn't exist
|
||||
},
|
||||
plugins: [
|
||||
new CopyWebpackPlugin([
|
||||
{ from: './out/*.sh', to: '[name].sh' },
|
||||
{ from: './out/nls.*.json', to: '[name].json' }
|
||||
])
|
||||
]
|
||||
});
|
|
@ -708,7 +708,7 @@
|
|||
]
|
||||
},
|
||||
"dependencies": {
|
||||
"vscode-languageclient": "^4.4.0",
|
||||
"vscode-languageclient": "^5.1.0-next.4",
|
||||
"vscode-nls": "^3.2.4"
|
||||
},
|
||||
"devDependencies": {
|
||||
|
|
|
@ -0,0 +1,5 @@
|
|||
/*---------------------------------------------------------------------------------------------
|
||||
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
* Licensed under the MIT License. See License.txt in the project root for license information.
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
module.exports = {};
|
|
@ -0,0 +1,38 @@
|
|||
/*---------------------------------------------------------------------------------------------
|
||||
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
* Licensed under the MIT License. See License.txt in the project root for license information.
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
|
||||
//@ts-check
|
||||
|
||||
'use strict';
|
||||
|
||||
const withDefaults = require('../../shared.webpack.config');
|
||||
const path = require('path');
|
||||
var webpack = require('webpack');
|
||||
|
||||
module.exports = withDefaults({
|
||||
context: path.join(__dirname),
|
||||
entry: {
|
||||
extension: './src/cssServerMain.ts',
|
||||
},
|
||||
resolve: {
|
||||
mainFields: ['module', 'main'],
|
||||
extensions: ['.ts', '.js'] // support ts-files and js-files
|
||||
},
|
||||
node: {
|
||||
__dirname: false // leave the __dirname-behaviour intact
|
||||
},
|
||||
output: {
|
||||
filename: 'cssServerMain.js',
|
||||
path: path.join(__dirname, 'dist'),
|
||||
libraryTarget: "commonjs",
|
||||
},
|
||||
plugins: [
|
||||
new webpack.NormalModuleReplacementPlugin(
|
||||
/\/vscode-languageserver\/lib\/files\.js/,
|
||||
require.resolve('./build/filesFillIn')
|
||||
),
|
||||
new webpack.IgnorePlugin(/vertx/)
|
||||
],
|
||||
});
|
|
@ -7,9 +7,10 @@
|
|||
"engines": {
|
||||
"node": "*"
|
||||
},
|
||||
"main": "./out/cssServerMain",
|
||||
"dependencies": {
|
||||
"vscode-css-languageservice": "^3.0.10-next.3",
|
||||
"vscode-languageserver": "^4.4.0"
|
||||
"vscode-languageserver": "^5.1.0-next.3"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@types/mocha": "2.2.33",
|
||||
|
@ -28,4 +29,4 @@
|
|||
"install-server-local": "npm install ../../../../vscode-languageserver-node/server -f",
|
||||
"test": "../../../node_modules/.bin/mocha"
|
||||
}
|
||||
}
|
||||
}
|
|
@ -205,35 +205,35 @@ vscode-jsonrpc@^3.6.2:
|
|||
version "3.6.2"
|
||||
resolved "https://registry.yarnpkg.com/vscode-jsonrpc/-/vscode-jsonrpc-3.6.2.tgz#3b5eef691159a15556ecc500e9a8a0dd143470c8"
|
||||
|
||||
vscode-languageserver-protocol@^3.10.0:
|
||||
version "3.10.0"
|
||||
resolved "https://registry.yarnpkg.com/vscode-languageserver-protocol/-/vscode-languageserver-protocol-3.10.0.tgz#f8dcdf987687f64a26e7c32d498fc781a0e886dc"
|
||||
vscode-languageserver-protocol@^3.12.0:
|
||||
version "3.12.0"
|
||||
resolved "https://registry.yarnpkg.com/vscode-languageserver-protocol/-/vscode-languageserver-protocol-3.12.0.tgz#5b23501292abad88f0463b01e83ff98e64a37652"
|
||||
dependencies:
|
||||
vscode-jsonrpc "^3.6.2"
|
||||
vscode-languageserver-types "^3.10.0"
|
||||
|
||||
vscode-languageserver-types@^3.10.0:
|
||||
version "3.10.0"
|
||||
resolved "https://registry.yarnpkg.com/vscode-languageserver-types/-/vscode-languageserver-types-3.10.0.tgz#944e5308f3b36a3f372c766f1a344e903ec9c389"
|
||||
vscode-languageserver-types "^3.12.0"
|
||||
|
||||
vscode-languageserver-types@^3.10.1:
|
||||
version "3.10.1"
|
||||
resolved "https://registry.yarnpkg.com/vscode-languageserver-types/-/vscode-languageserver-types-3.10.1.tgz#d5d5f44f688a3b2aa9857dc53cb9cacca73fe35a"
|
||||
|
||||
vscode-languageserver@^4.4.0:
|
||||
version "4.4.0"
|
||||
resolved "https://registry.yarnpkg.com/vscode-languageserver/-/vscode-languageserver-4.4.0.tgz#b6e8b37a739ccb629d92f3635f0099d191c856fa"
|
||||
vscode-languageserver-types@^3.12.0:
|
||||
version "3.12.0"
|
||||
resolved "https://registry.yarnpkg.com/vscode-languageserver-types/-/vscode-languageserver-types-3.12.0.tgz#f96051381b6a050b7175b37d6cb5d2f2eb64b944"
|
||||
|
||||
vscode-languageserver@^5.1.0-next.3:
|
||||
version "5.1.0-next.3"
|
||||
resolved "https://registry.yarnpkg.com/vscode-languageserver/-/vscode-languageserver-5.1.0-next.3.tgz#352ce1f0f8bdfc47c1236277ebe865e25b087ccd"
|
||||
dependencies:
|
||||
vscode-languageserver-protocol "^3.10.0"
|
||||
vscode-uri "^1.0.3"
|
||||
vscode-languageserver-protocol "^3.12.0"
|
||||
vscode-uri "^1.0.5"
|
||||
|
||||
vscode-nls@^3.2.4:
|
||||
version "3.2.4"
|
||||
resolved "https://registry.yarnpkg.com/vscode-nls/-/vscode-nls-3.2.4.tgz#2166b4183c8aea884d20727f5449e62be69fd398"
|
||||
|
||||
vscode-uri@^1.0.3:
|
||||
version "1.0.5"
|
||||
resolved "https://registry.yarnpkg.com/vscode-uri/-/vscode-uri-1.0.5.tgz#3b899a8ef71c37f3054d79bdbdda31c7bf36f20d"
|
||||
vscode-uri@^1.0.5:
|
||||
version "1.0.6"
|
||||
resolved "https://registry.yarnpkg.com/vscode-uri/-/vscode-uri-1.0.6.tgz#6b8f141b0bbc44ad7b07e94f82f168ac7608ad4d"
|
||||
|
||||
wrappy@1:
|
||||
version "1.0.2"
|
||||
|
|
|
@ -127,6 +127,10 @@ path-is-absolute@^1.0.0:
|
|||
version "1.0.1"
|
||||
resolved "https://registry.yarnpkg.com/path-is-absolute/-/path-is-absolute-1.0.1.tgz#174b9268735534ffbc7ace6bf53a5a9e1b5c5f5f"
|
||||
|
||||
semver@^5.5.0:
|
||||
version "5.5.1"
|
||||
resolved "https://registry.yarnpkg.com/semver/-/semver-5.5.1.tgz#7dfdd8814bdb7cabc7be0fb1d734cfb66c940477"
|
||||
|
||||
supports-color@5.4.0:
|
||||
version "5.4.0"
|
||||
resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-5.4.0.tgz#1c6b337402c2137605efe19f10fec390f6faab54"
|
||||
|
@ -137,22 +141,23 @@ vscode-jsonrpc@^3.6.2:
|
|||
version "3.6.2"
|
||||
resolved "https://registry.yarnpkg.com/vscode-jsonrpc/-/vscode-jsonrpc-3.6.2.tgz#3b5eef691159a15556ecc500e9a8a0dd143470c8"
|
||||
|
||||
vscode-languageclient@^4.4.0:
|
||||
version "4.4.0"
|
||||
resolved "https://registry.yarnpkg.com/vscode-languageclient/-/vscode-languageclient-4.4.0.tgz#b05868f6477b6f0c9910b24daae4f3e8c4b65902"
|
||||
vscode-languageclient@^5.1.0-next.4:
|
||||
version "5.1.0-next.4"
|
||||
resolved "https://registry.yarnpkg.com/vscode-languageclient/-/vscode-languageclient-5.1.0-next.4.tgz#2f96b4aa198c45f3e897b7f330c597a401ca95f2"
|
||||
dependencies:
|
||||
vscode-languageserver-protocol "^3.10.0"
|
||||
semver "^5.5.0"
|
||||
vscode-languageserver-protocol "^3.12.0"
|
||||
|
||||
vscode-languageserver-protocol@^3.10.0:
|
||||
version "3.10.0"
|
||||
resolved "https://registry.yarnpkg.com/vscode-languageserver-protocol/-/vscode-languageserver-protocol-3.10.0.tgz#f8dcdf987687f64a26e7c32d498fc781a0e886dc"
|
||||
vscode-languageserver-protocol@^3.12.0:
|
||||
version "3.12.0"
|
||||
resolved "https://registry.yarnpkg.com/vscode-languageserver-protocol/-/vscode-languageserver-protocol-3.12.0.tgz#5b23501292abad88f0463b01e83ff98e64a37652"
|
||||
dependencies:
|
||||
vscode-jsonrpc "^3.6.2"
|
||||
vscode-languageserver-types "^3.10.0"
|
||||
vscode-languageserver-types "^3.12.0"
|
||||
|
||||
vscode-languageserver-types@^3.10.0:
|
||||
version "3.10.0"
|
||||
resolved "https://registry.yarnpkg.com/vscode-languageserver-types/-/vscode-languageserver-types-3.10.0.tgz#944e5308f3b36a3f372c766f1a344e903ec9c389"
|
||||
vscode-languageserver-types@^3.12.0:
|
||||
version "3.12.0"
|
||||
resolved "https://registry.yarnpkg.com/vscode-languageserver-types/-/vscode-languageserver-types-3.12.0.tgz#f96051381b6a050b7175b37d6cb5d2f2eb64b944"
|
||||
|
||||
vscode-nls@^3.2.4:
|
||||
version "3.2.4"
|
||||
|
|
Loading…
Reference in New Issue