mirror of
https://github.com/reduxjs/redux-devtools.git
synced 2025-02-07 15:10:45 +03:00
chore(extension): remove gulp (#676)
This commit is contained in:
parent
0531c2432d
commit
f2e01b1ca1
|
@ -1,83 +0,0 @@
|
|||
import gulp from 'gulp';
|
||||
import gutil from 'gulp-util';
|
||||
import zip from 'gulp-zip';
|
||||
import webpack from 'webpack';
|
||||
import devConfig from './webpack/dev.config';
|
||||
import prodConfig from './webpack/prod.config';
|
||||
import wrapConfig from './webpack/wrap.config';
|
||||
|
||||
/*
|
||||
* dev tasks
|
||||
*/
|
||||
|
||||
gulp.task('webpack:dev', (callback) => {
|
||||
webpack(devConfig, (err, stats) => {
|
||||
if (err) {
|
||||
throw new gutil.PluginError('webpack:dev', err);
|
||||
}
|
||||
gutil.log('[webpack:dev]', stats.toString({ colors: true }));
|
||||
});
|
||||
callback();
|
||||
});
|
||||
|
||||
/*
|
||||
* build tasks
|
||||
*/
|
||||
|
||||
gulp.task('webpack:build:extension', (callback) => {
|
||||
function webpackProcess(config) {
|
||||
return new Promise((resolve, reject) =>
|
||||
webpack(config, (err, stats) => {
|
||||
if (err) {
|
||||
reject(new gutil.PluginError('webpack:build', err));
|
||||
}
|
||||
gutil.log('[webpack:build]', stats.toString({ colors: true }));
|
||||
resolve();
|
||||
})
|
||||
);
|
||||
}
|
||||
webpackProcess(wrapConfig)
|
||||
.then(() => webpackProcess(prodConfig))
|
||||
.then(callback);
|
||||
});
|
||||
|
||||
/*
|
||||
* compress task
|
||||
*/
|
||||
|
||||
gulp.task('compress:extension', (done) => {
|
||||
gulp
|
||||
.src('build/extension/**')
|
||||
.pipe(zip('extension.zip'))
|
||||
.pipe(gulp.dest('./build'));
|
||||
done();
|
||||
});
|
||||
|
||||
gulp.task('compress:firefox', (done) => {
|
||||
gulp
|
||||
.src('build/firefox/**')
|
||||
.pipe(zip('firefox.zip'))
|
||||
.pipe(gulp.dest('./build'));
|
||||
done();
|
||||
});
|
||||
|
||||
gulp.task('default', gulp.parallel('webpack:dev'));
|
||||
gulp.task('build:extension', gulp.parallel('webpack:build:extension'));
|
||||
gulp.task(
|
||||
'copy:build:firefox',
|
||||
gulp.series('build:extension', (done) => {
|
||||
gulp
|
||||
.src([
|
||||
'./build/extension/**',
|
||||
'!./build/extension/redux-devtools-extension.bundle.js',
|
||||
])
|
||||
.pipe(gulp.dest('./build/firefox'))
|
||||
.on('finish', function () {
|
||||
gulp
|
||||
.src('./src/browser/firefox/manifest.json')
|
||||
.pipe(gulp.dest('./build/firefox'));
|
||||
});
|
||||
done();
|
||||
})
|
||||
);
|
||||
gulp.task('build:firefox', gulp.series('copy:build:firefox'));
|
|
@ -3,14 +3,14 @@
|
|||
"name": "remotedev-redux-devtools-extension",
|
||||
"description": "Redux Developer Tools for debugging application state changes.",
|
||||
"scripts": {
|
||||
"start": "gulp",
|
||||
"build:extension": "rimraf build/extension && cross-env BABEL_ENV=production gulp build:extension",
|
||||
"build:firefox": "cross-env BABEL_ENV=production gulp build:firefox",
|
||||
"start": "webpack --config webpack/dev.config.babel.js",
|
||||
"build:extension": "rimraf build/extension && webpack --config webpack/wrap.config.babel.js && webpack --config webpack/prod.config.babel.js",
|
||||
"build:firefox": "webpack --config webpack/prod.firefox.config.babel.js",
|
||||
"build:examples": "babel-node examples/buildAll.js",
|
||||
"precompress:extension": "npm run lint && npm run test:app && npm run build:extension && npm run test:chrome && npm run test:electron",
|
||||
"precompress:firefox": "npm run lint && npm run build:firefox && npm run test:app",
|
||||
"compress:extension": "gulp compress:extension",
|
||||
"compress:firefox": "gulp compress:firefox",
|
||||
"compress:extension": "cd build/extension && bestzip ../extension.zip",
|
||||
"compress:firefox": "cd build/firefox && bestzip ../firefox.zip",
|
||||
"docs:clean": "rimraf _book",
|
||||
"docs:prepare": "gitbook install",
|
||||
"docs:build": "npm run docs:prepare && gitbook build",
|
||||
|
@ -41,6 +41,7 @@
|
|||
"@babel/register": "^7.12.1",
|
||||
"babel-eslint": "^10.1.0",
|
||||
"babel-loader": "^8.1.0",
|
||||
"bestzip": "^2.1.7",
|
||||
"chromedriver": "^2.35.0",
|
||||
"co-mocha": "^1.1.3",
|
||||
"copy-webpack-plugin": "^6.3.1",
|
||||
|
@ -53,9 +54,6 @@
|
|||
"expect": "^1.20.1",
|
||||
"file-loader": "^6.2.0",
|
||||
"gitbook-cli": "^2.3.0",
|
||||
"gulp": "^4.0.2",
|
||||
"gulp-util": "^3.0.7",
|
||||
"gulp-zip": "^3.0.2",
|
||||
"jsdom": "^9.8.3",
|
||||
"mocha": "^3.1.2",
|
||||
"pug-html-loader": "^1.1.5",
|
||||
|
@ -67,7 +65,8 @@
|
|||
"selenium-webdriver": "^3.0.1",
|
||||
"sinon-chrome": "^1.1.2",
|
||||
"style-loader": "^0.18.2",
|
||||
"webpack": "^4.44.1"
|
||||
"webpack": "^4.44.1",
|
||||
"webpack-cli": "^3.3.12"
|
||||
},
|
||||
"dependencies": {
|
||||
"jsan": "^3.1.13",
|
||||
|
|
|
@ -43,7 +43,7 @@ const baseConfig = (params) => ({
|
|||
? new CopyPlugin({
|
||||
patterns: [
|
||||
{
|
||||
from: `${extpath}manifest.json`,
|
||||
from: params.manifestJsonPath,
|
||||
to: path.join(params.output.path, 'manifest.json'),
|
||||
},
|
||||
{
|
||||
|
|
|
@ -14,6 +14,10 @@ let config = baseConfig({
|
|||
},
|
||||
plugins: [new webpack.NoEmitOnErrorsPlugin()],
|
||||
copy: true,
|
||||
manifestJsonPath: path.join(
|
||||
__dirname,
|
||||
'../src/browser/extension/manifest.json'
|
||||
),
|
||||
});
|
||||
|
||||
config.watch = true;
|
16
extension/webpack/prod.config.babel.js
Normal file
16
extension/webpack/prod.config.babel.js
Normal file
|
@ -0,0 +1,16 @@
|
|||
import path from 'path';
|
||||
import baseConfig from './base.config';
|
||||
|
||||
export default baseConfig({
|
||||
output: { path: path.join(__dirname, '../build/extension') },
|
||||
globals: {
|
||||
'process.env': {
|
||||
NODE_ENV: '"production"',
|
||||
},
|
||||
},
|
||||
copy: true,
|
||||
manifestJsonPath: path.join(
|
||||
__dirname,
|
||||
'../src/browser/extension/manifest.json'
|
||||
),
|
||||
});
|
|
@ -9,4 +9,8 @@ export default baseConfig({
|
|||
},
|
||||
},
|
||||
copy: true,
|
||||
manifestJsonPath: path.join(
|
||||
__dirname,
|
||||
'../src/browser/firefox/manifest.json'
|
||||
),
|
||||
});
|
1455
extension/yarn.lock
1455
extension/yarn.lock
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue
Block a user