Skip to content
Snippets Groups Projects
Commit 24c2c834 authored by Reiter, Christoph's avatar Reiter, Christoph :snake:
Browse files

Add a demo page and make "run watch" work

parent 2aa2c424
No related branches found
No related tags found
No related merge requests found
<!doctype html>
<html>
<head>
<meta charset="UTF-8">
<script type="module" src="bundle.js"></script>
<style>
body {
font-family: sans;
}
</style>
</head>
<body>
<p>
Spinner: <vpu-mini-spinner></vpu-mini-spinner>
</p>
</body>
</html>
import './vpu-mini-spinner.js';
\ No newline at end of file
......@@ -3,25 +3,28 @@
"version": "1.0.1",
"module": "index.js",
"devDependencies": {
"chai": "^4.2.0",
"karma": "^4.2.0",
"karma-chai": "^0.1.0",
"karma-chrome-launcher": "^3.0.0",
"karma-mocha": "^1.3.0",
"mocha": "^6.2.0",
"node-sass": "^4.12.0",
"puppeteer": "^1.15.0",
"mocha": "^6.2.0",
"chai": "^4.2.0",
"rollup": "^1.11.3",
"rollup-plugin-commonjs": "^10.0.2",
"rollup-plugin-copy": "^3.1.0",
"rollup-plugin-multi-entry": "^2.1.0",
"rollup-plugin-node-resolve": "^5.2.0",
"rollup-plugin-replace": "^2.2.0",
"rollup-plugin-multi-entry": "^2.1.0"
"rollup-plugin-serve": "^1.0.1"
},
"scripts": {
"clean": "rm dist/*",
"build": "rollup -c",
"build-test": "rollup -c --environment BUILD:test",
"test": "npm run build-test && karma start --singleRun"
"test": "npm run build-test && karma start --singleRun",
"watch": "rollup -c --watch"
},
"dependencies": {
"i18next": "^17.0.11",
......
......@@ -3,12 +3,14 @@ import resolve from 'rollup-plugin-node-resolve';
import commonjs from 'rollup-plugin-commonjs';
import replace from "rollup-plugin-replace";
import multiEntry from 'rollup-plugin-multi-entry';
import copy from 'rollup-plugin-copy';
import serve from 'rollup-plugin-serve';
const build = (typeof process.env.BUILD !== 'undefined') ? process.env.BUILD : 'local';
console.log("build: " + build);
export default {
input: (build !='test') ? 'index.js' : 'test/**/*.js',
input: (build !='test') ? 'demo.js' : 'test/**/*.js',
output: {
file: 'dist/bundle.js',
format: 'esm'
......@@ -26,6 +28,12 @@ export default {
}),
replace({
"process.env.BUILD": '"' + build + '"',
})
}),
copy({
targets: [
{src: 'assets/index.html', dest: 'dist'},
],
}),
(process.env.ROLLUP_WATCH === 'true') ? serve({contentBase: 'dist', host: '127.0.0.1', port: 8002}) : false
]
};
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment