Skip to content

Commit

Permalink
Merge pull request #12 from Mistrall/master
Browse files Browse the repository at this point in the history
Produce minified version
  • Loading branch information
mihaifm committed Jul 14, 2015
2 parents 02a0ccf + 52c8cae commit 39470b0
Show file tree
Hide file tree
Showing 20 changed files with 116 additions and 35 deletions.
67 changes: 67 additions & 0 deletions linq.min.js

Large diffs are not rendered by default.

11 changes: 11 additions & 0 deletions minify.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
var compressor = require('node-minify');

// Using Google Closure
new compressor.minify({
type: 'gcc',
fileIn: 'linq.js',
fileOut: 'linq.min.js',
callback: function(err, min){
console.log(err);
}
});
7 changes: 5 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,13 @@
"scripts": {
"test": "node test/testrunner.js"
},
"preferGlobal" : false,
"keywords": ["linq"],
"preferGlobal": false,
"keywords": [
"linq"
],
"dependencies": {},
"devDependencies": {
"node-minify": "^1.2.0",
"qunit": "~0.5.18"
},
"optionalDependencies": {},
Expand Down
2 changes: 1 addition & 1 deletion test/action.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
var module = QUnit.module;
var Enumerable = require('../linq');
var Enumerable = require('../linq.min');
require("../extensions/linq.qunit.js")({'Enumerable': Enumerable});

module("Action");
Expand Down
2 changes: 1 addition & 1 deletion test/aggregate.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
var module = QUnit.module;
var Enumerable = require('../linq');
var Enumerable = require('../linq.min');
require("../extensions/linq.qunit.js")({'Enumerable': Enumerable});

module("Aggregate");
Expand Down
2 changes: 1 addition & 1 deletion test/arrayEnumerable.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
var module = QUnit.module;
var Enumerable = require('../linq');
var Enumerable = require('../linq.min');
require("../extensions/linq.qunit.js")({'Enumerable': Enumerable});

module("ArrayEnumerable");
Expand Down
2 changes: 1 addition & 1 deletion test/convert.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
var module = QUnit.module;
var Enumerable = require('../linq');
var Enumerable = require('../linq.min');
require("../extensions/linq.qunit.js")({'Enumerable': Enumerable});

module("Convert");
Expand Down
2 changes: 1 addition & 1 deletion test/dictionary.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
var module = QUnit.module;
var Enumerable = require('../linq');
var Enumerable = require('../linq.min');
require("../extensions/linq.qunit.js")({'Enumerable': Enumerable});

module("Dictionary");
Expand Down
2 changes: 1 addition & 1 deletion test/enumerable.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
var module = QUnit.module;
var Enumerable = require('../linq');
var Enumerable = require('../linq.min');
require("../extensions/linq.qunit.js")({'Enumerable': Enumerable});

module("Enumerable");
Expand Down
2 changes: 1 addition & 1 deletion test/errorHandling.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
var module = QUnit.module;
var Enumerable = require('../linq');
var Enumerable = require('../linq.min');
require("../extensions/linq.qunit.js")({'Enumerable': Enumerable});

module("ErrorHandling");
Expand Down
2 changes: 1 addition & 1 deletion test/functional.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
var module = QUnit.module;
var Enumerable = require('../linq');
var Enumerable = require('../linq.min');
require("../extensions/linq.qunit.js")({'Enumerable': Enumerable});

module("Functional");
Expand Down
2 changes: 1 addition & 1 deletion test/grouping.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
var module = QUnit.module;
var Enumerable = require('../linq');
var Enumerable = require('../linq.min');
require("../extensions/linq.qunit.js")({'Enumerable': Enumerable});

module("Grouping");
Expand Down
2 changes: 1 addition & 1 deletion test/join.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
var module = QUnit.module;
var Enumerable = require('../linq');
var Enumerable = require('../linq.min');
require("../extensions/linq.qunit.js")({'Enumerable': Enumerable});

module("Join");
Expand Down
2 changes: 1 addition & 1 deletion test/linq.qunit-test.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
var module = QUnit.module;
var Enumerable = require('../linq');
var Enumerable = require('../linq.min');
require("../extensions/linq.qunit.js")({'Enumerable': Enumerable});

module("linq.qunit");
Expand Down
2 changes: 1 addition & 1 deletion test/ordering.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
var module = QUnit.module;
var Enumerable = require('../linq');
var Enumerable = require('../linq.min');
require("../extensions/linq.qunit.js")({'Enumerable': Enumerable});

module("Ordering");
Expand Down
2 changes: 1 addition & 1 deletion test/paging.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
var module = QUnit.module;
var Enumerable = require('../linq');
var Enumerable = require('../linq.min');
require("../extensions/linq.qunit.js")({'Enumerable': Enumerable});

module("Paging");
Expand Down
2 changes: 1 addition & 1 deletion test/projection.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
var module = QUnit.module;
var Enumerable = require('../linq');
var Enumerable = require('../linq.min');
require("../extensions/linq.qunit.js")({'Enumerable': Enumerable});

module("Projection");
Expand Down
2 changes: 1 addition & 1 deletion test/set.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
var module = QUnit.module;
var Enumerable = require('../linq');
var Enumerable = require('../linq.min');
require("../extensions/linq.qunit.js")({'Enumerable': Enumerable});

module("Set");
Expand Down
34 changes: 17 additions & 17 deletions test/testrunner.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,81 +4,81 @@ var callback = function(err, report) {
console.dir(report);
}
tr.run({
code: "./linq.js",
tests: "./test/linq.qunit-test.js"
code: "./linq.min.js",
tests: "./test/linq.min.qunit-test.js"
}, callback);

tr.run({
code: "./linq.js",
code: "./linq.min.js",
tests: "./test/action.js"
}, callback);

tr.run({
code: "./linq.js",
code: "./linq.min.js",
tests: "./test/aggregate.js"
}, callback);

tr.run({
code: "./linq.js",
code: "./linq.min.js",
tests: "./test/arrayEnumerable.js"
}, callback);

tr.run({
code: "./linq.js",
code: "./linq.min.js",
tests: "./test/convert.js"
}, callback);

tr.run({
code: "./linq.js",
code: "./linq.min.js",
tests: "./test/dictionary.js"
}, callback);

tr.run({
code: "./linq.js",
code: "./linq.min.js",
tests: "./test/enumerable.js"
}, callback);

tr.run({
code: "./linq.js",
code: "./linq.min.js",
tests: "./test/errorHandling.js"
}, callback);

tr.run({
code: "./linq.js",
code: "./linq.min.js",
tests: "./test/functional.js"
}, callback);

tr.run({
code: "./linq.js",
code: "./linq.min.js",
tests: "./test/grouping.js"
}, callback);

tr.run({
code: "./linq.js",
code: "./linq.min.js",
tests: "./test/join.js"
}, callback);

tr.run({
code: "./linq.js",
code: "./linq.min.js",
tests: "./test/ordering.js"
}, callback);

tr.run({
code: "./linq.js",
code: "./linq.min.js",
tests: "./test/paging.js"
}, callback);

tr.run({
code: "./linq.js",
code: "./linq.min.js",
tests: "./test/projection.js"
}, callback);

tr.run({
code: "./linq.js",
code: "./linq.min.js",
tests: "./test/set.js"
}, callback);

tr.run({
code: "./linq.js",
code: "./linq.min.js",
tests: "./test/whereSelectEnumerable.js"
}, callback);
2 changes: 1 addition & 1 deletion test/whereSelectEnumerable.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
var module = QUnit.module;
var Enumerable = require('../linq');
var Enumerable = require('../linq.min');
require("../extensions/linq.qunit.js")({'Enumerable': Enumerable});

module("WhereSelectEnumerable");
Expand Down

0 comments on commit 39470b0

Please sign in to comment.