This is a project kickstarter for the specific needs of Accurat. It was originally forked from create-react-app, but in version 3.0.0 significant amounts of code were rewritten and simplified.
Having installed yarn (brew install yarn), run this command which will handle the folder scaffolding, the dependencies installation, and the git initialization with a first commit.
yarn create accurapp project-nameThen you just cd project-name, run yarn start and start creating awesome stuff! 🎉
- Create a new repo
- Choose
I have an existing projectand follow the instructions
- Go into
Settings > Pipelines - Settingsand enable Bitbucket Pipelines - Go into
Settings > Pipelines - Environment Variablesand add the environment variablesDEPLOY_CUSTOMER,DEPLOY_PROJECT,SLACK_CHANNEL
- ESLint config is the one configured for Accurat,
eslint-config-accurapp, based on StandardJS with some customizations - Babel presets are
stage-0andlatestwith decorators support - GLSL webpack loader, to import shaders and require shaders within shaders
├── build # created when you run yarn build
├── public # put the static stuff here
│ └── favicon.ico
├── src
│ ├── components
│ │ └── App.js
│ ├── lib # put here the stuff you will most likely reuse
│ │ └── README
│ ├── index.css
│ ├── index.html
│ └── index.js
├── .eslintrc # put here your eslint customizations
├── .gitignore
├── bitbucket-pipelines.yml
├── README.md
├── package.json
├── webpack.config.js
└── yarn.lock
Edit the webpack.config.js and add new webpack-blocks, to see how to create custom blocks, add plugins, add loaders, check out their docs.
const buildWebpackConfig = require('webpack-preset-accurapp')
const sass = require('@webpack-blocks/sass')
module.exports = buildWebpackConfig([
sass(),
])Create a .babelrc and pass it to buildWebpackConfig in the second arguments, which is an object of overrides
// .babelrc
{
"presets": ["latest"],
"plugins": ["fast-async"]
}
// webpack.config.js
const buildWebpackConfig = require('webpack-preset-accurapp')
module.exports = buildWebpackConfig([], {
babel: { babelrc: true },
})Add your custom rules to the .eslintrc
- use CommonsChunkPlugin for faster build times?
- do more beautiful console output like zeppelin does