Skip to content
This repository has been archived by the owner on Mar 13, 2018. It is now read-only.

Commit

Permalink
Support ?build=min for the test suite; and grunt test-min
Browse files Browse the repository at this point in the history
  • Loading branch information
Ian MacLeod committed Oct 3, 2014
1 parent 2131874 commit 4f350b4
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 6 deletions.
10 changes: 9 additions & 1 deletion gruntfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,15 @@ module.exports = function(grunt) {
local: {
options: {remote: false},
},
'local-min': {
options: {remote: false, webRunner: 'test/index.html?build=min'},
},
remote: {
options: {remote: true},
},
'remote-min': {
options: {remote: true, webRunner: 'test/index.html?build=min'},
},
},
concat: {
modules: {
Expand All @@ -31,6 +37,8 @@ module.exports = function(grunt) {

grunt.registerTask('default', 'concat');
grunt.registerTask('test', ['wct-test:local']);
grunt.registerTask('test-min', ['concat', 'wct-test:local-min']);
grunt.registerTask('test-remote', ['wct-test:remote']);
grunt.registerTask('test-buildbot', ['wct-test:local']);
grunt.registerTask('test-remote-min', ['concat', 'wct-test:remote-min']);
grunt.registerTask('test-buildbot', ['test-min']);
};
12 changes: 7 additions & 5 deletions load.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,11 @@
document.write('<link rel="stylesheet" href="' +
libLocation + 'src/template_element.css">');

[
'../observe-js/src/observe.js',
'../NodeBind/src/NodeBind.js',
'src/TemplateBinding.js'
].forEach(write);
write('../observe-js/src/observe.js');
write('../NodeBind/src/NodeBind.js');
if (window.WCT && (WCT.util.getParam('build') === 'min' || WCT.util.getParam('build') === 'min/')) {
write('TemplateBinding.min.js');
} else {
write('src/TemplateBinding.js');
}
})();

0 comments on commit 4f350b4

Please sign in to comment.