Skip to content

Instantly share code, notes, and snippets.

@jasonpincin
Created May 11, 2014 17:39
Show Gist options
  • Save jasonpincin/35ce55b962e63f81dcc8 to your computer and use it in GitHub Desktop.
Save jasonpincin/35ce55b962e63f81dcc8 to your computer and use it in GitHub Desktop.
package factory
.PHONY: pkg
all: help
help:
@echo
@echo "pkgname=name pkgdesc='desc' make pkg"
@echo
pkg:
@mkdir $(pkgname)
@sed -e 's/\[PKGNAME\]/$(pkgname)/g' -e 's/\[PKGDESC\]/$(pkgdesc)/g' template/README.md > $(pkgname)/README.md
@sed -e 's/\[PKGNAME\]/$(pkgname)/g' -e 's/\[PKGDESC\]/$(pkgdesc)/g' template/package.json > $(pkgname)/package.json
@cp template/.gitignore $(pkgname)/
@cp template/.nodemonignore $(pkgname)/
@cp template/.travis.yml $(pkgname)/
@cp template/.jshintrc $(pkgname)/
@cp template/LICENSE $(pkgname)/
@cp template/Makefile $(pkgname)/
@mkdir $(pkgname)/test
@mkdir $(pkgname)/example
@cd $(pkgname); npm install
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment