--- a/cms/README.md Fri Jan 22 16:02:37 2016 +0100
+++ b/cms/README.md Fri Jan 22 16:03:37 2016 +0100
@@ -10,8 +10,10 @@
## Installation
-* `npm install --prefix app-client/` (install the dependencies of the ember app)
-* `npm install`
+* `npm install` (install gulp and some dependencies)
+* In the /app-client directory
+ * `npm install` (install the dependencies of the ember app)
+ * `bower install`
### Building
@@ -21,8 +23,29 @@
It will first run `npm run build --prefix app-client` which will build the ember app, and then run `gulp copy-module` to copy the built files into the module folder.
+**Don't Forget !**
+
+If the config/environnement.js has been modified, you must get the new meta line in dist/index.html
+> `<meta name="app-client/config/environment" content="ELEMENTS_FROM_CONFIG" />`
+
+And copy it in corpus_module/corpus.module in the function `corpus_page()`
+```php
+<?php
+function corpus_page() {
+...
+$element = array(
+ '#tag' => 'meta', // The #tag is the html tag - <link />
+ '#attributes' => array( // Set up an array of attributes inside the tag
+ 'name' => 'app-client/config/environment',
+ 'content' => 'ELEMENTS_FROM_CONFIG'
+ ),
+ );
+ ```
+
+ Finally replace the `baseStatic` value by `/'.drupal_get_path('module', 'corpus').'/app-client/`. This way, Drupal will fill the value with the correct path to the corpus module.
+
### Deploy
-Once the module has been updated with the correct built app, you can compress it and share it.
-To include the compressed module to a Drupal website, simply unzip the module and place it in the modules/ folder in your Drupal project.
-Report to the README inside the module folder for further informations.
+Once the module has been updated with the correct built app, you can **compress** it and **share it**.
+To include the compressed module to a Drupal website, simply **unzip** the module and place it in the `modules/ folder` in your Drupal project.
+Report to the **README** inside the module folder for further informations.
--- a/cms/app-client/README.md Fri Jan 22 16:02:37 2016 +0100
+++ b/cms/app-client/README.md Fri Jan 22 16:03:37 2016 +0100
@@ -22,7 +22,7 @@
## Running / Development
-* `ember server`
+* `npm start` (shortcut for `ember serve --environment=development` which serve the application)
* Visit your app at [http://localhost:4200](http://localhost:4200).
### Code Generators
@@ -34,20 +34,11 @@
* `ember test`
* `ember test --server`
-### Building
-
-* `ember build` (development)
-* `ember build --environment production` (production)
-
-### Deploying
-
-Specify what it takes to deploy your app.
+## Build / Production
-## Further Reading / Useful Links
+* `npm build` (shortcut for `ember build --environment=production` which serve the application)
+* Visit /dist to check the built files
-* [ember.js](http://emberjs.com/)
-* [ember-cli](http://www.ember-cli.com/)
-* Development Browser Extensions
- * [ember inspector for chrome](https://chrome.google.com/webstore/detail/ember-inspector/bmdblncegkenkacieihfhpjfppoconhi)
- * [ember inspector for firefox](https://addons.mozilla.org/en-US/firefox/addon/ember-inspector/)
+## Api configuration
+* As Ember advices, all the logic of the api (host, namespace), is located in /adapters/application.js
--- a/cms/corpus_module/corpus.module Fri Jan 22 16:02:37 2016 +0100
+++ b/cms/corpus_module/corpus.module Fri Jan 22 16:03:37 2016 +0100
@@ -38,7 +38,7 @@
'#tag' => 'meta', // The #tag is the html tag - <link />
'#attributes' => array( // Set up an array of attributes inside the tag
'name' => 'app-client/config/environment',
- 'content' => '%7B%22rootElement%22%3A%22%23corpus-app%22%2C%22modulePrefix%22%3A%22app-client%22%2C%22environment%22%3A%22production%22%2C%22baseURL%22%3A%22/corpus%22%2C%22APP%22%3A%7B%22baseStatic%22%3A%22%22%2C%22name%22%3A%22app-client%22%2C%22version%22%3A%220.0.0+%22%7D%2C%22contentSecurityPolicyHeader%22%3A%22Content-Security-Policy-Report-Only%22%2C%22contentSecurityPolicy%22%3A%7B%22default-src%22%3A%22%27none%27%22%2C%22script-src%22%3A%22%27self%27%20%27unsafe-eval%27%22%2C%22font-src%22%3A%22%27self%27%22%2C%22connect-src%22%3A%22%27self%27%22%2C%22img-src%22%3A%22%27self%27%22%2C%22style-src%22%3A%22%27self%27%22%2C%22media-src%22%3A%22%27self%27%22%7D%2C%22exportApplicationGlobal%22%3Atrue%7D'
+ 'content' => '%7B%22rootElement%22%3A%22%23corpus-app%22%2C%22modulePrefix%22%3A%22app-client%22%2C%22environment%22%3A%22production%22%2C%22baseURL%22%3A%22/corpus%22%2C%22APP%22%3A%7B%22baseStatic%22%3A%22/'.drupal_get_path('module', 'corpus').'/app-client/%22%2C%22name%22%3A%22app-client%22%2C%22version%22%3A%220.0.0+%22%7D%2C%22contentSecurityPolicyHeader%22%3A%22Content-Security-Policy-Report-Only%22%2C%22contentSecurityPolicy%22%3A%7B%22default-src%22%3A%22%27none%27%22%2C%22script-src%22%3A%22%27self%27%20%27unsafe-eval%27%22%2C%22font-src%22%3A%22%27self%27%22%2C%22connect-src%22%3A%22%27self%27%22%2C%22img-src%22%3A%22%27self%27%22%2C%22style-src%22%3A%22%27self%27%22%2C%22media-src%22%3A%22%27self%27%22%7D%2C%22exportApplicationGlobal%22%3Atrue%7D'
),
);