mirror of https://github.com/toddmotto/echo.git
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
26 lines
580 B
26 lines
580 B
define colorecho |
|
@tput setaf 6 |
|
@echo "\n### $1 ###\n" |
|
@tput sgr0 |
|
endef |
|
|
|
all: js |
|
|
|
clean: |
|
$(call colorecho, "Cleaning ignored files") |
|
cat .gitignore | xargs rm -rf |
|
|
|
npm: |
|
$(call colorecho, "Installing npm dependencies") |
|
npm install |
|
|
|
lint: npm |
|
$(call colorecho, "Linting JavaScript") |
|
node_modules/.bin/jshint src/sloth.js -c .jshintrc --reporter node_modules/jshint-stylish/stylish.js |
|
|
|
js: lint |
|
$(call colorecho, "Minifying JavaScript") |
|
mkdir -p dist |
|
node_modules/.bin/uglifyjs src/sloth.js --compress --mangle > dist/sloth.min.js |
|
wc -c dist/sloth.min.js |
|
|
|
|