[Pkg-javascript-commits] [node-async] 53/480: added makefile with lint, test and build targets
Jonas Smedegaard
js at moszumanska.debian.org
Fri May 2 08:58:11 UTC 2014
This is an automated email from the git hooks/post-receive script.
js pushed a commit to branch master
in repository node-async.
commit 54f563a9b6775ba476313c3659c6a02b8893b472
Author: Caolan McMahon <caolan at caolanmcmahon.com>
Date: Wed Nov 17 18:58:16 2010 +0000
added makefile with lint, test and build targets
---
.gitmodules | 6 ++++++
Makefile | 21 +++++++++++++++++++++
deps/nodeunit | 1 -
dist/async.min.js | 1 +
nodelint.cfg | 4 ++++
test.js | 22 ----------------------
test/test-async.js | 2 +-
7 files changed, 33 insertions(+), 24 deletions(-)
diff --git a/.gitmodules b/.gitmodules
index 3b65532..a9aae98 100644
--- a/.gitmodules
+++ b/.gitmodules
@@ -1,3 +1,9 @@
[submodule "deps/nodeunit"]
path = deps/nodeunit
url = git://github.com/caolan/nodeunit.git
+[submodule "deps/UglifyJS"]
+ path = deps/UglifyJS
+ url = https://github.com/mishoo/UglifyJS.git
+[submodule "deps/nodelint"]
+ path = deps/nodelint
+ url = https://github.com/tav/nodelint.git
diff --git a/Makefile b/Makefile
new file mode 100644
index 0000000..00f07ea
--- /dev/null
+++ b/Makefile
@@ -0,0 +1,21 @@
+PACKAGE = asyncjs
+NODEJS = $(if $(shell test -f /usr/bin/nodejs && echo "true"),nodejs,node)
+
+BUILDDIR = dist
+
+all: build
+
+build: $(wildcard lib/*.js)
+ mkdir -p $(BUILDDIR)
+ uglifyjs lib/async.js > $(BUILDDIR)/async.min.js
+
+test:
+ nodeunit test
+
+clean:
+ rm -rf $(BUILDDIR)
+
+lint:
+ nodelint --config nodelint.cfg lib/async.js
+
+.PHONY: test build all
diff --git a/deps/nodeunit b/deps/nodeunit
deleted file mode 160000
index faacb5b..0000000
--- a/deps/nodeunit
+++ /dev/null
@@ -1 +0,0 @@
-Subproject commit faacb5b53217edcdb3015c9e09a29539843e1ef8
diff --git a/dist/async.min.js b/dist/async.min.js
new file mode 100644
index 0000000..53d4459
--- /dev/null
+++ b/dist/async.min.js
@@ -0,0 +1 @@
+/*global setTimeout: false, console: false */(function(){var a={};var b=this,c=b.async;typeof module!=="undefined"&&module.exports?module.exports=a:b.async=a,a.noConflict=function(){b.async=c;return a};var d=function(a,b){if(a.forEach)return a.forEach(b);for(var c=0;c<a.length;c+=1)b(a[c],c,a)};var e=function(a,b){if(a.map)return a.map(b);var c=[];d(a,function(a,d,e){c.push(b(a,d,e))});return c};var f=function(a,b,c){if(a.reduce)return a.reduce(b,c);d(a,function(a,d,e){c=b(c,a,d,e)});ret [...]
\ No newline at end of file
diff --git a/nodelint.cfg b/nodelint.cfg
new file mode 100644
index 0000000..457a967
--- /dev/null
+++ b/nodelint.cfg
@@ -0,0 +1,4 @@
+var options = {
+ indent: 4,
+ onevar: false
+};
diff --git a/test.js b/test.js
deleted file mode 100755
index 423cd0e..0000000
--- a/test.js
+++ /dev/null
@@ -1,22 +0,0 @@
-#!/usr/local/bin/node
-
-require.paths.unshift(__dirname);
-require.paths.unshift(__dirname + '/deps');
-require.paths.unshift(__dirname + '/lib');
-
-try {
- var testrunner = require('nodeunit').testrunner;
-}
-catch(e) {
- var sys = require('sys');
- sys.puts("Cannot find nodeunit module.");
- sys.puts("You can download submodules for this project by doing:");
- sys.puts("");
- sys.puts(" git submodule init");
- sys.puts(" git submodule update");
- sys.puts("");
- process.exit();
-}
-
-process.chdir(__dirname);
-testrunner.run(['test']);
diff --git a/test/test-async.js b/test/test-async.js
index 7683c66..1c694b5 100644
--- a/test/test-async.js
+++ b/test/test-async.js
@@ -1,4 +1,4 @@
-var async = require('async');
+var async = require('../lib/async');
exports['auto'] = function(test){
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-javascript/node-async.git
More information about the Pkg-javascript-commits
mailing list