Config
+ Add ignores for generated files + Add webpack
This commit is contained in:
@@ -2,4 +2,8 @@ node_modules/**
|
||||
client/node_modules/**
|
||||
client/out/**
|
||||
server/node_modules/**
|
||||
server/out/**
|
||||
server/out/**
|
||||
|
||||
server/dist/**
|
||||
client/dist/**
|
||||
client/src/generated/**
|
||||
|
1
.gitignore
vendored
1
.gitignore
vendored
@@ -1,5 +1,6 @@
|
||||
test.bf
|
||||
out
|
||||
dist
|
||||
node_modules
|
||||
client/server
|
||||
.vscode-test
|
||||
|
@@ -1,15 +1,23 @@
|
||||
client/bf.g4
|
||||
**/out
|
||||
*.bf
|
||||
client/**
|
||||
server/**
|
||||
|
||||
node_modules
|
||||
!client/dist
|
||||
!server/dist
|
||||
|
||||
**/*.md
|
||||
!README.md
|
||||
*.vsix
|
||||
.vscode/**
|
||||
**/*.ts
|
||||
**/*.map
|
||||
.gitignore
|
||||
**/.gitignore
|
||||
**/.eslintrc.json
|
||||
**/.eslintignore
|
||||
**/tsconfig.json
|
||||
**/tsconfig.base.json
|
||||
contributing.md
|
||||
# contributing.md
|
||||
.travis.yml
|
||||
client/node_modules/**
|
||||
!client/node_modules/vscode-jsonrpc/**
|
||||
!client/node_modules/vscode-languageclient/**
|
||||
!client/node_modules/vscode-languageserver-protocol/**
|
||||
!client/node_modules/vscode-languageserver-types/**
|
||||
!client/node_modules/semver/**
|
||||
# client/node_modules/**
|
||||
|
2364
client/package-lock.json
generated
2364
client/package-lock.json
generated
File diff suppressed because it is too large
Load Diff
@@ -18,10 +18,14 @@
|
||||
},
|
||||
"devDependencies": {
|
||||
"@types/vscode": "1.43.0",
|
||||
"antlr4ts-cli": "^0.5.0-alpha.4",
|
||||
"vscode-test": "^1.3.0"
|
||||
"vscode-test": "^1.3.0",
|
||||
"webpack": "^5.33.2",
|
||||
"webpack-cli": "^4.6.0"
|
||||
},
|
||||
"scripts": {
|
||||
"regen": "antlr4ts bf.g4 -no-listener -visitor -o src/generated/"
|
||||
"regen": "antlr4ts bf.g4 -no-listener -visitor -o src/generated/",
|
||||
"webpack": "webpack --mode development",
|
||||
"webpack-prod":"webpack --mode production",
|
||||
"webpack-dev": "webpack --mode development --watch"
|
||||
}
|
||||
}
|
||||
|
@@ -19,7 +19,7 @@ let client: LanguageClient;
|
||||
export function activate(context: ExtensionContext) {
|
||||
// The server is implemented in node
|
||||
let serverModule = context.asAbsolutePath(
|
||||
path.join('server', 'out', 'server.js')
|
||||
path.join('server', 'dist', 'server.js')
|
||||
);
|
||||
// The debug options for the server
|
||||
// --inspect=6009: runs the server in Node's Inspector mode so VS Code can attach to the server for debugging
|
||||
|
51
client/webpack.config.js
Normal file
51
client/webpack.config.js
Normal file
@@ -0,0 +1,51 @@
|
||||
//@ts-check
|
||||
|
||||
'use strict';
|
||||
|
||||
const path = require('path');
|
||||
// const {} = require('webpack');
|
||||
/**@type {import('webpack').Configuration}*/
|
||||
const config = {
|
||||
target: 'node', // vscode extensions run in a Node.js-context 📖 -> https://webpack.js.org/configuration/node/
|
||||
|
||||
entry: {
|
||||
extension:path.join(__dirname,'src','extension.ts'),
|
||||
}, // the entry point of this extension, 📖 -> https://webpack.js.org/configuration/entry-context/
|
||||
output: {
|
||||
// the bundle is stored in the 'dist' folder (check package.json), 📖 -> https://webpack.js.org/configuration/output/
|
||||
path: path.resolve(__dirname, 'dist'),
|
||||
filename: '[name].js',
|
||||
libraryTarget: 'commonjs2',
|
||||
devtoolModuleFilenameTemplate: '../[resource-path]'
|
||||
},
|
||||
devtool: 'source-map',
|
||||
externals: {
|
||||
vscode: 'commonjs vscode' // the vscode-module is created on-the-fly and must be excluded. Add other modules that cannot be webpack'ed, 📖 -> https://webpack.js.org/configuration/externals/
|
||||
},
|
||||
resolve: {
|
||||
// support reading TypeScript and JavaScript files, 📖 -> https://github.com/TypeStrong/ts-loader
|
||||
extensions: ['.ts', '.js'],
|
||||
plugins:[]
|
||||
},
|
||||
stats:'minimal',
|
||||
module: {
|
||||
rules: [
|
||||
{
|
||||
test: /\.ts$/,
|
||||
exclude: /node_modules/,
|
||||
use: [
|
||||
{
|
||||
loader: 'ts-loader',
|
||||
options:{
|
||||
configFile : 'tsconfig.json'
|
||||
}
|
||||
}
|
||||
],
|
||||
|
||||
|
||||
}
|
||||
]
|
||||
},
|
||||
|
||||
};
|
||||
module.exports = config;
|
3478
package-lock.json
generated
3478
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
35
package.json
35
package.json
@@ -5,15 +5,15 @@
|
||||
"author": "Atreya Bain",
|
||||
"license": "MIT",
|
||||
"publisher": "atreyabain",
|
||||
"version": "0.0.1",
|
||||
"icon":"assets/128.png",
|
||||
"version": "0.0.3",
|
||||
"icon": "assets/128.png",
|
||||
"categories": [],
|
||||
"keywords": [
|
||||
"multi-root ready",
|
||||
"brainfuck",
|
||||
"branflakes"
|
||||
],
|
||||
"prettier":{
|
||||
"prettier": {
|
||||
"tabWidth": 4,
|
||||
"semi": true,
|
||||
"arrowParens": "avoid",
|
||||
@@ -27,9 +27,9 @@
|
||||
],
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url":"https://github.com/chrisvrose/bf-server"
|
||||
"url": "https://github.com/chrisvrose/bf-server"
|
||||
},
|
||||
"main": "./client/out/extension",
|
||||
"main": "./client/dist/extension",
|
||||
"contributes": {
|
||||
"languages": [
|
||||
{
|
||||
@@ -55,12 +55,14 @@
|
||||
"path": "./syntaxes/bf.tmLanguage.json"
|
||||
}
|
||||
],
|
||||
"commands": [{
|
||||
"command": "bf.execute",
|
||||
"title": "BF: Execute",
|
||||
"when": "editorLangId == bf",
|
||||
"enablement": "editorLangId == bf"
|
||||
}],
|
||||
"commands": [
|
||||
{
|
||||
"command": "bf.execute",
|
||||
"title": "BF: Execute",
|
||||
"when": "editorLangId == bf",
|
||||
"enablement": "editorLangId == bf"
|
||||
}
|
||||
],
|
||||
"configuration": {
|
||||
"type": "object",
|
||||
"title": "Configurable properties",
|
||||
@@ -87,7 +89,8 @@
|
||||
},
|
||||
"scripts": {
|
||||
"vscode:prepublish": "npm run compile",
|
||||
"compile": "tsc -b",
|
||||
"compile": "concurrently \"npm run webpack-prod --prefix client\" \"npm run webpack-prod --prefix server \"",
|
||||
"_compile": "tsc -b",
|
||||
"watch": "tsc -b -w",
|
||||
"postinstall": "cd client && npm install && cd ../server && npm install && cd .."
|
||||
},
|
||||
@@ -98,6 +101,12 @@
|
||||
"@typescript-eslint/parser": "^2.33.0",
|
||||
"eslint": "^6.4.0",
|
||||
"mocha": "^6.2.2",
|
||||
"typescript": "^3.9.2"
|
||||
"ts-loader": "^8.1.0",
|
||||
"typescript": "^3.9.2",
|
||||
"webpack": "^5.33.2",
|
||||
"webpack-cli": "^4.6.0"
|
||||
},
|
||||
"dependencies": {
|
||||
"concurrently": "^6.0.2"
|
||||
}
|
||||
}
|
||||
|
2348
server/package-lock.json
generated
2348
server/package-lock.json
generated
File diff suppressed because it is too large
Load Diff
@@ -15,5 +15,13 @@
|
||||
"vscode-languageserver": "^6.1.1",
|
||||
"vscode-languageserver-textdocument": "^1.0.1"
|
||||
},
|
||||
"scripts": {}
|
||||
"scripts": {
|
||||
"webpack-prod":"webpack --mode production",
|
||||
"webpack": "webpack --mode development",
|
||||
"webpack-dev": "webpack --mode development --watch"
|
||||
},
|
||||
"devDependencies": {
|
||||
"webpack": "^5.33.2",
|
||||
"webpack-cli": "^4.6.0"
|
||||
}
|
||||
}
|
||||
|
50
server/webpack.config.js
Normal file
50
server/webpack.config.js
Normal file
@@ -0,0 +1,50 @@
|
||||
//@ts-check
|
||||
|
||||
'use strict';
|
||||
|
||||
const path = require('path');
|
||||
/**@type {import('webpack').Configuration}*/
|
||||
const config = {
|
||||
target: 'node', // vscode extensions run in a Node.js-context 📖 -> https://webpack.js.org/configuration/node/
|
||||
|
||||
entry: {
|
||||
server:path.join(__dirname,'src','server.ts'),
|
||||
}, // the entry point of this extension, 📖 -> https://webpack.js.org/configuration/entry-context/
|
||||
output: {
|
||||
// the bundle is stored in the 'dist' folder (check package.json), 📖 -> https://webpack.js.org/configuration/output/
|
||||
path: path.resolve(__dirname, 'dist'),
|
||||
filename: '[name].js',
|
||||
libraryTarget: 'commonjs2',
|
||||
devtoolModuleFilenameTemplate: '../[resource-path]'
|
||||
},
|
||||
stats:'minimal',
|
||||
devtool: 'source-map',
|
||||
externals: {
|
||||
vscode: 'commonjs vscode' // the vscode-module is created on-the-fly and must be excluded. Add other modules that cannot be webpack'ed, 📖 -> https://webpack.js.org/configuration/externals/
|
||||
},
|
||||
resolve: {
|
||||
// support reading TypeScript and JavaScript files, 📖 -> https://github.com/TypeStrong/ts-loader
|
||||
extensions: ['.ts', '.js'],
|
||||
plugins:[]
|
||||
},
|
||||
module: {
|
||||
rules: [
|
||||
{
|
||||
test: /\.ts$/,
|
||||
exclude: /node_modules/,
|
||||
use: [
|
||||
{
|
||||
loader: 'ts-loader',
|
||||
options:{
|
||||
configFile : 'tsconfig.json'
|
||||
}
|
||||
}
|
||||
],
|
||||
|
||||
|
||||
}
|
||||
]
|
||||
},
|
||||
|
||||
};
|
||||
module.exports = config;
|
Reference in New Issue
Block a user