Last active
August 29, 2015 14:18
-
-
Save aleclarson/da44083b16960e0f4bfc to your computer and use it in GitHub Desktop.
Create a CoffeeScript module with a single command!
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
#!/bin/bash | |
# coffee-module <module-name> | |
coffee-module () { | |
if [ -d "$@" ]; then | |
echo "Directory named '$@' already exists!" | |
return | |
fi | |
mkdir "$@" | |
cd "$@" | |
mkdir "src" | |
mkdir "spec" | |
touch "README.md" | |
echo "# $@ v0.0.1" >> "README.md" | |
echo "" >> "README.md" | |
echo "**A work in progress!**" >> "README.md" | |
touch "LICENSE" | |
echo "$( wget "https://gist.githubusercontent.com/aleclarson/22a6355fd163c59ba43c/raw/803de43a7dc09032098852e06761bf065613a867/LICENSE" -q -O - )" > "LICENSE" | |
touch ".gitignore" | |
echo "**/node_modules" >> ".gitignore" | |
touch "package.json" | |
echo "{" >> "package.json" | |
echo " \"name\": \"$@\"," >> "package.json" | |
echo " \"description\": \"\"," >> "package.json" | |
echo " \"version\": \"0.0.1\"" >> "package.json" | |
echo "}" >> "package.json" | |
touch "Gruntfile.coffee" | |
echo "$( wget "https://gist.githubusercontent.com/aleclarson/370c298928edf89971ed/raw/d82060f0e5dd9f8b255297f873a47d27495cbdcb/Gruntfile.coffee" -q -O - )" > "Gruntfile.coffee" | |
npm install --save-dev grunt-contrib-coffee grunt-contrib-watch load-grunt-tasks | |
git init | |
git rem add origin "https://github.com/aleclarson/$1.git" | |
addall | |
version "0.0.1" | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment