Skip to content

Commit

Permalink
merging full-build branch
Browse files Browse the repository at this point in the history
  • Loading branch information
alexisabril committed Feb 13, 2014
2 parents 06c7938 + 2cb577d commit 49a921e
Show file tree
Hide file tree
Showing 18 changed files with 10,073 additions and 270 deletions.
3 changes: 2 additions & 1 deletion .gitignore
@@ -1,4 +1,5 @@
testee.log
node_modules
lib
build
build
*.orig
2 changes: 1 addition & 1 deletion Gruntfile.js
Expand Up @@ -22,7 +22,7 @@ module.exports = function (grunt) {

dist: {
files: [{
src: ['lib/syn/dist/syn.js', 'build/funcunit.js'],
src: ['build/funcunit.js'], //'lib/syn/dist/syn.js',
dest: 'dist/funcunit.js'
}]
}
Expand Down
5 changes: 3 additions & 2 deletions bower.json
Expand Up @@ -19,13 +19,14 @@
}
],
"dependencies": {
"jquery": "~2.0.3"
"jquery": "1.10.2"
},
"devDependencies": {
"qunit": "1.10.x",
"jasmine": "1.3.x",
"mocha": "1.15.x",
"syn": "0.x"
"syn": "0.0.2",
"jquerypp": "1.0.x"
},
"ignore": [
"browser",
Expand Down
5 changes: 5 additions & 0 deletions browser/actions.js
Expand Up @@ -152,11 +152,16 @@ steal('jquery', './core.js', 'syn', function($, FuncUnit, Syn) {
});
return this;
},
// TODO (DL) this needs to be deprecated this advertises .trigger() functionality
// but expects that the target page will have jQuery which could not be the case.
trigger: function(evName, success){
this._addExists();
FuncUnit.add({
method : function(success, error){
// need to use the page's jquery to trigger events
if(!FuncUnit.win.jQuery) {
throw 'Can not trigger custom event, no jQuery found on target page.';
}
FuncUnit.win.jQuery(this.bind.selector).trigger(evName)
success()
},
Expand Down
3 changes: 3 additions & 0 deletions browser/jquery.js
@@ -0,0 +1,3 @@
steal('basejquery', function($) {
return $.noConflict(true);
});
26 changes: 13 additions & 13 deletions build.js
Expand Up @@ -2,28 +2,28 @@ var pluginify = require('steal').build.pluginify;
var fs = require('fs');

pluginify('funcunit.js', {
ignore: [/lib/],
// ignore: [/lib/],
wrapper: '!function(window) {\n<%= content %>\n\n' +
'}(window);',
steal: {
root: __dirname,
map: {
'*': {
'jquery/jquery.js' : 'lib/jquery/jquery.js',
"jquery/jquery.js": "jquery",
"basejquery/basejquery.js": "basejquery",
'funcunit/': '',
'syn/syn.js': 'lib/syn/dist/syn.js'
'src/': 'lib/syn/src/',
'syn/': 'lib/syn/src/',
"basejquery": "lib/jquery/jquery.js",
"jquery": "browser/jquery.js"
}
},
shim: {
'jquery': {
'exports': 'jQuery'
},
'syn': {
'exports': 'Syn'
}
}
},
shim: { 'jquery/jquery.js': 'jQuery', 'syn/syn.js': 'Syn' }
shim: {
basejquery: {
exports: "jQuery"
}
}
}
}, function(error, content) {
fs.exists('build', function(exists) {
if(!exists) {
Expand Down

0 comments on commit 49a921e

Please sign in to comment.