mirror of
https://github.com/bluetech/ng-annotate-patched.git
synced 2026-07-02 00:17:42 +08:00
ES5 build via defs.js
This commit is contained in:
Executable
+20
@@ -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
@@ -0,0 +1,4 @@
|
||||
#!/bin/sh
|
||||
echo "cleaning build files"
|
||||
rm -rf es5 browser npm
|
||||
echo "done cleaning"
|
||||
Symlink
+1
@@ -0,0 +1 @@
|
||||
../defs-config.json
|
||||
Executable
+2
@@ -0,0 +1,2 @@
|
||||
#!/usr/bin/env node
|
||||
require("./ng-annotate");
|
||||
Executable
+11
@@ -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
@@ -2,6 +2,5 @@
|
||||
"environments": ["node"],
|
||||
"disallowVars": true,
|
||||
"disallowDuplicated": true,
|
||||
"disallowUnknownReferences": true,
|
||||
"stats": true
|
||||
"disallowUnknownReferences": true
|
||||
}
|
||||
|
||||
+2
-2
@@ -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"
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user