ricado-group / cra-template Goto Github PK
View Code? Open in Web Editor NEWThis is the official RICADO Web Template for Create React App: https://github.com/facebook/create-react-app
License: MIT License
This is the official RICADO Web Template for Create React App: https://github.com/facebook/create-react-app
License: MIT License
Throughout many of our apps, we have NPM scripts that are repeated such as:
{
"scripts": {
"start": "craco start",
"build": "npm run pre-build && craco build && npm run test",
"build:ci": "npm run build",
"test": "craco test --watchAll=false --silent",
"eject": "craco eject",
"test-watch": "craco test --silent",
"pre-build": "npm run generate-version && npm run generate-browser-sunsetter",
"generate-version": "generate-version -o ./public/version.json",
"generate-browser-sunsetter": "generate-browser-sunsetter -o ./public/browser-sunsetter.js"
}
}
This could be centralised into a single CLI project for common commands such as start/build/test. Optionally, we could look to rollup the generate-version
and generate-browser-sunsetter
tasks as a pre-build file that's part of the core ui package.
Goals
@ricado/react-scripts
to hold our common App config.react-scripts
and @craco/craco
away. Making them dependencies for our new project.ricado-scripts
CLI that implements same craco/react-scripts commands.It appears the PointProvider
now comes from @ricado/points-service rather than @ricado/core-ui
To minimize the amount of setup required for a new developer and to reduce the risk of inheriting other developers setups. We'd like to consider removing the .env file from source control and have this pre-configured from new users.
A couple of options may include:
tasks.json
and settings.json
to generate these files with the click of a button in the editor.As discussed we should release this package under: @ricado/cra-template
PROBLEM
Cannot npm start
due to defaultBugsnagConfig
not being exported from @ricado/core-ui
.
STEPS TO REPRODUCE
npm login
npx create-react-app my-app --template @ricado/cra-template
npm start
This has been removed in recent Gen 4 Apps but is still present in this Template.
It appears the variable REACT_APP_PROVIDER_ID
should be included in the .env example (and reflected in the README.md).
This could be defaulted to the RICADO Provider ID since this is the typical use case when creating an App from this Template.
The newer Gen 4 UX Apps based on core-ui and cra-ricado take a very long time to build!
We need to work through the process of getting the build time down to a smaller figure.
Ideally the build times would line up with the older Gen 4 UX Apps which also use the Terser Webpack Plugin
Currently the Makefile has the filename MakeFile which is not picked up by the make
cli on most distributions.
Update the name to Makefile
PROBLEM
Cannot npm start due to missing SASS config/dependencies.
STEPS TO REPRODUCE
npm login
npx create-react-app my-app --template @ricado/cra-template
npm start
I resolved missing SASS dependencies npm install sass --save-dev
, however it still fails to parse less with error, below.
Failed to compile.
./src/index.less (./node_modules/css-loader/dist/cjs.js??ref--5-oneOf-9-1!./node_modules/postcss-loader/src??postcss!./node_modules/resolve-url-loader??ref--5-oneOf-9-3!./node_modules/less-loader/dist/cjs.js??ref--5-oneOf-9-4!./src/index.less)
.searchInputIcon(@input-height-base, @font-size-base);
^
Operation on an invalid type
Error in /Users/mike/Desktop/workspace/ricado/gen4-packhouse-reporting-web/node_modules/antd/lib/input/style/search-input.less (line 23, column 0)
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.