From f9cb7f2201b21c8972903afa97a5492fee47e269 Mon Sep 17 00:00:00 2001 From: "Ed Cole (OzoneTank)" Date: Tue, 6 Mar 2018 19:41:32 -0500 Subject: [PATCH 1/2] Script to init new repo --- README.md | 22 ++++++++++++++++++- init.sh | 66 +++++++++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 87 insertions(+), 1 deletion(-) create mode 100755 init.sh diff --git a/README.md b/README.md index 9c183d7..a702f2d 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 + +### Follow these 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..1d099f5 --- /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 From 2e1454aaae6c390f955419fc0077982db5d78095 Mon Sep 17 00:00:00 2001 From: "Ed Cole (OzoneTank)" Date: Wed, 7 Mar 2018 09:20:55 -0500 Subject: [PATCH 2/2] addressing some PR --- README.md | 2 +- init.sh | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index a702f2d..b3c934a 100644 --- a/README.md +++ b/README.md @@ -30,7 +30,7 @@ cd web-boilerplate/ ## or -### Follow these steps +### Manual steps 1. Clone the repo ``` git clone https://github.com/smashingboxes/web-boilerplate diff --git a/init.sh b/init.sh index 1d099f5..bf31563 100755 --- a/init.sh +++ b/init.sh @@ -1,5 +1,5 @@ #!/bin/sh -echo what is your PROJECT_NAME? +echo "what is your PROJECT_NAME?" read PROJECT_NAME cd .. mv web-boilerplate $PROJECT_NAME