Rev 18248 | 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 |
18584 | obado | 52 | # First, compile JSXGraph |
53 | cd node_modules/jsxgraph |
||
54 | npm install |
||
55 | npm run buildCore |
||
56 | # Then, do WIMS things |
||
57 | cd ../.. |
||
18248 | obado | 58 | grunt |
59 | yarn run build |
||
60 | ``` |
||
61 | |||
62 | ## Test & Check |
||
63 | |||
17733 | obado | 64 | After each js package update, look at these URL: |
18248 | obado | 65 | |
17733 | obado | 66 | * jquery-ui |
18248 | obado | 67 | * Tabs : [searchform](http://localhost/wims/?cmd=new&module=home&search_keywords=oef&search_category=A&search_lang=fr#searchform) |
68 | * Menu : [H6/algebra/docnatural.fr](http://localhost/wims/?module=H6/algebra/docnatural.fr) |
||
17733 | obado | 69 | * jsXgraph |
18248 | obado | 70 | * [U1/geometry/oeftiling.fr](http://localhost/wims/?module=U1/geometry/oeftiling.fr&cmd=new&exo=translation) |
71 | * mathlive |
||
72 | * ?? |
||
17733 | obado | 73 | * CodeMirror 5 |
18248 | obado | 74 | * slib/coding/editor : [H4/programming/pixelart.fr](http://localhost/wims/wims.html?&cmd=new&module=H4/programming/pixelart.fr) |
17733 | obado | 75 | * jQuery |
18248 | obado | 76 | * needed at least by Jquery UI |
17733 | obado | 77 | * jQuery-hoverintent |
18248 | obado | 78 | * ?? |
17733 | obado | 79 | * jQuery-ui-Slider-Pips |
18248 | obado | 80 | * Level filter in "Searching for a teaching material" on WIMS home <http://localhost/wims/> |
17733 | obado | 81 | * slick-carousel |
18248 | obado | 82 | * "Samples" on WIMS home <http://localhost/wims/> |
17733 | obado | 83 | * Marked |
18248 | obado | 84 | * <http://localhost/wims/wims.html?module=help%2Fwimsdoc.en&+cmd=new&+style=integral#anstype_content> |
17733 | obado | 85 | * chart.js |
18248 | obado | 86 | * <http://localhost/wims/wims.html?cmd=new&module=adm%2Fstat%2Fstat&special_parm=module_updates> |
17733 | obado | 87 | |
18248 | obado | 88 | ## Cleaning |
17733 | obado | 89 | |
18248 | obado | 90 | ```sh |
91 | yarn cache clean |
||
92 | yarn autoclean --force |
||
93 | ``` |
||
17733 | obado | 94 | |
18248 | obado | 95 | ## Documentations |
16497 | obado | 96 | |
13570 | obado | 97 | * [Yarn docs](https://yarnpkg.com/docs) |
10445 | obado | 98 | * [Grunt HowTo (video fr)](http://www.grafikart.fr/tutoriels/grunt/grunt-introduction-470) |
99 | * [Grunt "getting started"](http://gruntjs.com/getting-started) |
||
18584 | obado | 100 | |
101 | ## JSXGraph |
||
102 | |||
103 | ```sh |
||
104 | cd node_modules/jsxgraph |
||
105 | npm install |
||
106 | npm run buildCore |
||
107 | ``` |