From 38f1440101f5b17d06dd90be358957a5619a980c Mon Sep 17 00:00:00 2001 From: Alexander Early Date: Sun, 9 Apr 2017 16:50:38 -0700 Subject: refactor to not need babel, require node 6+ --- Makefile | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'Makefile') diff --git a/Makefile b/Makefile index deeb78b..3af1d9e 100644 --- a/Makefile +++ b/Makefile @@ -7,7 +7,6 @@ export PATH := ./node_modules/.bin/:$(PATH):./bin/ PACKAGE = asyncjs REQUIRE_NAME = async -BABEL_NODE = babel-node UGLIFY = uglifyjs XYZ = support/xyz.sh --repo git@github.com:caolan/async.git @@ -44,14 +43,14 @@ lint: build-bundle: build-modules $(UMD_BUNDLE) $(CJS_BUNDLE) build-modules: - $(BABEL_NODE) $(SCRIPTS)/build/modules-cjs.js + node $(SCRIPTS)/build/modules-cjs.js $(UMD_BUNDLE): $(JS_SRC) package.json mkdir -p "$(@D)" - $(BABEL_NODE) $(SCRIPTS)/build/aggregate-bundle.js + node $(SCRIPTS)/build/aggregate-bundle.js $(CJS_BUNDLE): $(JS_SRC) package.json - $(BABEL_NODE) $(SCRIPTS)/build/aggregate-cjs.js + node $(SCRIPTS)/build/aggregate-cjs.js # Create the minified UMD versions and copy them to dist/ for bower build-dist: $(DIST) $(UMD_BUNDLE) $(UMD_BUNDLE_MIN) $(DIST)/async.js $(DIST)/async.min.js -- cgit v1.2.1 From 88f675bad27051269bb122655b26235176e89b8c Mon Sep 17 00:00:00 2001 From: Alexander Early Date: Sun, 16 Apr 2017 20:49:24 -0700 Subject: refactor to use ES module output to make umd bundle --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'Makefile') diff --git a/Makefile b/Makefile index 3af1d9e..6b2d37e 100644 --- a/Makefile +++ b/Makefile @@ -45,7 +45,7 @@ build-bundle: build-modules $(UMD_BUNDLE) $(CJS_BUNDLE) build-modules: node $(SCRIPTS)/build/modules-cjs.js -$(UMD_BUNDLE): $(JS_SRC) package.json +$(UMD_BUNDLE): $(ES_MODULES) package.json mkdir -p "$(@D)" node $(SCRIPTS)/build/aggregate-bundle.js -- cgit v1.2.1 From 80361aaccbca9cd2af30b76e5e93b58d25faa65b Mon Sep 17 00:00:00 2001 From: Alexander Early Date: Sun, 16 Apr 2017 21:03:48 -0700 Subject: remove unused CJS index.js file --- Makefile | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) (limited to 'Makefile') diff --git a/Makefile b/Makefile index 6b2d37e..904a373 100644 --- a/Makefile +++ b/Makefile @@ -20,7 +20,6 @@ LINT_FILES = lib/ mocha_test/ $(shell find perf/ -maxdepth 2 -type f) $(shell fi UMD_BUNDLE = $(BUILDDIR)/dist/async.js UMD_BUNDLE_MIN = $(BUILDDIR)/dist/async.min.js -CJS_BUNDLE = $(BUILDDIR)/index.js ES_MODULES = $(patsubst lib/%.js, build-es/%.js, $(JS_SRC)) @@ -40,7 +39,7 @@ lint: eslint $(LINT_FILES) # Compile the ES6 modules to singular bundles, and individual bundles -build-bundle: build-modules $(UMD_BUNDLE) $(CJS_BUNDLE) +build-bundle: build-modules $(UMD_BUNDLE) build-modules: node $(SCRIPTS)/build/modules-cjs.js @@ -49,9 +48,6 @@ $(UMD_BUNDLE): $(ES_MODULES) package.json mkdir -p "$(@D)" node $(SCRIPTS)/build/aggregate-bundle.js -$(CJS_BUNDLE): $(JS_SRC) package.json - node $(SCRIPTS)/build/aggregate-cjs.js - # Create the minified UMD versions and copy them to dist/ for bower build-dist: $(DIST) $(UMD_BUNDLE) $(UMD_BUNDLE_MIN) $(DIST)/async.js $(DIST)/async.min.js -- cgit v1.2.1 From ee06b105568edefba8e7442696b7c02fb67e6e9b Mon Sep 17 00:00:00 2001 From: Alexander Early Date: Sun, 16 Apr 2017 21:21:27 -0700 Subject: use make to manage compiling individual files --- Makefile | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'Makefile') diff --git a/Makefile b/Makefile index 904a373..8e5ef04 100644 --- a/Makefile +++ b/Makefile @@ -21,6 +21,7 @@ LINT_FILES = lib/ mocha_test/ $(shell find perf/ -maxdepth 2 -type f) $(shell fi UMD_BUNDLE = $(BUILDDIR)/dist/async.js UMD_BUNDLE_MIN = $(BUILDDIR)/dist/async.min.js ES_MODULES = $(patsubst lib/%.js, build-es/%.js, $(JS_SRC)) +CJS_MODULES = $(patsubst lib/%.js, build/%.js, $(JS_SRC)) all: clean lint build test @@ -41,8 +42,11 @@ lint: # Compile the ES6 modules to singular bundles, and individual bundles build-bundle: build-modules $(UMD_BUNDLE) -build-modules: - node $(SCRIPTS)/build/modules-cjs.js +build-modules: $(CJS_MODULES) + +$(BUILDDIR)/%.js: lib/%.js + mkdir -p "$(@D)" + node $(SCRIPTS)/build/compile --file $< --output $@ $(UMD_BUNDLE): $(ES_MODULES) package.json mkdir -p "$(@D)" @@ -98,7 +102,7 @@ $(BUILD_ES)/%: % .PHONY: build-modules build-bundle build-dist build-es build-config build-es-config test-build -build: clean build-bundle build-dist build-es build-config build-es-config test-build +build: build-bundle build-dist build-es build-config build-es-config test-build .PHONY: test lint build all clean -- cgit v1.2.1 From eb21089d62a378f7b308bca5fc545e2c1eb12f78 Mon Sep 17 00:00:00 2001 From: Alexander Early Date: Sun, 16 Apr 2017 21:33:20 -0700 Subject: rename compile->compile-module.js --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'Makefile') diff --git a/Makefile b/Makefile index 8e5ef04..4cfc9d1 100644 --- a/Makefile +++ b/Makefile @@ -46,7 +46,7 @@ build-modules: $(CJS_MODULES) $(BUILDDIR)/%.js: lib/%.js mkdir -p "$(@D)" - node $(SCRIPTS)/build/compile --file $< --output $@ + node $(SCRIPTS)/build/compile-module.js --file $< --output $@ $(UMD_BUNDLE): $(ES_MODULES) package.json mkdir -p "$(@D)" -- cgit v1.2.1 From 90e4dc37fa05685e85bf50e38e895214e7e4a971 Mon Sep 17 00:00:00 2001 From: Alexander Early Date: Sun, 16 Apr 2017 21:40:02 -0700 Subject: enable Make parallelizaion --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'Makefile') diff --git a/Makefile b/Makefile index 4cfc9d1..de02bfd 100644 --- a/Makefile +++ b/Makefile @@ -77,7 +77,7 @@ $(BUILD_ES)/%.js: lib/%.js mkdir -p "$(@D)" sed -E "s/(import.+)lodash/\1lodash-es/g" $< > $@ -test-build: +test-build: $(UMD_BUNDLE) $(UMD_BUNDLE_MIN) mocha support/build.test.js build-config: $(BUILDDIR)/package.json $(BUILDDIR)/bower.json $(BUILDDIR)/README.md $(BUILDDIR)/LICENSE $(BUILDDIR)/CHANGELOG.md -- cgit v1.2.1