Subversion Repositories wimsdev

Rev

Rev 17733 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
18248 obado 1
# WIMS External packages
2
 
13570 obado 3
We use `Yarn` to automatically download JS packages/plugins,
11388 obado 4
And then we use `Grunt` to perform special tasks (concat, minify, verify ...)
9822 obado 5
 
18248 obado 6
## Installation
9822 obado 7
 
18248 obado 8
### Install Yarn
9822 obado 9
 
18248 obado 10
* See here: [install Yarn](https://yarnpkg.com)
9886 obado 11
 
18248 obado 12
```sh
13
brew install yarn
14
```
9886 obado 15
 
18248 obado 16
### Install Grunt
9886 obado 17
 
18248 obado 18
```sh
19
yarn upgrade
20
yarn global add grunt-cli
21
```
9822 obado 22
 
18248 obado 23
## Manage Packages
9886 obado 24
 
18248 obado 25
### Audit each dependency if there is a known issue to fix
10445 obado 26
 
18248 obado 27
```sh
28
yarn audit
29
```
30
 
31
### Update Javascripts plugins
32
 
33
```sh
34
yarn upgrade
35
```
36
 
37
## Download new Package(s)
38
 
39
```sh
40
yarn add <package>
41
```
42
 
17733 obado 43
nb: When upgrading TinyMCE 6, you must also manually download language packs here :
18248 obado 44
<https://www.tiny.cloud/get-tiny/language-packages/>
45
(i.e for French: <https://download.tiny.cloud/tinymce/community/languagepacks/6/fr_FR.zip>)
10445 obado 46
 
18248 obado 47
## Migrate files from _packages/ to wims/
10963 obado 48
 
18248 obado 49
  After each update, Grunt is handy to automatically compress js + css, and move each files at is wims destination. simply call "grunt"
10445 obado 50
 
18248 obado 51
```sh
52
grunt
53
yarn run build
54
```
55
 
56
## Test & Check
57
 
17733 obado 58
After each js package update, look at these URL:
18248 obado 59
 
17733 obado 60
* jquery-ui
18248 obado 61
  * Tabs : [searchform](http://localhost/wims/?cmd=new&module=home&search_keywords=oef&search_category=A&search_lang=fr#searchform)
62
  * Menu : [H6/algebra/docnatural.fr](http://localhost/wims/?module=H6/algebra/docnatural.fr)
17733 obado 63
* jsXgraph
18248 obado 64
  * [U1/geometry/oeftiling.fr](http://localhost/wims/?module=U1/geometry/oeftiling.fr&cmd=new&exo=translation)
65
* mathlive
66
  * ??
17733 obado 67
* CodeMirror 5
18248 obado 68
  * slib/coding/editor : [H4/programming/pixelart.fr](http://localhost/wims/wims.html?&cmd=new&module=H4/programming/pixelart.fr)
17733 obado 69
* jQuery
18248 obado 70
  * needed at least by Jquery UI
17733 obado 71
* jQuery-hoverintent
18248 obado 72
  * ??
17733 obado 73
* jQuery-ui-Slider-Pips
18248 obado 74
  * Level filter in "Searching for a teaching material" on WIMS home <http://localhost/wims/>
17733 obado 75
* slick-carousel
18248 obado 76
  * "Samples" on WIMS home <http://localhost/wims/>
17733 obado 77
* Marked
18248 obado 78
  * <http://localhost/wims/wims.html?module=help%2Fwimsdoc.en&+cmd=new&+style=integral#anstype_content>
17733 obado 79
* chart.js
18248 obado 80
  * <http://localhost/wims/wims.html?cmd=new&module=adm%2Fstat%2Fstat&special_parm=module_updates>
17733 obado 81
 
18248 obado 82
## Cleaning
17733 obado 83
 
18248 obado 84
```sh
85
yarn cache clean
86
yarn autoclean --force
87
```
17733 obado 88
 
18248 obado 89
## Documentations
16497 obado 90
 
13570 obado 91
* [Yarn docs](https://yarnpkg.com/docs)
10445 obado 92
* [Grunt HowTo (video fr)](http://www.grafikart.fr/tutoriels/grunt/grunt-introduction-470)
93
* [Grunt "getting started"](http://gruntjs.com/getting-started)