Skip to content

Commit

Permalink
Install vue-color and vue-cookie as ESM packages (#302)
Browse files Browse the repository at this point in the history
* install `vue-color` and `vue-cookie` as ESM packages

- delete folder `src/assets/vendors/vue-color/`
- delete folder `src/assets/vendors/vue/cookie/`
- update gulp task `concatenate:vendor_js`
- update tests config `test/config/vendors.js`
- add file `src/deprecated.js` in order to ensure backward compatibilities (ref: `window.VueColor` and `window.VueCookie`)

* code formatting

* update color listener (`@change-color` --> `@input`)
  • Loading branch information
Raruto authored Jan 18, 2023
1 parent dc8727b commit ec53d68
Show file tree
Hide file tree
Showing 11 changed files with 46 additions and 5,229 deletions.
2 changes: 0 additions & 2 deletions gulpfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -89,8 +89,6 @@ gulp.task('concatenate:vendor_js', function() {
g3w.assetsFolder + "/vendors/slimScroll/jquery.slimscroll.min.js",
g3w.assetsFolder + "/vendors/fastclick/fastclick.js",
g3w.assetsFolder + "/vendors/vue/vue.min.js",
g3w.assetsFolder + "/vendors/vue/cookie/vue-cookie.js",
g3w.assetsFolder + "/vendors/vue-color/vue-color.js",
g3w.assetsFolder + "/vendors/jquery-file-upload/jquery.fileupload.js",
g3w.assetsFolder + "/vendors/jquery-fileDownload/jquery.fileDownload.js",
g3w.assetsFolder + "/vendors/bootstrap-filestyle/bootstrap-filestyle.min.js",
Expand Down
2 changes: 2 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,8 @@
"regenerator-runtime": "^0.13.9",
"shp-write": "^0.3.2",
"vue": "2.6.12",
"vue-color": "^2.8.1",
"vue-cookie": "^1.1.4",
"vue-cookie-law": "^1.13.3"
},
"overrides": {
Expand Down
11 changes: 10 additions & 1 deletion src/app/main.js
100755 → 100644
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
// Backward compatibilies with old G3W-CLIENT plugins (eg. window variables)
import '../deprecated';

/**
* Add babel runtime support for compiled/transpiled async functions
*
Expand Down Expand Up @@ -108,7 +111,7 @@ Vue.filter('t', value => t(value));
Vue.filter('tPlugin', value => value !== null ? tPlugin(value) : '');

/**
* Install gloabl directives
* Install global directives
*
* ORIGINAL SOURCE: src/app/gui/vue/vue.directives.js@v3.6
*/
Expand All @@ -126,6 +129,12 @@ Vue.directive("plugins", vPlugins);
Vue.directive("online", vOnline);
Vue.directive("download", vDownload);


/**
* Install global plugins
*/
Vue.use(window.VueCookie);

/**
* Vue 2 Plugin used to add global-level functionality to Vue
*
Expand Down
Loading

0 comments on commit ec53d68

Please sign in to comment.