0.1.7 • Published 4 years ago

@webnsurf/bootstrap v0.1.7

Weekly downloads
1
License
ISC
Repository
github
Last release
4 years ago

CLI to bootstrap React projects with TypeScript

A CLI to bootstrap React Applications ranging in complexity from the very simple to more complex setups with CI.

To install run

npm i -g @webnsurf/bootstrap

This will install the package globally and make wns-new command available anywhere on your machine. You can also install it locally and then use it with NPX

To create a new project run

wns-new <project_name> [arguments]

If no project_name is provided the current working directory is used. Each project can be configured with:

The CLI is interactive so specifying the below arguments when running the command is not required.

Arguments:

NameAliasActionDefault valueInfo
--yes-ySkip the propmpt and use default optionsfalsePreferred default options to use here can be set and saved using the --set-defaults flag (see below)
--docker-dCreate a Docker setup within the projectfalseThis will create the following structure: Docker image build script /docker/build.shDocker container start script /docker/start.shfront-end and back-end Dockerfile.prod & Dockerfile.dev in their corresponding foldersdocker-compose.prod.yml & docker-compose.yml files to easily spin up production and development containersThe default Docker setup uses Web'n'surF Docker network. It allows you to access the development server on https://dev.webnsurf.com and the local "staging" server on https://local.webnsurf.com (both resolve to 127.0.0.1 and are then proxied to the right containers using Web'n'surF proxy). Get the Web'n'surF proxy based on Træfik
--pipeline-pCreate a Jenkins pipelinefalseThis will create the following structure: Jenkinsfile in the root directoryDeployment script /docker/deploy.shRemote start script /docker/start-remote.shThis option automatically sets --docker to true.Specify --server-user & --server-ip options to replace variables in the files listed above.Get the Web'n'surF CI server based on Jenkins
--install-iInstall node modulesfalseInstall node modules once the project is initialised
--set-defaults-sSet default optionsfalseSet default options to use next time --yes(-y) is used
--no-backendN/ACreate a project without a back-end serverfalseBy default the project is created with an Express JS backend server. This option disables that.
--no-gitN/ACreate a project without GitfalseBy default a new Git project is initiated. This option disables that.
--no-routerN/ACreate a project without React routerfalseBy default React router is included and a few front-end routes are set up. This option disables that.This option can not be disabled if the project is created with Login functionality.
--no-loginN/ACreate a project without login fuctionalityfalseBy default the project is setup with a redux store and a user login functionality (both back-end and front-end logic). This option disables that
--designN/ASpecify a design librarynullSets up, istalls and uses a React design library in the project.Available options:antd (Documentation)Material UI (Documentation) - this option is currently disabled (WIP)
--domainN/ADomain name for proxywebnsurf.comSpecify a domain name to use in the Web'n'surF proxy router setup.This option is only needed if --docker is set to true
--server-userN/ARemote server username<SERVER_USERNAME>Specify a username on the remote server for the deployment (/docker/deploy.sh) and start-remote (/docker/start-remote.sh) scripts to use.This option is only needed if --pipeline is set to true
--server-ipN/ARemote server IP address<SERVER_IP>Specify the remote server IP address for the deployment (/docker/deploy.sh) and start-remote (/docker/start-remote.sh) scripts to use.This option is only needed if --pipeline is set to true

0.1.7

4 years ago

0.1.6

4 years ago

0.1.5

4 years ago

0.1.4

4 years ago

0.1.3

4 years ago

0.1.2

4 years ago

0.1.1

4 years ago

0.1.0

4 years ago