Skip to content

Commit

Permalink
Install util-deprecate package (#452)
Browse files Browse the repository at this point in the history
* install `util-deprecate` package

* #452 (comment)

* remove deprecated `import "regenerator-runtime"`

* Set external dependencies for both production or deveopment enviroment.

* bump `gulp-uglify` from 1.5.4 to 3.0.2

* drop unreferenced import

* Update gulpfile.js

---------

Co-authored-by: volterra79 <boccacci.francesco@gmail.com>
  • Loading branch information
Raruto and volterra79 committed Aug 17, 2023
1 parent 50b33dc commit 0f79d9b
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 17 deletions.
13 changes: 5 additions & 8 deletions gulpfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ const __H1 = __INFO + "\n";


// Retrieve project dependencies ("g3w-client")
const dependencies = Object.keys(packageJSON.dependencies).filter(dep => dep !== 'vue');
const dependencies = Object.keys(packageJSON.dependencies).filter(dep => 'vue' !== dep);

// Built-in client plugins
const default_plugins = [
Expand Down Expand Up @@ -181,16 +181,12 @@ gulp.task('browserify:app', function() {
imgurify
]
});

dependencies.forEach(dep => bundler.external(dep)); // exclude external npm dependencies

if (production) {
bundler.ignore('./src/index.dev.js'); // ignore dev index file (just to be safe)
dependencies.forEach(dep => bundler.external(dep)); // add external module node_modules on vendor
} else {
bundler.on('prebundle', bundle => {
dependencies.forEach(dep => {
bundle.external(dep);
bundle.require(dep);
});
});
bundler = watchify(bundler);
}

Expand All @@ -213,6 +209,7 @@ gulp.task('browserify:app', function() {
.pipe(gulpif(production, sourcemaps.write('.')))
.pipe(gulp.dest(outputFolder + '/static/client/js/'));


if (production) {
rebundle = () => bundle();
} else {
Expand Down
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
"homepage": "https://github.com/g3w-suite/g3w-client.git",
"dependencies": {
"lodash.clonedeep": "^4.5.0",
"util-deprecate": "^1.0.2",
"shp-write": "^0.3.2",
"vue": "2.6.12",
"vue-color": "^2.8.1",
Expand Down Expand Up @@ -82,7 +83,7 @@
"gulp-replace": "^0.6.1",
"gulp-sourcemaps": "^1.6.0",
"gulp-streamify": "^1.0.2",
"gulp-uglify": "^1.5.4",
"gulp-uglify": "^3.0.2",
"gulp-useref": "^3.0.7",
"gulp-watch": "^4.3.5",
"imgurify": "^2.0.1",
Expand Down
7 changes: 0 additions & 7 deletions src/deprecated.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,6 @@
* @since v3.8
*/

/**
* Add babel runtime support for compiled/transpiled async functions
*
* @TODO check if this still useful nowdays (IE 11 ?)
*/
import "regenerator-runtime";

import * as VueColor from 'vue-color';

/**
Expand Down
1 change: 0 additions & 1 deletion src/index.prod.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ import ApplicationState from 'store/application-state';

//import services
import ApplicationService from 'services/application';
import viewport from "services/viewport";
import GUI from 'services/gui';
import FloatbarService from "services/floatbar";
import NavbarItemsService from 'services/navbaritems';
Expand Down

0 comments on commit 0f79d9b

Please sign in to comment.