diff --git a/.vscode/tasks.json b/.vscode/tasks.json new file mode 100644 index 0000000..eab2057 --- /dev/null +++ b/.vscode/tasks.json @@ -0,0 +1,23 @@ +{ + // See https://go.microsoft.com/fwlink/?LinkId=733558 + // for the documentation about the tasks.json format + "version": "0.1.0", + "command": "npm", + "isShellCommand": true, + "showOutput": "always", + "suppressTaskName": true, + "tasks": [ + { + "taskName": "install", + "args": ["install"] + }, + { + "taskName": "update", + "args": ["update"] + }, + { + "taskName": "test", + "args": ["run", "test"] + } + ] +} \ No newline at end of file diff --git a/client/dcwebui.js b/client/dcwebui.js index 810659c..c73bf9d 100644 --- a/client/dcwebui.js +++ b/client/dcwebui.js @@ -1,5 +1,8 @@ /* dcwebui.js */ + require("./dcwebui.css"); + require("./socket.io-1.7.2.js"); + "use strict"; var SENTINEL_PASSWORD = "************"; diff --git a/client/index.htm b/client/index.htm index bb3ae4f..9bf1e17 100644 --- a/client/index.htm +++ b/client/index.htm @@ -5,8 +5,7 @@ - - + Loading... @@ -56,7 +55,6 @@ - - + diff --git a/package.json b/package.json index 4afcdaa..1131dce 100644 --- a/package.json +++ b/package.json @@ -4,7 +4,7 @@ "description": "", "main": "s", "scripts": { - "test": "echo \"Error: no test specified\" && exit 1" + "build": "webpack && cp client/index.htm clientpack" }, "repository": { "type": "git", @@ -13,9 +13,14 @@ "author": "", "license": "ISC", "dependencies": { + "css-loader": "^0.28.7", "html-minifier": "^3.5.6", "less": "^2.7.3", "less-plugin-clean-css": "^1.5.1", + "style-loader": "^0.19.0", "uglify-js": "^3.1.8" + }, + "devDependencies": { + "webpack": "^3.8.1" } } diff --git a/webpack.config.js b/webpack.config.js new file mode 100644 index 0000000..d14067f --- /dev/null +++ b/webpack.config.js @@ -0,0 +1,21 @@ +var webpack = require("webpack"); + +module.exports = { + entry: "./client/dcwebui.js", + output: { + path: __dirname, + filename: "clientpack/bundle.js" + }, + module: { + loaders: [ + { test: /\.css$/, loader: "style-loader!css-loader" } + ] + }, + plugins: [ + new webpack.optimize.UglifyJsPlugin({ + compress: { + warnings: false + } + }) + ] +}; \ No newline at end of file