aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.gitignore1
-rw-r--r--.gitlab-ci.yml16
-rw-r--r--examples/web-demo/package.json2
3 files changed, 18 insertions, 1 deletions
diff --git a/.gitignore b/.gitignore
index 7cd53fd..e73ed4c 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1 +1,2 @@
**/node_modules/
+/examples/web-demo/public/
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
new file mode 100644
index 0000000..9aac6cc
--- /dev/null
+++ b/.gitlab-ci.yml
@@ -0,0 +1,16 @@
+# GitLab CI to build the web-demo application
+image: node:latest
+
+pages:
+ cache:
+ paths:
+ - examples/web-demo/node_modules/
+ script:
+ - cd examples/web-demo
+ - npm install
+ - npm run build
+ artifacts:
+ paths:
+ - examples/web-demo/public
+ only:
+ - master
diff --git a/examples/web-demo/package.json b/examples/web-demo/package.json
index 24f507a..04da3ac 100644
--- a/examples/web-demo/package.json
+++ b/examples/web-demo/package.json
@@ -5,7 +5,7 @@
"main": "index.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1",
- "build": "npx -c 'browserify src/index.js -o index.js'",
+ "build": "mkdir -p public; cp index.html alice-in-wonderland.txt style.css public/; npx -c 'browserify src/index.js -o public/index.js'",
"watch": "npx -c 'watchify src/index.js -o index.js'"
},
"author": "pukkamustard",