Redux toolkit (#115)

* add @redux/toolkit

* bump react version to allow for hooks

* add remote-redux devtools to help track extension state

* add remote-redux server to allow for remote state viewing

* setup react-redux for current user

* setup watch mode for running redux remote dev watch to options

* move screenshots
This commit is contained in:
Vu Nguyen
2021-01-22 16:37:59 -08:00
committed by GitHub
parent 0c39fbbc79
commit 8ade367b3f
20 changed files with 1859 additions and 22 deletions

View File

@@ -4,7 +4,7 @@
import * as fs from 'fs';
import { join } from 'path';
import * as shelljs from 'shelljs';
const { load, exec, serial } = require('@xarc/run');
const { load, exec, serial, concurrent } = require('@xarc/run');
const makePublicFolder = () => {
if (!fs.existsSync('public/js')) {
@@ -31,18 +31,21 @@ const copyFromNodeModules = () => {
};
load({
build: [serial('postinstall', exec('gulp')), 'webpack'],
clean: exec('rimraf public coverage vendor'),
clean: [exec('rimraf public coverage vendor'), 'clean:webpack'],
'clean:webpack': exec('rimraf dist'),
eslint: exec('eslint src . --fix'),
less: exec('lessc assets/less/app.less public/css/app.css'),
lint: ['prettier', 'eslint'],
postinstall: ['clean', makePublicFolder, copyFromNodeModules, 'less'],
prettier: [exec('prettier --write .')],
'remotedev-server': exec('remotedev --hostname=localhost --port=8000'),
test: ['build', 'lint', 'test-jest', 'test-js'],
'test-jest': [exec('jest --clearCache'), exec('jest --verbose --coverage')],
'test-jest-update': exec('jest -u'),
'test-js': 'phantomjs tests/run.js',
watch: concurrent('watch-jest', 'webpack:watch', 'remotedev-server'),
'watch-jest': exec('jest --watch'),
webpack: [exec('webpack --mode production')],
'webpack:dev': [exec('webpack --mode development')],
'webpack:watch': exec('webpack --mode development --watch'),
webpack: ['clean:webpack', exec('webpack --mode production')],
'webpack:dev': ['clean:webpack', exec('webpack --mode development')],
'webpack:watch': ['clean:webpack', exec('webpack --mode development --watch')],
});