Skip to content

ModusCreateOrg/modus-react

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Modus React Application Scaffolding

Monorepo containing setup for a best-practice React application scaffolding

ENV variables

You can use environment variables to configure build scripts.

Here's the list of supported variables with their defaults:

SOURCE_DIR=src
BUILD_DIR=build
SOURCEMAPS=false

You can override any of these variables with .env files. We support these formats (in the order of inclusion):

.env.${NODE_ENV}.local
.env.${NODE_ENV}
.env.local
.env

The order of inclusion means that anything in .env will override content in e.g. .env.development.local.

DLLs

DLLs precompile libraries to save time for development builds and re-builds.

React and React Router are included in DLLs by default. You can add other libraries by including them in package.json as an array in the dll property.

"dll": [
  "foo"
]

HTML Template

Use TEMPLATE environmental variable to specify custom HTML template relative to the project root.

HTML templates can consume variables. Variables are defined in meta property of the project's package.json.

"meta": {
  "title": "My App"
}
<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="utf-8" />
    <title><%= title %></title>
  </head>
  <body></body>
</html>

About

Modus React App Scaffolding

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published