Skip to content

Commit

Permalink
Add build process
Browse files Browse the repository at this point in the history
  • Loading branch information
evilmarty committed Aug 15, 2014
1 parent d5eca46 commit 1a1c01b
Show file tree
Hide file tree
Showing 4 changed files with 26 additions and 1 deletion.
1 change: 1 addition & 0 deletions .gitignore
Expand Up @@ -23,3 +23,4 @@ build/Release
# Deployed apps should consider commenting this line out:
# see https://npmjs.org/doc/faq.html#Should-I-check-my-node_modules-folder-into-git
node_modules
dist
21 changes: 21 additions & 0 deletions Makefile
@@ -0,0 +1,21 @@
BINPATH=node_modules/.bin
BROWSERIFY=$(BINPATH)/browserify
BROWSERIFY_FLAGS=
UGLIFY=$(BINPATH)/uglifyjs
UGLIFY_FLAGS=-cm --stats
JASMINE_NODE=$(BINPATH)/jasmine-node

OUTPUTPATH=dist

build: $(OUTPUTPATH) test
$(BROWSERIFY) $(BROWSERIFY_FLAGS) -o $(OUTPUTPATH)/i18n.js i18n.js
$(UGLIFY) $(UGLIFY_FLAGS) $(OUTPUTPATH)/i18n.js > $(OUTPUTPATH)/i18n.min.js

test:
$(JASMINE_NODE) spec/

$(OUTPUTPATH):
mkdir -p $(OUTPUTPATH)

clean:
rm -rf $(OUTPUTPATH)
1 change: 1 addition & 0 deletions i18n.js
Expand Up @@ -798,3 +798,4 @@
I18n.l = I18n.localize;
I18n.p = I18n.pluralize;
})(typeof(exports) === "undefined" ? (this.I18n || (this.I18n = {})) : exports);

4 changes: 3 additions & 1 deletion package.json
Expand Up @@ -24,6 +24,8 @@
},
"homepage": "https://github.com/everydayhero/i18n-js",
"devDependencies": {
"jasmine-node": "^1.14.5"
"browserify": "^5.10.0",
"jasmine-node": "^1.14.5",
"uglify-js": "^2.4.15"
}
}

0 comments on commit 1a1c01b

Please sign in to comment.