Update assets/README.md with fresher info

pull/2818/head
Yannick Warnier 7 years ago committed by GitHub
parent 4170484459
commit 9029223368
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 17
      assets/README.md

@ -1,20 +1,18 @@
# Managing CSS and JavaScript in Chamilo. # Managing CSS and JavaScript in Chamilo.
The folder "assets" will be processed by the js library Webpack Encore and the result The folder "assets" will be processed by the js library Webpack Encore and the result will be saved in public/build folder.
will be saved in public/build folder.
In order to accomplish this task, we first need to install yarn. For this, we first need to install yarn.
Yarn is a JavaScript dependencies manager similar to Bower (that we also used for development in Chamilo 1.11.x), Yarn is a JavaScript dependencies manager similar to Bower (that we also used for development in Chamilo 1.11.x),
only that Bower seems to be deprecated now. only that Bower is deprecated now.
Install yarn, follow the installation instructions here https://yarnpkg.com/en/docs/install To install yarn, follow the installation instructions here https://yarnpkg.com/en/docs/install
After the installation run this command in the Chamilo root: After the installation run this command in the Chamilo root:
``yarn install`` ``yarn install``
yarn will read the dependencies in the **packages.json** file and save the dependencies in the yarn will read the dependencies in the **packages.json** file and save the dependencies in the 'node_modules' folder (which must **NOT** be committed** to the Chamilo repository).
'node_modules' folder (which must **NOT** be committed** to the Chamilo repository).
# Configuring Encore/Webpack # Configuring Encore/Webpack
@ -35,15 +33,10 @@ To compile assets just once:
``yarn run encore dev`` ``yarn run encore dev``
To recompile assets automatically when files change:
``yarn run encore dev --watch``
To compile assets and minify & optimize them: To compile assets and minify & optimize them:
``yarn run encore production`` ``yarn run encore production``
For more detail information please visit: For more detail information please visit:
https://symfony.com/doc/current/frontend.html https://symfony.com/doc/current/frontend.html

Loading…
Cancel
Save