From 044d6bd7761fde1b67b547580cce6142bb9681b0 Mon Sep 17 00:00:00 2001 From: David Evans Date: Tue, 1 May 2018 19:31:52 +0100 Subject: [PATCH] Restructure web resources to be within one folder --- .../contents.xcworkspacedata | 3 - bin/server.js | 6 +- docs/CONTRIBUTING.md | 7 +-- index.html | 6 +- library.htm | 2 +- package.json | 2 +- spec/support/eslintignore | 2 +- spec/support/karma.conf.js | 4 +- styles/readmeImages.css | 60 ------------------- {weblib => web/lib}/editor.js | 0 {weblib => web/lib}/editor.min.js | 0 web/{ => scripts}/editor.mjs | 2 +- .../interface/ComponentsLibrary.mjs | 0 .../interface/ComponentsLibrary_spec.mjs | 9 ++- web/{ => scripts}/interface/Interface.mjs | 2 +- .../interface/Interface_spec.mjs | 4 +- web/{ => scripts}/requireCDN.mjs | 0 web/{ => scripts}/rollup.config.js | 4 +- {styles => web/styles}/editor.css | 0 {styles => web/styles}/library.css | 0 20 files changed, 26 insertions(+), 87 deletions(-) delete mode 100644 styles/readmeImages.css rename {weblib => web/lib}/editor.js (100%) rename {weblib => web/lib}/editor.min.js (100%) rename web/{ => scripts}/editor.mjs (94%) rename web/{ => scripts}/interface/ComponentsLibrary.mjs (100%) rename web/{ => scripts}/interface/ComponentsLibrary_spec.mjs (76%) rename web/{ => scripts}/interface/Interface.mjs (99%) rename web/{ => scripts}/interface/Interface_spec.mjs (93%) rename web/{ => scripts}/requireCDN.mjs (100%) rename web/{ => scripts}/rollup.config.js (83%) rename {styles => web/styles}/editor.css (100%) rename {styles => web/styles}/library.css (100%) diff --git a/SequenceDiagram.xcworkspace/contents.xcworkspacedata b/SequenceDiagram.xcworkspace/contents.xcworkspacedata index e000973..313cd59 100644 --- a/SequenceDiagram.xcworkspace/contents.xcworkspacedata +++ b/SequenceDiagram.xcworkspace/contents.xcworkspacedata @@ -10,9 +10,6 @@ - - diff --git a/bin/server.js b/bin/server.js index 36a28f0..5666f01 100755 --- a/bin/server.js +++ b/bin/server.js @@ -46,9 +46,9 @@ statics .addResources('/', BASEDIR, [ 'index.html', 'library.htm', - 'styles', 'lib', - 'weblib', + 'web/lib', + 'web/styles', 'favicon.png', 'apple-touch-icon.png', ], devMapper); @@ -57,7 +57,7 @@ if(DEV) { statics.addResources('/', BASEDIR, [ 'node_modules/requirejs/require.js', 'scripts', - 'web', + 'web/scripts', ]); statics.setFileWatch(true); } diff --git a/docs/CONTRIBUTING.md b/docs/CONTRIBUTING.md index d04bf39..81f7794 100644 --- a/docs/CONTRIBUTING.md +++ b/docs/CONTRIBUTING.md @@ -68,7 +68,7 @@ The available commands are: * `npm run lint`: runs the linter against all source and test files * `npm run minify`: runs the `minify-lib` and `minify-web` commands * `npm run minify-lib`: minifies the library code in `/lib` -* `npm run minify-web`: minifies the web code in `/weblib` +* `npm run minify-web`: minifies the web code in `/web/lib` ## Project Structure @@ -93,8 +93,7 @@ The high-level structure is: Useful helpers can also be found in `/scripts/core/*` and `/scripts/svg/*`. -The live editor (index.htm) uses the source in `/web/editor.mjs` and -`/web/interface/*`. +The live editor (index.htm) uses the sources in `/web/scripts/`. ## Testing @@ -157,7 +156,7 @@ minified library (this is preferred but not required): npm run minify; ``` -This will update the files in `/lib` and `/weblib`. The minified code +This will update the files in `/lib` and `/web/lib`. The minified code is a self-contained copy of the `/scripts/sequence/SequenceDiagram.mjs` script, with some boiler-plate added to allow loading into a page in a variety of ways. diff --git a/index.html b/index.html index 35956ef..52c1ce0 100644 --- a/index.html +++ b/index.html @@ -31,7 +31,7 @@ crossorigin="anonymous" > - + - + /DEV --> @@ -78,7 +78,7 @@ integrity="sha256-0SGl1PJNDyJwcV5T+weg2zpEMrh7xvlwO4oXgvZCeZk=" crossorigin="anonymous" > - + diff --git a/library.htm b/library.htm index 71da1cc..5932d5f 100644 --- a/library.htm +++ b/library.htm @@ -25,7 +25,7 @@ integrity="sha256-I8NyGs4wjbMuBSUE40o55W6k6P7tu/7G28/JGUUYCIs=" crossorigin="anonymous" > - +