diff --git a/README.md b/README.md index 9c183d7..b3c934a 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ [![Stories in Ready](https://badge.waffle.io/smashingboxes/web-boilerplate.png?label=ready&title=Ready)](https://waffle.io/smashingboxes/web-boilerplate) # web-boilerplate -A template for new front-end projects. +A template for new front-end projects. [Waffle.io Board](https://waffle.io/smashingboxes/web-boilerplate) ## Info @@ -11,6 +11,26 @@ A template for new front-end projects. ## Using *NOTE: There are some additional steps for setting up a new project that are documented [here](https://github.com/smashingboxes/development-wiki/blob/master/technobabble/setting_up_a_new_project.md). The steps documented here are just the ones needed to set up the code for the repo.* +### Initing with a script +*NOTE: this is an experimental script, run with caution +1. Clone the repo +``` +git clone https://github.com/smashingboxes/web-boilerplate +``` +2. Create your repo on GitHub +it should look something like https://github.com/smashingboxes/my-project +3. Go into web-boilerplate +``` +cd web-boilerplate/ +``` +4. Run an init script +``` +./init.sh +``` + +## or + +### Manual steps 1. Clone the repo ``` git clone https://github.com/smashingboxes/web-boilerplate diff --git a/init.sh b/init.sh new file mode 100755 index 0000000..bf31563 --- /dev/null +++ b/init.sh @@ -0,0 +1,66 @@ +#!/bin/sh +echo "what is your PROJECT_NAME?" +read PROJECT_NAME +cd .. +mv web-boilerplate $PROJECT_NAME +cd $PROJECT_NAME +rm -rf .git +git init . + +echo "# $PROJECT_NAME + +## Commands + +Run the server with: +\`\`\` +yarn start +\`\`\` + +Run your tests with: +\`\`\` +yarn test +\`\`\` + +Run a build with: +\`\`\` +yarn build +\`\`\` + +## Docker Commands + +### Docker is not needed to run the boilerplate + +Build and start the server: +\`\`\` +docker-compose up --build +\`\`\` + +Run your tests with: +\`\`\` +docker-compose exec web yarn test +\`\`\` + +Run a build with: +\`\`\` +docker-compose exec web yarn build +\`\`\` + +If your terminal closes run: +\`\`\` +docker-compose logs --follow +\`\`\` +" > README.md + +git add . +git reset ./init.sh +git commit -m "first commit" +git remote add origin https://github.com/smashingboxes/$PROJECT_NAME.git +git push -u origin master + +echo " + +You're all set. Please check out your project at +https://github.com/smashingboxes/$PROJECT_NAME +" + +rm ./init.sh