1.0.0 • Published 4 years ago

@jvhellemondt/custom-react-scripts v1.0.0

Weekly downloads
-
License
MIT
Repository
github
Last release
4 years ago

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: