@jvhellemondt/react-scripts-plus
v1.0.8
Published
React-scripts with Jest extended and component alias
Downloads
5
Readme
Jest extended
Following files are enabled for jest testing:
/private/jest/setupTests.js
/private/jest/fileMock.js
/private/jest/componentsMock.js
/private/jest/selectorsMock.js
/private/jest/actionsMock.js
Components alias
Dynamically export components -> the components alias is activated. import { xxx } from 'components'. Make sure to create a index.js with the following code:
const req = require.context('.', true, /\.\/[^/]+\/[^/]+\/index\.js$/)
req.keys().forEach((key) => {
const componentName = key.replace(/^.+\/([^/]+)\/index\.js/, '$1')
module.exports[componentName] = req(key).default
})
// https://github.com/diegohaz/arc/wiki/Atomic-Design#do-not-worry
react-scripts
This package includes scripts and configuration used by Create React App. Please refer to its documentation:
- Getting Started – How to create a new app.
- User Guide – How to develop apps bootstrapped with Create React App.