Преглед на файлове

HUE-8687 [frontend] Update sdk docs and licence file for npm and webpack bundling

Johan Ahlen преди 6 години
родител
ревизия
c40271f
променени са 3 файла, в които са добавени 76 реда и са изтрити 11 реда
  1. 37 0
      docs/sdk/sdk.md
  2. 38 10
      ext/thirdparty/README.md
  3. 1 1
      package.json

+ 37 - 0
docs/sdk/sdk.md

@@ -980,6 +980,43 @@ Building with
 ```
 make docs
 ```
+### Javascript
+
+The javascript files are currently being migrated to webpack bundles, during this process some files will live under src/desktop/static/ and some will live under src/dekstop/js
+
+#### For changes to the files under src/desktop/js the following applies:
+
+First make sure all third-party dependencies defined in package.json are installed into node_modules/
+
+```
+npm install
+```
+
+Also run this after making changes to package.json, adding new third-party dependencies etc.
+
+To generate the js bundles run:
+
+```
+npm run webpack
+```
+
+During development the bundles can be autogenerated when it detects changes to the .js files, for this run:
+
+```
+npm run dev
+```
+
+Before sending a review with changes to the bundles run:
+
+```
+npm run lint-fix
+```
+
+and possibly fix any issues it might report, after which you should again execute:
+
+```
+npm run webpack
+```
 
 ### CSS / LESS
 

+ 38 - 10
ext/thirdparty/README.md

@@ -103,11 +103,18 @@ Downloaded third party dependencies during build
 
 
 ---
-Checked-in frontend third party dependencies
+Frontend third party dependencies (some checked in and some via npm)
 
 |Project|Version|License|Source URL|
 |-------|-------|-------|----------|
 |Ace Editor|1.2.2|BSD|https://github.com/ajaxorg/ace|
+|Architect Build|0.1.1|None|https://www.npmjs.com/package/architect-build|
+|Babel cli|6.26.0|MIT|https://www.npmjs.com/package/babel-cli|
+|Babel Core|7.2.2|MIT|https://www.npmjs.com/package/babel-core|
+|Babel eslint|10.0.1|MIT|https://www.npmjs.com/package/babel-eslint|
+|Babel jscs|3.0.0-beta1|MIT|https://www.npmjs.com/package/babel-jscs|
+|Babel loader|8.0.5|MIT|https://www.npmjs.com/package/babel-loader|
+|Babel preset-env|7.3.1|MIT|https://www.npmjs.com/package/@babel/preset-env|
 |Bootstrap|2.3.2|Apache|https://github.com/twbs/bootstrap|
 |bootstrap slider|?|Apache|https://github.com/seiyria/bootstrap-slider|
 |bootstrap spinedit|?|Apache|https://github.com/geersch/bootstrap-spinedit|
@@ -121,16 +128,25 @@ Checked-in frontend third party dependencies
 |clipboard.js|1.7.1|MIT|https://zenorocha.github.io/clipboard.js|
 |Codemirror|3.11|MIT|https://github.com/codemirror/CodeMirror|
 |D3|3.5.2,4.4.4,5.7.0|BSD|https://github.com/d3/d3|
-|Dropzone.js|4.3.0|MIT|https://github.com/enyo/dropzone|
+|Dropzone.js|5.5.1|MIT|https://github.com/enyo/dropzone|
+|ESLint|5.12.1|MIT|https://www.npmjs.com/package/eslint|
+|ESLint config prettier|4.0.0|MIT|https://www.npmjs.com/package/eslint-config-prettier|
+|ESLint plugin prettier|3.0.1|MIT|https://www.npmjs.com/package/eslint-plugin-prettier|
+|Expose Loader|0.7.5|MIT|https://www.npmjs.com/package/expose-loader|
+|Dryice|0.4.11|None|https://www.npmjs.com/package/dryice|
 |django-debug-panel|0.8.3|BSD|https://pypi.org/project/django-debug-panel/0.8.3/|
 |django-debug-toolbar|1.3.2|BSD|https://pypi.python.org/pypi/django-debug-toolbar/1.3.2|
-|filesize.js|3.2.1|BSD|https://github.com/avoidwork/filesize.js|
+|filesize.js|4.0.0|BSD|https://github.com/avoidwork/filesize.js|
 |FileUploader|?|MIT|https://github.com/FineUploader/fine-uploader|
 |Freshereditor|?|None|https://github.com/mquan/freshereditor|
 |Gridster.js|0.7.0|MIT|https://github.com/dsmorse/gridster.js|
+|Grunt|1.0.3|MIT|https://www.npmjs.com/package//grunt|
+|Grunt contrib less|2.0.0|MIT|https://www.npmjs.com/package/grunt-contrib-less|
+|Grunt contrib uglify|4.0.0|MIT|https://www.npmjs.com/package/grunt-contrib-uglify|
+|Grunt contrib watch|1.1.0|MIT|https://www.npmjs.com/package/grunt-contrib-watch|
 |Jasmine|2.3.4|MIT|https://github.com/jasmine/jasmine|
 |jqCron|?|MIT|https://github.com/arnapou/jqcron|
-|jQuery|2.2.4|MIT|https://github.com/jquery/jquery|
+|jQuery|2.2.4+3.3.1|MIT|https://github.com/jquery/jquery|
 |jQuery Basic Table|?|MIT|https://github.com/jerrylow/basictable|
 |jQuery contextMenu|?|MIT|https://github.com/swisnl/jQuery-contextMenu|
 |jQuery Cookie|1.4.1|MIT|https://github.com/carhartl/jquery-cookie|
@@ -138,34 +154,46 @@ Checked-in frontend third party dependencies
 |jQuery dataTables|1.8.2|BSD|http://www.datatables.net|
 |jQuery fieldSelection|0.1.1|WTFPL|https://github.com/localhost/jquery-fieldselection|
 |jQuery Flot|0.8.2|MIT|https://github.com/flot/flot|
-|jQuery Form Plugin|3.51.0-2014.06.20|MIT|https://github.com/malsup/form|
+|jQuery Form Plugin|3.51.0-4.2.2|MIT|https://github.com/malsup/form|
 |jQuery Hotkeys Plugin|0.2.0|MIT|https://github.com/jeresig/jquery.hotkeys|
 |jQuery UI|1.10.4+1.12.1|MIT|https://github.com/jquery/jquery-ui|
 |jQuery visible|?|MIT|https://github.com/customd/jquery-visible|
+|Knockout Mapping|2.4.3|MIT|https://www.npmjs.com/package/knockout.mapping|
+|Knockout Sortable|1.1.0|MIT|https://www.npmjs.com/package/knockout-sortable|
 |Knockout Switch/Case|2.0.1|MIT|https://github.com/mbest/knockout-switch-case|
 |Knockout Validation|2.0.3|MIT|https://github.com/Knockout-Contrib/Knockout-Validation|
 |KnockoutJS|3.4.2|MIT|https://github.com/knockout/knockout|
 |Leaflet|0.7.2|BSD|https://github.com/Leaflet/Leaflet|
 |Leaflet Heat|?|BSD|https://github.com/mourner/simpleheat|
 |Leaflet ZoomBox|?|ISC|https://github.com/consbio/Leaflet.ZoomBox|
-|LESS|1.7.0|Apache|https://github.com/less/less.js/|
-|LocalForage|1.5.4|Apache|https://github.com/localForage/localForage|
+|LESS|3.9.0|Apache|https://github.com/less/less.js/|
+|Load Grunt Tasks|4.0.0|MIT|https://www.npmjs.com/package/load-grunt-tasks|
+|LocalForage|1.7.3|Apache|https://github.com/localForage/localForage|
+|Lodash|4.17.11|MIT|https://www.npmjs.com/package/lodash|
 |Markdown.js|?|MIT|https://github.com/cadorn/markdown-js|
-|Medium Editor|?|MIT|https://github.com/yabwe/medium-editor|
+|Medium Editor|5.23.3|MIT|https://github.com/yabwe/medium-editor|
 |Moment.js|2.13.0|MIT|https://momentjs.com|
+|Minimist|1.2.0|MIT|https://www.npmjs.com/package/minimist|
 |Mustache.js|0.7.2|MIT|http://github.com/janl/mustache.js|
 |nvd3|1.1.15b|Apache|https://github.com/novus/nvd3|
-|page.js|1.7.1|MIT|https://github.com/visionmedia/page.js|
+|page.js|1.8.6|MIT|https://github.com/visionmedia/page.js|
 |Plotly.js|1.31.0|MIT|https://github.com/plotly/plotly.js/|
+|Prettier|1.16.1|MIT|https://www.npmjs.com/package/prettier|
 |Select2|3.5.1|MIT|https://github.com/select2/select2|
-|Selectize.js|0.12.3|Apache|https://github.com/selectize/selectize.js|
+|Selectize.js|0.12.6|Apache|https://github.com/selectize/selectize.js|
+|Selectize Clear Plugin|0.0.3|Apache|https://www.npmjs.com/package/selectize-plugin-clear|
 |Shepherd|1.8.1|MIT|https://github.com/HubSpot/shepherd|
 |Shortcut.js|2.01.B|BSD|http://www.openjs.com/scripts/events/keyboard_shortcuts/|
+|Sprintf-js|1.1.2|BSD|https://www.npmjs.com/package/sprintf-js|
 |Tether|0.6.5|MIT|https://github.com/HubSpot/tether|
 |TopoJSON|1.0.0|BSD|https://github.com/topojson/topojson|
 |TotalStorage|1.1.3|MIT|https://github.com/Upstatement/jquery-total-storage|
 |TouchSwipe|1.6.18|MIT|https://github.com/mattbryson/TouchSwipe-Jquery-Plugin|
 |TouchSwipe|1.6.18|MIT|https://github.com/mattbryson/TouchSwipe-Jquery-Plugin|
 |tzdetect.js|?|MIT|https://github.com/Canop/tzdetect.js|
+|Webpack|4.29.0|MIT|https://www.npmjs.com/package/webpack|
+|Webpack Bundel Tracker|0.4.2-beta|MIT|https://www.npmjs.com/package/webpack-bundle-tracker|
+|Webpack cli|3.2.1|MIT|https://www.npmjs.com/package/webpack-cli|
+|Webpack clean plugin|1.0.1|MIT|https://www.npmjs.com/package/clean-webpack-plugin|
 |wysihtml5|0.3.0|MIT|https://github.com/xing/wysihtml5|
 |X-editable|1.5.1|MIT|http://github.com/vitalets/x-editable|"

+ 1 - 1
package.json

@@ -39,8 +39,8 @@
     "sprintf-js": "1.1.2"
   },
   "devDependencies": {
-    "@babel/core": "7.2.2",
     "architect-build": "0.1.1",
+    "@babel/core": "7.2.2",
     "@babel/preset-env": "7.3.1",
     "babel-cli": "6.26.0",
     "babel-eslint": "10.0.1",