README
@trigen/scripts-preset-react-app
React app scripts preset.
Usage
- Install scripts package
yarn add -D @trigen/scripts-preset-react-app
- Add installed scripts to
.trigenscriptsrc
[
"preset-react-app",
"./some/other"
]
- Now you can run some script
yarn exec -- trigen-scripts start
Options
Option | Type | Default | Description |
---|---|---|---|
testSkipBuild | boolean |
false |
Skip build step while testing. |
transpile | object |
- | Dependencies transpilation config. |
transpile.dependencies | string[] |
- | Package names to force enable Babel. |
transpile.extensions | string[] |
- | Files extensions to force enable Babel. |
bdsl | object |
- | bdsl-webpack-plugin config. |
preact | boolean |
false |
Use Preact instead of React. |
Available scripts
# Lint only styles
yarn lint:styles
# Lint only scripts
yarn lint:scripts
# Lint all sources
yarn lint
# Run tests with Jest
yarn jest
# Run type checking
yarn typecheck
# Run lint, tests and build
yarn test
# Generate docs for typescript sources
yarn build:docs
# Start Storybook
yarn start:storybook
# Build standalone Storybook bundle
yarn build:storybook
# Start development server
yarn start
# Build app
yarn build
# Build app renderer
yarn build:render
# Build and run renderer
yarn render
# Serve files from `build` directory
yarn serve
Environment variables
Optional variables:
PROXY_API_URI='' # valid URI; not set by default
DISABLE_BROWSER_SYNC=false # boolean; `false` by default
DISABLE_HISTORY_FALLBACK=false # boolean; `false` by default
You can create .env
in project root with this variables.