werks
This commit is contained in:
@@ -0,0 +1,7 @@
|
|||||||
|
import * as Back from './src/Backend';
|
||||||
|
import * as Front from './src/Frontend';
|
||||||
|
|
||||||
|
export {
|
||||||
|
Back as Backend,
|
||||||
|
Front as Frontend
|
||||||
|
}
|
||||||
+8
-8
@@ -1,14 +1,15 @@
|
|||||||
{
|
{
|
||||||
"name": "rpclibrary",
|
"name": "rpclibrary",
|
||||||
"version": "1.0.2",
|
"version": "1.0.3",
|
||||||
"description": "",
|
"description": "",
|
||||||
|
"main": "./js/Index.js",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"tsc": "tsc",
|
"tsc": "tsc",
|
||||||
"webpack": "webpack",
|
"webpack": "webpack --config ./src/webpack.js",
|
||||||
"build-lib": "webpack --config ./src/webpack.js",
|
"backend": "node js/test/TestBackend.js",
|
||||||
"build-test": "webpack --config ./test/webpack.js",
|
"frontend": "node js/test/TestFrontend.js",
|
||||||
"build": "npm run clean && npm run build-lib && npm run build-test && mv js/**/*.d.ts .",
|
"build": "npm run clean && tsc && npm run webpack",
|
||||||
"clean": "rm -rf ./*.js ./*.d.ts js"
|
"clean": "rm -rf js"
|
||||||
},
|
},
|
||||||
"author": "",
|
"author": "",
|
||||||
"license": "ISC",
|
"license": "ISC",
|
||||||
@@ -29,7 +30,6 @@
|
|||||||
"uuid": "^3.3.3"
|
"uuid": "^3.3.3"
|
||||||
},
|
},
|
||||||
"files": [
|
"files": [
|
||||||
"*.js",
|
"js"
|
||||||
"*.d.ts"
|
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|||||||
+3
-30
@@ -3,39 +3,12 @@ const path = require('path');
|
|||||||
const frontendConf = {
|
const frontendConf = {
|
||||||
mode: 'production',
|
mode: 'production',
|
||||||
target: "web",
|
target: "web",
|
||||||
entry: path.resolve(__dirname, 'Frontend.ts'),
|
entry: path.resolve(__dirname, '..', 'js', 'src', 'Frontend.js'),
|
||||||
output: {
|
output: {
|
||||||
path: path.resolve(__dirname, '..'),
|
path: path.resolve(__dirname, '..', 'js', 'src'),
|
||||||
filename: "Frontend.js",
|
filename: "Frontend.js",
|
||||||
libraryTarget: 'commonjs',
|
libraryTarget: 'commonjs',
|
||||||
},
|
},
|
||||||
module: {
|
|
||||||
rules: [
|
|
||||||
{ test: /\.ts?$/, loader: "ts-loader" }
|
|
||||||
]
|
|
||||||
},
|
|
||||||
resolve: {
|
|
||||||
extensions: [".ts", ".tsx", ".js"]
|
|
||||||
},
|
|
||||||
optimization: {
|
|
||||||
minimize: true,
|
|
||||||
},
|
|
||||||
}
|
|
||||||
|
|
||||||
const backendConf = {
|
|
||||||
mode: 'production',
|
|
||||||
target: "node",
|
|
||||||
entry: path.resolve(__dirname, 'Backend.ts'),
|
|
||||||
output: {
|
|
||||||
path: path.resolve(__dirname, '..'),
|
|
||||||
filename: "Backend.js",
|
|
||||||
libraryTarget: 'commonjs'
|
|
||||||
},
|
|
||||||
module: {
|
|
||||||
rules: [
|
|
||||||
{ test: /\.ts?$/, loader: "ts-loader" }
|
|
||||||
]
|
|
||||||
},
|
|
||||||
resolve: {
|
resolve: {
|
||||||
extensions: [".ts", ".tsx", ".js"]
|
extensions: [".ts", ".tsx", ".js"]
|
||||||
},
|
},
|
||||||
@@ -44,4 +17,4 @@ const backendConf = {
|
|||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
module.exports = [backendConf, frontendConf]
|
module.exports = [frontendConf]
|
||||||
|
|||||||
@@ -1,47 +0,0 @@
|
|||||||
const path = require('path');
|
|
||||||
|
|
||||||
const frontendConf = {
|
|
||||||
mode: 'production',
|
|
||||||
target: "web",
|
|
||||||
entry: path.resolve(__dirname, 'TestFrontend.ts'),
|
|
||||||
output: {
|
|
||||||
path: path.resolve(__dirname, '..'),
|
|
||||||
filename: "TestFrontend.js",
|
|
||||||
libraryTarget: 'commonjs',
|
|
||||||
},
|
|
||||||
module: {
|
|
||||||
rules: [
|
|
||||||
{ test: /\.ts?$/, loader: "ts-loader" }
|
|
||||||
]
|
|
||||||
},
|
|
||||||
resolve: {
|
|
||||||
extensions: [".ts", ".tsx", ".js"]
|
|
||||||
},
|
|
||||||
optimization: {
|
|
||||||
minimize: true,
|
|
||||||
},
|
|
||||||
}
|
|
||||||
|
|
||||||
const backendConf = {
|
|
||||||
mode: 'production',
|
|
||||||
target: "node",
|
|
||||||
entry: path.resolve(__dirname, 'TestBackend.ts'),
|
|
||||||
output: {
|
|
||||||
path: path.resolve(__dirname, '..'),
|
|
||||||
filename: "TestBackend.js",
|
|
||||||
libraryTarget: 'commonjs',
|
|
||||||
},
|
|
||||||
module: {
|
|
||||||
rules: [
|
|
||||||
{ test: /\.ts?$/, loader: "ts-loader" }
|
|
||||||
]
|
|
||||||
},
|
|
||||||
resolve: {
|
|
||||||
extensions: [".ts", ".tsx", ".js"]
|
|
||||||
},
|
|
||||||
optimization: {
|
|
||||||
minimize: false,
|
|
||||||
},
|
|
||||||
}
|
|
||||||
|
|
||||||
module.exports = [backendConf, frontendConf]
|
|
||||||
+1
-1
@@ -9,6 +9,6 @@
|
|||||||
"strict": true,
|
"strict": true,
|
||||||
"experimentalDecorators": true
|
"experimentalDecorators": true
|
||||||
},
|
},
|
||||||
"include": ["src/**/*.ts", "test/**/*.ts"],
|
"include": ["src/**/*.ts", "test/**/*.ts", "Index.ts"],
|
||||||
"exclude": ["node_modules"]
|
"exclude": ["node_modules"]
|
||||||
}
|
}
|
||||||
Reference in New Issue
Block a user