add sourcemaps to gulp pipelines
This commit is contained in:
parent
11d96c44d1
commit
a1558fa00f
5 changed files with 2592 additions and 2441 deletions
|
@ -7,6 +7,7 @@ APP_CLEAR_TASKLOG=720
|
||||||
APP_DELETE_MINUTES=10
|
APP_DELETE_MINUTES=10
|
||||||
APP_ENVIRONMENT_ONLY=true
|
APP_ENVIRONMENT_ONLY=true
|
||||||
LOG_CHANNEL=daily
|
LOG_CHANNEL=daily
|
||||||
|
APP_
|
||||||
|
|
||||||
DB_HOST=127.0.0.1
|
DB_HOST=127.0.0.1
|
||||||
DB_PORT=3306
|
DB_PORT=3306
|
||||||
|
|
|
@ -10,6 +10,7 @@ const uglify = require('gulp-uglify-es').default;
|
||||||
const webpackStream = require('webpack-stream');
|
const webpackStream = require('webpack-stream');
|
||||||
const webpackConfig = require('./webpack.config.js');
|
const webpackConfig = require('./webpack.config.js');
|
||||||
const sourcemaps = require('gulp-sourcemaps');
|
const sourcemaps = require('gulp-sourcemaps');
|
||||||
|
const through = require('through2');
|
||||||
|
|
||||||
const argv = require('yargs')
|
const argv = require('yargs')
|
||||||
.default('production', false)
|
.default('production', false)
|
||||||
|
@ -29,6 +30,11 @@ const paths = {
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
|
const clearSourcemaps = through.obj(function (file, enc, cb) {
|
||||||
|
if (!/\.map$/.test(file.path)) this.push(file);
|
||||||
|
cb();
|
||||||
|
});
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Build un-compiled CSS into a minified version.
|
* Build un-compiled CSS into a minified version.
|
||||||
*/
|
*/
|
||||||
|
@ -56,7 +62,8 @@ function styles() {
|
||||||
*/
|
*/
|
||||||
function scripts() {
|
function scripts() {
|
||||||
return webpackStream(webpackConfig)
|
return webpackStream(webpackConfig)
|
||||||
.pipe(sourcemaps.init())
|
.pipe(sourcemaps.init({loadMaps: true}))
|
||||||
|
.pipe(clearSourcemaps)
|
||||||
.pipe(babel())
|
.pipe(babel())
|
||||||
.pipe(gulpif(argv.production, uglify()))
|
.pipe(gulpif(argv.production, uglify()))
|
||||||
.pipe(concat('bundle.js'))
|
.pipe(concat('bundle.js'))
|
||||||
|
|
5006
package-lock.json
generated
5006
package-lock.json
generated
File diff suppressed because it is too large
Load diff
16
package.json
16
package.json
|
@ -1,6 +1,9 @@
|
||||||
{
|
{
|
||||||
"name": "pterodactyl-panel",
|
"name": "pterodactyl-panel",
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
|
"@fortawesome/fontawesome": "^1.1.8",
|
||||||
|
"@fortawesome/fontawesome-free-solid": "^5.0.13",
|
||||||
|
"@fortawesome/vue-fontawesome": "0.0.22",
|
||||||
"autoprefixer": "^8.2.0",
|
"autoprefixer": "^8.2.0",
|
||||||
"axios": "^0.18.0",
|
"axios": "^0.18.0",
|
||||||
"babel-cli": "6.18.0",
|
"babel-cli": "6.18.0",
|
||||||
|
@ -22,6 +25,7 @@
|
||||||
"gulp-postcss": "^7.0.1",
|
"gulp-postcss": "^7.0.1",
|
||||||
"gulp-rename": "^1.2.2",
|
"gulp-rename": "^1.2.2",
|
||||||
"gulp-rev": "^8.1.1",
|
"gulp-rev": "^8.1.1",
|
||||||
|
"gulp-sourcemaps": "^2.6.4",
|
||||||
"gulp-uglify-es": "^1.0.1",
|
"gulp-uglify-es": "^1.0.1",
|
||||||
"jquery": "^3.3.1",
|
"jquery": "^3.3.1",
|
||||||
"jwt-decode": "^2.2.0",
|
"jwt-decode": "^2.2.0",
|
||||||
|
@ -30,7 +34,10 @@
|
||||||
"postcss-import": "^11.1.0",
|
"postcss-import": "^11.1.0",
|
||||||
"postcss-preset-env": "^3.4.0",
|
"postcss-preset-env": "^3.4.0",
|
||||||
"postcss-scss": "^1.0.4",
|
"postcss-scss": "^1.0.4",
|
||||||
|
"precss": "^3.1.2",
|
||||||
|
"pug-plain-loader": "^1.0.0",
|
||||||
"tailwindcss": "^0.5.1",
|
"tailwindcss": "^0.5.1",
|
||||||
|
"through2": "^2.0.3",
|
||||||
"vee-validate": "^2.0.9",
|
"vee-validate": "^2.0.9",
|
||||||
"vue": "^2.5.7",
|
"vue": "^2.5.7",
|
||||||
"vue-axios": "^2.1.1",
|
"vue-axios": "^2.1.1",
|
||||||
|
@ -44,6 +51,7 @@
|
||||||
"vuex-i18n": "^1.10.5",
|
"vuex-i18n": "^1.10.5",
|
||||||
"webpack": "^4.4.1",
|
"webpack": "^4.4.1",
|
||||||
"webpack-stream": "^4.0.3",
|
"webpack-stream": "^4.0.3",
|
||||||
|
"xterm": "^3.4.1",
|
||||||
"yargs": "^11.0.0"
|
"yargs": "^11.0.0"
|
||||||
},
|
},
|
||||||
"scripts": {
|
"scripts": {
|
||||||
|
@ -52,13 +60,5 @@
|
||||||
"build": "./node_modules/gulp-cli/bin/gulp.js default",
|
"build": "./node_modules/gulp-cli/bin/gulp.js default",
|
||||||
"build:styles": "./node_modules/gulp-cli/bin/gulp.js styles",
|
"build:styles": "./node_modules/gulp-cli/bin/gulp.js styles",
|
||||||
"build:scripts": "./node_modules/gulp-cli/bin/gulp.js scripts"
|
"build:scripts": "./node_modules/gulp-cli/bin/gulp.js scripts"
|
||||||
},
|
|
||||||
"dependencies": {
|
|
||||||
"@fortawesome/fontawesome": "^1.1.8",
|
|
||||||
"@fortawesome/fontawesome-free-solid": "^5.0.13",
|
|
||||||
"@fortawesome/vue-fontawesome": "0.0.22",
|
|
||||||
"gulp-sourcemaps": "^2.6.4",
|
|
||||||
"precss": "^3.1.2",
|
|
||||||
"pug-plain-loader": "^1.0.0"
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -39,4 +39,5 @@ module.exports = {
|
||||||
extensions: ['*', '.js', '.vue', '.json']
|
extensions: ['*', '.js', '.vue', '.json']
|
||||||
},
|
},
|
||||||
plugins: [],
|
plugins: [],
|
||||||
|
devtool: '#source-map',
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in a new issue