Move demo copying code to eleventy config
diff --git a/.eleventy.js b/.eleventy.js
index 7f4d70d..f8d7b69 100644
--- a/.eleventy.js
+++ b/.eleventy.js
@@ -4,6 +4,12 @@
return JSON.stringify(input, null, ' ');
});
+ eleventyConfig.addPassthroughCopy({
+ // '...relative to this file': '...relative to `dir.output` below'
+ 'annotator/web/dist/demo/': 'demo/',
+ 'annotator/web/dist/style.css': 'style.css'
+ });
+
return {
dir: {
input: 'src',
diff --git a/package.json b/package.json
index 7ffa106..e1f1ff4 100644
--- a/package.json
+++ b/package.json
@@ -6,7 +6,7 @@
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1",
"build": "yarn run build:demo && eleventy",
- "build:demo": "(cd annotator && yarn run web:build && cd ..) && rm -rf content/demo content/style.css && cp -r annotator/web/dist/demo content/demo && cp annotator/web/dist/style.css content/",
+ "build:demo": "cd annotator && yarn run web:build",
"serve": "yarn run build:demo && eleventy --serve",
"postinstall": "cd annotator && yarn install"
},