# HG changeset patch # User Alexandre Segura # Date 1486379413 -3600 # Node ID 44ecdd5a52d42511cf5eb16859d097d2e0f90080 # Parent e04028381f827b97bc03cecd7175d3ed6dcbf1e9 Configure Webpack dev server for standalone JS development. diff -r e04028381f82 -r 44ecdd5a52d4 README.md --- a/README.md Mon Feb 06 11:50:20 2017 +0100 +++ b/README.md Mon Feb 06 12:10:13 2017 +0100 @@ -39,6 +39,14 @@ ``` If `JS_DEV_MODE` is set to `True`, the Webpack dev server should be started. +- To serve the annotator on a standalone page using Webpack dev server + +``` +npm run standalone +``` + +Go to `http://localhost:8001/webpack-dev-server/`. The page will reload by itself when the JS/CSS code is changed. + #### Django project setup - Copy iconolab/src/settings/dev.py.tmpl into iconolab/src/settings/dev.py, adapt content to configuration diff -r e04028381f82 -r 44ecdd5a52d4 package.json --- a/package.json Mon Feb 06 11:50:20 2017 +0100 +++ b/package.json Mon Feb 06 12:10:13 2017 +0100 @@ -6,7 +6,8 @@ "scripts": { "start": "webpack --progress --colors --watch", "build": "cross-env NODE_ENV=production webpack --progress --hide-modules", - "watch": "webpack-dev-server" + "watch": "webpack-dev-server", + "standalone": "webpack-dev-server --content-base src_js/iconolab-bundle/" }, "dependencies": { "bootstrap": "^3.3.6", diff -r e04028381f82 -r 44ecdd5a52d4 src_js/iconolab-bundle/img/image.jpg Binary file src_js/iconolab-bundle/img/image.jpg has changed diff -r e04028381f82 -r 44ecdd5a52d4 src_js/iconolab-bundle/img/main-image.jpg Binary file src_js/iconolab-bundle/img/main-image.jpg has changed diff -r e04028381f82 -r 44ecdd5a52d4 src_js/iconolab-bundle/img/small-image.jpg Binary file src_js/iconolab-bundle/img/small-image.jpg has changed diff -r e04028381f82 -r 44ecdd5a52d4 src_js/iconolab-bundle/index.html --- a/src_js/iconolab-bundle/index.html Mon Feb 06 11:50:20 2017 +0100 +++ b/src_js/iconolab-bundle/index.html Mon Feb 06 12:10:13 2017 +0100 @@ -3,12 +3,86 @@ iconolab-bundle + + -
- - -
- +
+
+ +
+
+
+ + + + + + + + + + + + + + + + + + + + + +
+
    +
  • Sélectionner le détail
  • +
  • Afficher la zone
  • +
  • Masquer la zone
  • + + +
+
+
+
+
+ + +