ES5 build via defs.js

This commit is contained in:
Olov Lassus
2013-09-30 14:03:10 +02:00
parent bde14334e4
commit 8db29aeac1
8 changed files with 41 additions and 4 deletions
Executable
+20
View File
@@ -0,0 +1,20 @@
#!/bin/sh
echo "beginning ng-annotate defs-build"
rm -rf es5
mkdir es5
declare -a files=(ng-annotate.js ng-annotate-main.js run-tests.js)
for i in ${files[@]}
do
echo "building $i with defs"
defs ../$i > es5/$i
done
cp ng-annotate es5/
cd es5
echo "running tests (in es5 mode i.e. without --harmony)"
cp -r ../../tests .
/usr/bin/env node run-tests.js
echo "done self-build"
Executable
+4
View File
@@ -0,0 +1,4 @@
#!/bin/sh
echo "cleaning build files"
rm -rf es5 browser npm
echo "done cleaning"
+1
View File
@@ -0,0 +1 @@
../defs-config.json
+2
View File
@@ -0,0 +1,2 @@
#!/usr/bin/env node
require("./ng-annotate");
+11
View File
@@ -0,0 +1,11 @@
#!/bin/sh
cd ..
rm -rf build/npm
mkdir build/npm
git archive master -o build/npm/ng-annotate.tar --prefix=ng-annotate/
cd build/npm
tar xf ng-annotate.tar && rm ng-annotate.tar
cd ng-annotate/build
./build.sh
cd ../..
tar czf ng-annotate.tgz ng-annotate && rm -rf ng-annotate
+1 -2
View File
@@ -2,6 +2,5 @@
"environments": ["node"],
"disallowVars": true,
"disallowDuplicated": true,
"disallowUnknownReferences": true,
"stats": true
"disallowUnknownReferences": true
}
View File
+2 -2
View File
@@ -2,7 +2,7 @@
"name": "ng-annotate",
"version": "0.2.0",
"description": "add, remove and rebuild angularjs dependency injection annotations",
"main": "ng-annotate-main.js",
"main": "build/es5/ng-annotate-main.js",
"repository": {
"type": "git",
"url": "https://github.com/olov/ng-annotate.git"
@@ -34,7 +34,7 @@
"scripts": {
"test": "node --harmony run-tests"
},
"bin": "./ng-annotate",
"bin": "./build/es5/ng-annotate",
"author": "Olov Lassus <olov.lassus@gmail.com>",
"license": "MIT"
}