This is an automated email from the ASF dual-hosted git repository. bigbluehat pushed a commit to branch asf-site in repository https://gitbox.apache.org/repos/asf/incubator-annotator-website.git
commit 7ff94f4a6e0b3534296474b0f2e16e0c672dbd29 Author: Benjamin Young <[email protected]> AuthorDate: Thu Oct 8 16:31:07 2020 -0400 Move demo copying code to eleventy config --- .eleventy.js | 6 ++++++ package.json | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/.eleventy.js b/.eleventy.js index 7f4d70d..f8d7b69 100644 --- a/.eleventy.js +++ b/.eleventy.js @@ -4,6 +4,12 @@ module.exports = function(eleventyConfig) { 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" },
