0.0.3 • Published 3 years ago

cra-script-nomod v0.0.3

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

cra-script-nomod

This package is monorepo of react-scripts@5.0.1

It will create react app using given template without copying over node_modules, package.json, package-lock.json, yarn.lock, .env.development and .env from template folder.

.env and .env.development entries can be dynamically added in template.json of custom cra template

This way developers can work on custom cra templates without worrying about deleting installed packages in template folder for development purposes


Useage with create-react-app

yarn create react-app myapp --scripts-version cra-script-nomod 
OR
npx create-react-app myapp --scripts-version cra-script-nomod 

Adding .env and .env.development

Customize cra-template template.json

{
    "package": {
        "dependencies":{
            ...
        },
        "devDependencies":{
            ...
        }
    },
    "env":{
        "REACT_APP_API_URL" : "https://example.com/api"
    },
    "envDevelopment":{
        "REACT_APP_DEVELOPMENT_API_URL" : "https://example.com/api"
    },
}

This package includes scripts and configuration used by Create React App.
Please refer to its documentation:


Monorepo created by cloning create-react-app and using

git filter-branch –prune-empty –subdirectory-filter packages/react-scripts main

License

MIT