The following documentation is just relevant for dash4 plugin development. For informations on how to use Dash4 please read this: Dash4 documentation
Table of Contents
npm i -D @dash4/config @types/jest jest ts-jest react-testing-library
package.json
{
"scripts": {
"analyze-bundle-size": "dash4-analyze-bundle-size",
"prebuild": "dash4-prebuild",
"build": "dash4-npm-run-all build:*",
"build:client": "dash4-build-client",
"build:server": "dash4-build-server",
"prepublishOnly": "dash4-npm-run-all build",
"start": "dash4-start",
"static": "dash4-static",
"test": "dash4-npm-run-all test:*",
"test:client": "dash4-test-client",
"test:server": "dash4-test-server",
"watch-build": "dash4-watch-build",
"watch-dist": "dash4-watch-dist",
"watch-test-client": "dash4-watch-test-client",
"watch-test-server": "dash4-watch-test-server"
}
}
tsconfig.json
{
"extends": "@dash4/config/tsconfig.json",
"exclude": ["dist", "build", "node_modules", "__tests__", "src/server"]
}
tsconfig.test.json
{
"extends": "@dash4/config/tsconfig.test.json",
"exclude": ["dist", "build", "node_modules", "__tests__", "src/server"]
}
tsconfig.server.json
{
"extends": "@dash4/config/tsconfig.server.json",
"exclude": ["dist", "build", "node_modules", "__tests__", "src/client"]
}
jest.config.js
module.exports = require('@dash4/config/jest.config');
jest.server.config.js
module.exports = require('@dash4/config/jest.server.config');
webpack.config.js
module.exports = require('@dash4/config/webpack.config.js')('###PLUGIN_NAME###');
The @dash4/config is MIT licensed