Permalink
Browse files

making build more simple and change on readme

  • Loading branch information...
1 parent 0940fa6 commit 79c32d0fea502f3048226034d54db97c68ed3987 @cairesvs cairesvs committed Nov 11, 2010
Showing with 1,034 additions and 14 deletions.
  1. +0 −1 .gitignore
  2. +2 −2 Readme.textile
  3. +5 −11 jakefile
  4. +1,026 −0 restfulie.js
  5. +1 −0 restfulie.min.js
View
@@ -1,2 +1 @@
*.swp
-build/*
View
@@ -22,11 +22,11 @@ Run jake to build the Restfulie package uncompressed or minified.
To use:
-<pre><script type="text/javascript" charset="utf-8" src="build/restfulie.js"></script></pre>
+<pre><script type="text/javascript" charset="utf-8" src="restfulie.js"></script></pre>
or :
-<pre><script type="text/javascript" charset="utf-8" src="build/restfulie.min.js"></script></pre>
+<pre><script type="text/javascript" charset="utf-8" src="restfulie.min.js"></script></pre>
This project required jquery your project.
View
@@ -16,29 +16,23 @@ task('build', [], function(){
if(lib[i].match('.swp')) {continue}
console.log("appending " + lib[i]);
var data = fs.readFileSync('client/lib/' + lib[i]);
- fs.createWriteStream('build/restfulie.js', {'flags' : 'a'}).write(data);
+ fs.createWriteStream('restfulie.js', {'flags' : 'a'}).write(data);
originalJSContent.push(data);
}
var js = originalJSContent.join('');
var ast = jsp.parse(js);
ast = pro.ast_mangle(ast);
ast = pro.ast_squeeze(ast);
var compressedJS = pro.gen_code(ast);
- fs.createWriteStream('build/restfulie.min.js', {'flags' : 'a'}).write(compressedJS);
+ fs.createWriteStream('restfulie.min.js', {'flags' : 'a'}).write(compressedJS);
});
desc('clean the artifacts');
task("clean", [], function(){
try{
- if(fs.readdirSync('build/').some(existRestfulie)){
- fs.unlinkSync('build/restfulie.js');
- fs.unlinkSync('build/restfulie.min.js');
- }
+ fs.unlinkSync('restfulie.js');
+ fs.unlinkSync('restfulie.min.js');
}catch(e){
- fs.mkdirSync('build', 0755);
+ console.log("couldn't clean the artifacts...");
}
});
-
-function existRestfulie (element, index, array){
- if(element == 'restfulie.js' || element == 'restfulie.min.js') return true;
-}
Oops, something went wrong.

0 comments on commit 79c32d0

Please sign in to comment.