Skip to content

Commit

Permalink
Made into Jam module, changed directory structure.
Browse files Browse the repository at this point in the history
  • Loading branch information
davidgtonge committed Jan 9, 2013
1 parent 3967949 commit 15d3822
Show file tree
Hide file tree
Showing 4 changed files with 44 additions and 24 deletions.
6 changes: 3 additions & 3 deletions Cakefile
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
# * docs - generates annotated documentation using docco
# * clean - clean generated .js files
files = [
'lib'
'.'
'src'
]

Expand Down Expand Up @@ -229,11 +229,11 @@ task 'uglify', 'Minify and obfuscate', ->
jsp = uglify.parser
pro = uglify.uglify

contents = fs.readFileSync "lib/backbone-query.js", 'utf8'
contents = fs.readFileSync "backbone-query.js", 'utf8'

ast = jsp.parse contents # parse code and get the initial AST
ast = pro.ast_mangle ast # get a new AST with mangled names
ast = pro.ast_squeeze ast # get an AST with compression optimizations
final_code = pro.gen_code ast # compressed code here

fs.writeFile 'lib/backbone-query.min.js', final_code
fs.writeFile 'backbone-query.min.js', final_code
File renamed without changes.
File renamed without changes.
62 changes: 41 additions & 21 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,24 +1,44 @@
{
"name": "backbone-query"
, "description": "Lightweight Query API for Backbone Collections"
, "version": "0.2.0"
, "author": "Dave Tonge <[email protected]> (https://github.com/davidgtonge)"
, "tags": ["backbone", "underscore", "mongo", "query"]
, "main": "./lib/backbone-query"
, "repository": {
"type": "git"
, "url": "https://[email protected]/davidgtonge/backbone_query.git"
"name": "backbone-query",
"description": "Lightweight Query API for Backbone Collections",
"version": "0.2.3",
"author": "Dave Tonge <[email protected]> (https://github.com/davidgtonge)",
"tags": [
"backbone",
"underscore",
"mongo",
"query"
],
"main": "./backbone-query",
"repository": {
"type": "git",
"url": "https://[email protected]/davidgtonge/backbone_query.git"
},
"dependencies": {
"backbone": ">=0.5.x",
"underscore": ">=1.1.x"
},
"devDependencies": {
"coffee-script": ">=1.x.x",
"mocha": "",
"uglify-js": "1.2.2"
},
"jam": {
"dependencies": {
"underscore": "*",
"backbone": "*",
"jquery": "*"
},
"include": ["backbone-query.js"],

"main": "backbone-query.js",

"shim": {
"deps": ["jquery", "backbone", "underscore"],
"exports": "Backbone.QueryCollection"
}
},
"scripts": {
"test": "mocha"
}
, "dependencies": {
"backbone": ">=0.5.x"
, "underscore": ">=1.1.x"
}
, "devDependencies": {
"coffee-script" : ">=1.x.x"
,"mocha": ""
,"uglify-js": "1.2.2"
}
, "scripts": {
"test": "mocha"
}
}

0 comments on commit 15d3822

Please sign in to comment.