mirror of
https://github.com/pterodactyl/panel.git
synced 2024-11-22 09:02:28 +01:00
add sourcemaps to gulp pipelines
This commit is contained in:
parent
11d96c44d1
commit
a1558fa00f
@ -7,6 +7,7 @@ APP_CLEAR_TASKLOG=720
|
||||
APP_DELETE_MINUTES=10
|
||||
APP_ENVIRONMENT_ONLY=true
|
||||
LOG_CHANNEL=daily
|
||||
APP_
|
||||
|
||||
DB_HOST=127.0.0.1
|
||||
DB_PORT=3306
|
||||
|
@ -10,6 +10,7 @@ const uglify = require('gulp-uglify-es').default;
|
||||
const webpackStream = require('webpack-stream');
|
||||
const webpackConfig = require('./webpack.config.js');
|
||||
const sourcemaps = require('gulp-sourcemaps');
|
||||
const through = require('through2');
|
||||
|
||||
const argv = require('yargs')
|
||||
.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.
|
||||
*/
|
||||
@ -56,7 +62,8 @@ function styles() {
|
||||
*/
|
||||
function scripts() {
|
||||
return webpackStream(webpackConfig)
|
||||
.pipe(sourcemaps.init())
|
||||
.pipe(sourcemaps.init({loadMaps: true}))
|
||||
.pipe(clearSourcemaps)
|
||||
.pipe(babel())
|
||||
.pipe(gulpif(argv.production, uglify()))
|
||||
.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",
|
||||
"devDependencies": {
|
||||
"@fortawesome/fontawesome": "^1.1.8",
|
||||
"@fortawesome/fontawesome-free-solid": "^5.0.13",
|
||||
"@fortawesome/vue-fontawesome": "0.0.22",
|
||||
"autoprefixer": "^8.2.0",
|
||||
"axios": "^0.18.0",
|
||||
"babel-cli": "6.18.0",
|
||||
@ -22,6 +25,7 @@
|
||||
"gulp-postcss": "^7.0.1",
|
||||
"gulp-rename": "^1.2.2",
|
||||
"gulp-rev": "^8.1.1",
|
||||
"gulp-sourcemaps": "^2.6.4",
|
||||
"gulp-uglify-es": "^1.0.1",
|
||||
"jquery": "^3.3.1",
|
||||
"jwt-decode": "^2.2.0",
|
||||
@ -30,7 +34,10 @@
|
||||
"postcss-import": "^11.1.0",
|
||||
"postcss-preset-env": "^3.4.0",
|
||||
"postcss-scss": "^1.0.4",
|
||||
"precss": "^3.1.2",
|
||||
"pug-plain-loader": "^1.0.0",
|
||||
"tailwindcss": "^0.5.1",
|
||||
"through2": "^2.0.3",
|
||||
"vee-validate": "^2.0.9",
|
||||
"vue": "^2.5.7",
|
||||
"vue-axios": "^2.1.1",
|
||||
@ -44,6 +51,7 @@
|
||||
"vuex-i18n": "^1.10.5",
|
||||
"webpack": "^4.4.1",
|
||||
"webpack-stream": "^4.0.3",
|
||||
"xterm": "^3.4.1",
|
||||
"yargs": "^11.0.0"
|
||||
},
|
||||
"scripts": {
|
||||
@ -52,13 +60,5 @@
|
||||
"build": "./node_modules/gulp-cli/bin/gulp.js default",
|
||||
"build:styles": "./node_modules/gulp-cli/bin/gulp.js styles",
|
||||
"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']
|
||||
},
|
||||
plugins: [],
|
||||
devtool: '#source-map',
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user