Last active
February 5, 2016 20:53
-
-
Save juaniyyoo/385fdff6a921ef8dfb7c to your computer and use it in GitHub Desktop.
Node.js project initialization
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Initialization of a Node.js project with npm, .eslint, travis, grunt, | |
GITHUB_ACCOUNT=Picta-it | |
# Read github project name | |
echo -n "Enter your github project name : " | |
read PROJECT_NAME | |
# Display github link | |
echo "You must create your account repository first https://github.com/organizations/$GITHUB_ACCOUNT/repositories/new" | |
# Clone the github project | |
git clone [email protected]:$GITHUB_ACCOUNT/$PROJECT_NAME.git > /dev/null | |
if [ $? -eq 0 ]; then | |
echo "Repository $GITHUB_ACCOUNT/$PROJECT_NAME cloned." | |
fi | |
cd $PROJECT_NAME | |
# Get Node.js backend .eslint file | |
wget ".eslint gist URL" 2&>1 > /dev/null | |
echo "Code linter downloaded." | |
# Get Node.js backend Gulp file | |
wget "Gulp gist URL" 2&>1 > /dev/null | |
echo "Task runner downloaded." | |
# Get Node.js backend travis file | |
wget "Travis gist URL" 2&>1 > /dev/null | |
echo "Builder configuration template file downloaded." | |
# Get README template | |
wget "README template URL" 2&>1 > /dev/null | |
echo "README.md template file downloaded." | |
# Initialize package.json | |
npm init --yes 2&>1 > /dev/null | |
echo "Package file initialized." | |
# Create file structure | |
mkdir -p app/ test/unit/app | |
touch index.js app/.empty test/unit/index.js test/unit/app/.empty | |
echo "Folder structure created." |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Replace this with yeoman