Subversion Repositories wimsdev

Rev

Rev 16497 | Rev 18248 | Go to most recent revision | Blame | Compare with Previous | Last modification | View Log | RSS feed

We use `Yarn` to automatically download JS packages/plugins,
And then we use `Grunt` to perform special tasks (concat, minify, verify ...)

# Installation
--------------

## Install Yarn :
*  See here : [install Yarn](https://yarnpkg.com)
    brew install yarn

## Install Grunt :
    yarn upgrade
    yarn global add grunt-cli


# Manage Packages
-----------------------

## Audit each dependency if there is a known issue to fix:
    yarn audit

## Update Javascripts plugins:
    yarn upgrade

# Download new Package(s)
-------------------------
    yarn add <package>

nb: When upgrading TinyMCE 6, you must also manually download language packs here :
https://www.tiny.cloud/get-tiny/language-packages/
(i.e for French : https://download.tiny.cloud/tinymce/community/languagepacks/6/fr_FR.zip)

# Migrate files from _packages/ to wims/
  #  After each update, Grunt is handy to automatically compress js + css, and move each files at is wims destination. simply call "grunt"

    grunt
    yarn run build

# Test & Check
After each js package update, look at these URL:
* jquery-ui
    * Tabs : [searchform](http://localhost/wims/?cmd=new&module=home&search_keywords=oef&search_category=A&search_lang=fr#searchform)
    * Menu : [H6/algebra/docnatural.fr](http://localhost/wims/?module=H6/algebra/docnatural.fr)
* jsXgraph
    * [U1/geometry/oeftiling.fr](http://localhost/wims/?module=U1/geometry/oeftiling.fr&cmd=new&exo=translation)
* CodeMirror 5
    * slib/coding/editor : [H4/programming/pixelart.fr](http://localhost/wims/wims.html?&cmd=new&module=H4/programming/pixelart.fr)
* jQuery
    * needed at least by Jquery UI
* jQuery-hoverintent
    * ??
* jQuery-ui-Slider-Pips
    * Level filter in "Searching for a teaching material" on WIMS home http://localhost/wims/
* slick-carousel
    * "Samples" on WIMS home http://localhost/wims/
* Marked
    * http://localhost/wims/wims.html?module=help%2Fwimsdoc.en&+cmd=new&+style=integral#anstype_content
* chart.js
    * http://localhost/wims/wims.html?cmd=new&module=adm%2Fstat%2Fstat&special_parm=module_updates 



# Cleaning
----------
    yarn cache clean
    yarn autoclean --force


#  Documentations
-----------------
* [Yarn docs](https://yarnpkg.com/docs)
* [Grunt HowTo (video fr)](http://www.grafikart.fr/tutoriels/grunt/grunt-introduction-470)
* [Grunt "getting started"](http://gruntjs.com/getting-started)