Commit 75c68a0d authored by Guillermo Bonvehí's avatar Guillermo Bonvehí

New build that does not include jQuery

This is useful when you already have jQuery loaded in your page, for
example on a Wordpress site.
parent 1243d8e3
...@@ -100,6 +100,8 @@ module.exports = function(grunt) { ...@@ -100,6 +100,8 @@ module.exports = function(grunt) {
}; };
exec('./node_modules/requirejs/bin/r.js -o src/build.js && ' + exec('./node_modules/requirejs/bin/r.js -o src/build.js && ' +
'./node_modules/requirejs/bin/r.js -o src/build.js optimize=none out=builds/converse.js && ' + './node_modules/requirejs/bin/r.js -o src/build.js optimize=none out=builds/converse.js && ' +
'./node_modules/requirejs/bin/r.js -o src/build-no-jquery.js &&' +
'./node_modules/requirejs/bin/r.js -o src/build-no-jquery.js optimize=none out=builds/converse.nojquery.js && ' +
'./node_modules/requirejs/bin/r.js -o src/build-no-locales-no-otr.js && ' + './node_modules/requirejs/bin/r.js -o src/build-no-locales-no-otr.js && ' +
'./node_modules/requirejs/bin/r.js -o src/build-no-locales-no-otr.js optimize=none out=builds/converse-no-locales-no-otr.js && ' + './node_modules/requirejs/bin/r.js -o src/build-no-locales-no-otr.js optimize=none out=builds/converse-no-locales-no-otr.js && ' +
'./node_modules/requirejs/bin/r.js -o src/build-no-otr.js &&' + './node_modules/requirejs/bin/r.js -o src/build-no-otr.js &&' +
......
({
baseUrl: "../",
name: "components/almond/almond.js",
out: "../builds/converse.nojquery.min.js",
include: ['main'],
tpl: {
// Use Mustache style syntax for variable interpolation
templateSettings: {
evaluate : /\{\[([\s\S]+?)\]\}/g,
interpolate : /\{\{([\s\S]+?)\}\}/g
}
},
map: {
// '*' means all modules will get 'jquery-private'
// for their 'jquery' dependency.
'*': { 'jquery': 'jquery-private' },
// 'jquery-private' wants the real jQuery module
// though. If this line was not here, there would
// be an unresolvable cyclic dependency.
'jquery-private': { 'jquery': 'jquery' }
},
mainConfigFile: '../main.js',
paths: {
"converse-dependencies": "src/deps-full",
"jquery": "src/jquery-external",
"jquery-private": "src/jquery-private-external",
}
})
define('jquery', [], function () {
return jQuery;
});
define(['jquery'], function (jq) {
return jq;
});
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment