GithubHelp home page GithubHelp logo

ricado-group / cra-template Goto Github PK

View Code? Open in Web Editor NEW
0.0 0.0 0.0 63 KB

This is the official RICADO Web Template for Create React App: https://github.com/facebook/create-react-app

License: MIT License

Dockerfile 5.03% JavaScript 1.87% HTML 21.29% TypeScript 57.12% Less 0.57% Makefile 14.13%

cra-template's People

Contributors

ashneilson avatar

Watchers

 avatar

cra-template's Issues

Standardise on a RICADO Core Scripts solution

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

  • Created a new repo called @ricado/react-scripts to hold our common App config.
  • Abstract the libraries react-scripts and @craco/craco away. Making them dependencies for our new project.
  • Centralise the craco config.
  • Create a ricado-scripts CLI that implements same craco/react-scripts commands.
  • Generate browser sunsetter scripts and version file as part of build.

Consider how we could remove .env files from source control

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:

  • Taking advantage of VSCode's scripts by using a combination of tasks.json and settings.json to generate these files with the click of a button in the editor.
  • Generating the .env file for production during the CI Build (e.g. as part of a Github Action)
  • Something else?

Bugsnag config

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

Reduce app build times

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

SASS dependencies missing

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.