Skip to content

Commit

Permalink
Update make build tasks
Browse files Browse the repository at this point in the history
  • Loading branch information
megawac committed Jan 4, 2016
1 parent 85f5be9 commit 41489b2
Show file tree
Hide file tree
Showing 16 changed files with 16 additions and 1,584 deletions.
23 changes: 16 additions & 7 deletions Makefile
Expand Up @@ -3,11 +3,13 @@ export PATH := ./node_modules/.bin/:$(PATH):./bin/
PACKAGE = asyncjs
REQUIRE_NAME = async
NODE = node_modules/babel-cli/bin/babel-node.js
UGLIFY = node_modules/.bin/uglifyjs
XYZ = node_modules/.bin/xyz --repo git@github.com:caolan/async.git
BROWSERIFY = node_modules/.bin/browserify

BUILDDIR = dist
BUILDDIR = build
DIST = dist
SRC = lib/index.js
SCRIPTS = ./support

all: lint test clean build

Expand All @@ -16,6 +18,7 @@ test:

clean:
rm -rf $(BUILDDIR)
rm -rf $(DIST)

lint:
jshint $(SRC) test/*.js mocha_test/* perf/*.js
Expand All @@ -25,18 +28,24 @@ submodule-clone:
git submodule update --init --recursive

build-bundle: submodule-clone
$(NODE) scripts/build/modules-cjs.js
$(NODE) scripts/build/aggregate-bundle.js
$(NODE) scripts/build/aggregate-cjs.js
$(NODE) $(SCRIPTS)/build/modules-cjs.js
$(NODE) $(SCRIPTS)/build/aggregate-bundle.js
$(NODE) $(SCRIPTS)/build/aggregate-cjs.js

build-dist:
mkdir -p $(DIST)
cp $(BUILDDIR)/async-bundle.js $(DIST)/
$(UGLIFY) $(DIST)/async-bundle.js -mc \
--source-map $(DIST)/async-bundle.min.map \
-o $(DIST)/async-bundle.min.js

build: build-bundle
build: clean build-bundle build-dist

.PHONY: test lint build all clean

.PHONY: release-major release-minor release-patch
release-major release-minor release-patch: all
./support/sync-package-managers.js
$(SCRIPTS)/sync-package-managers.js
git add --force *.json
git add --force $(BUILDDIR)
git commit -am "update minified build"; true
Expand Down

0 comments on commit 41489b2

Please sign in to comment.