| 40 | == Javascript: from npm to bower == |
| 41 | * $ nice -n 127 ionice --class=idle npm install bower --save |
| 42 | * $ nice -n 127 ionice --class=idle npm update #! |
| 43 | * $ nice -n 127 ionice --class=idle nodejs node_modules/bower/bin/bower init |
| 44 | * $ nice -n 127 ionice --class=idle nodejs node_modules/bower/bin/bower update --production #! |
| 45 | |
| 46 | == Install Javascript libraries with Bower package manager |
| 47 | * $ nodejs node_modules/bower/bin/bower install --save ckeditor#full/stable |
| 48 | * $ nodejs node_modules/bower/bin/bower install --save jquery#1.4.4 # Drupal 7 version |
| 49 | * $ nodejs node_modules/bower/bin/bower install --save jquery-colorbox # depends on jquery |
| 50 | |
| 51 | * $ ls bower_components/ |
| 52 | |
| 53 | * https://packagist.org/packages/ckeditor/ckeditor |
| 54 | * Supported Editors Matrix https://www.drupal.org/node/596966 |
| 55 | * jquery version for Drupal 7 https://www.drupal.org/node/171213 |
| 56 | * same with jQuery Update module https://www.drupal.org/project/jquery_update |
| 57 | * https://packagist.org/packages/kraksoft/colorbox |
| 58 | * https://github.com/Spea/SpBowerBundle |
| 59 | == Example bower.json for Drupal 7 == |
| 60 | {{{ |
| 61 | #!application/json |
| 62 | { |
| 63 | "name": "drupal7", |
| 64 | "private": true, |
| 65 | "ignore": [ |
| 66 | "**/.*", |
| 67 | "node_modules", |
| 68 | "bower_components", |
| 69 | "test", |
| 70 | "tests" |
| 71 | ], |
| 72 | "dependencies": { |
| 73 | "ckeditor": "#full/stable", |
| 74 | "jquery": "1.4.4", |
| 75 | "jquery-colorbox": "^1.6.3" |
| 76 | } |
| 77 | } |
| 78 | }}} |