@talend/scripts-preset-react-ng
v14.3.0
Published
Preset for talend/scripts-core
Downloads
464
Readme
Talend Preset
This is a preset for @talend/scripts-core. It holds most of Talend projects tools configuration for hybrid angularJS/react webapp.
This preset allows some customisation through specific entry points. The configuration is done via talend-scripts
configuration file.
Customisation
- Webpack customisation
- Babel customisation
- Eslint customisation
- Jest customisation
- Karma customisation
- Typescript customisation
Details
Webpack
- React Common configuration
- React Development configuration
- React Production configuration
- Angular Common configuration
Babel
Jest
| Configuration | Description |
|---|---|
| moduleNameMapper | * jpg/jpeg/png/gif/eot/otf/webp/svg/woff/woff2
are mocked with an empty object* css/scss
are mocked with an object that adds a theme
prefix to the requested classname. Example: drawer
will result to theme-drawer
. This is used to spot the classnames that come from css modules. |
| rootDir | You app root folder |
| setupFilesAfterEnv | * It configures enzyme with react 16 adapter* It mocks fetch with (url, { response }) => promise that resolved response
|
| testEnvironment | It uses jest-environment-jsdom-global
|
| testRegex | Jest will execute all the files that ends with .test.js
in your src/
folder. |
| transform | It transforms js files via babel, using the same babel configuration as webpack. |
Eslint
The linter is based on airbnb configuration, with some customisation. Eslint configuration
Karma
Karma configuration Karma webpack configuration