Commit dcd0f5d8 authored by Romain Courteaud's avatar Romain Courteaud

Directly include jschannel in the release file.

parent 30c94780
......@@ -27,6 +27,7 @@ module.exports = function (grunt) {
grunt.loadNpmTasks("grunt-contrib-uglify");
grunt.loadNpmTasks('grunt-contrib-watch');
grunt.loadNpmTasks('grunt-contrib-qunit');
grunt.loadNpmTasks('grunt-contrib-concat');
grunt.loadNpmTasks('grunt-contrib-connect');
grunt.loadNpmTasks('grunt-contrib-copy');
grunt.loadNpmTasks('grunt-curl');
......@@ -105,48 +106,48 @@ module.exports = function (grunt) {
}
},
copy: {
renderjs: {
src: '<%= pkg.name %>.js',
dest: "dist/<%= pkg.name %>-<%= pkg.version %>.js"
concat: {
options: {
separator: ';'
},
dist: {
src: ['<%= curl.jschannel.dest %>',
'<%= curl.domparser.dest %>',
'renderjs.js'],
dest: 'dist/<%= pkg.name %>-<%= pkg.version %>.js'
}
},
uglify: {
renderjs: {
src: "<%= concat.dist.dest %>",
dest: "dist/<%= pkg.name %>-<%= pkg.version %>.min.js"
}
},
copy: {
latest: {
files: [{
src: '<%= pkg.name %>.js',
src: '<%= uglify.renderjs.src %>',
dest: "dist/<%= pkg.name %>-latest.js"
}, {
src: '<%= uglify.stateless.dest %>',
src: '<%= uglify.renderjs.dest %>',
dest: "dist/<%= pkg.name %>-latest.min.js"
}]
}
},
uglify: {
stateless: {
src: "dist/<%= pkg.name %>-<%= pkg.version %>.js",
dest: "dist/<%= pkg.name %>-<%= pkg.version %>.min.js"
}
},
watch: {
src: {
files: [
'<%= jslint.client.src %>',
'<%= jslint.config.src %>',
'<%= jslint.test.src %>',
'<%= qunit.all %>',
['test/*.html', 'test/*.js']
],
tasks: ['default'],
options: {
livereload: LIVERELOAD_PORT
}
},
examples: {
files: [
['lib/**'],
['test/*.html', 'test/*.js'],
['examples/**']
],
tasks: ['lint'],
tasks: ['default'],
options: {
livereload: LIVERELOAD_PORT
}
......@@ -154,6 +155,11 @@ module.exports = function (grunt) {
},
curl: {
domparser: {
src: 'https://gist.github.com/eligrey/1129031/raw/' +
'e26369ee7939db745087beb98b4bb4bbcf460cf3/html-domparser.js',
dest: 'lib/domparser/domparser.js'
},
jschannel: {
src: 'http://mozilla.github.io/jschannel/src/jschannel.js',
dest: 'lib/jschannel/jschannel.js'
......@@ -212,6 +218,6 @@ module.exports = function (grunt) {
grunt.registerTask('lint', ['jslint']);
grunt.registerTask('test', ['qunit']);
grunt.registerTask('server', ['connect:client', 'open', 'watch']);
grunt.registerTask('build', ['copy:renderjs', 'uglify', 'copy:latest']);
grunt.registerTask('build', ['concat', 'uglify', 'copy']);
};
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
......@@ -4,7 +4,6 @@
<title>Ace Editor</title>
<script src="./ace/ace.js" type="text/javascript" charset="utf-8"></script>
<script src="../../node_modules/rsvp/dist/rsvp-2.0.4.js" type="text/javascript"></script>
<script src="../../lib/jschannel/jschannel.js" type="text/javascript"></script>
<script src="../../dist/renderjs-latest.js" type="text/javascript"></script>
<script src="aceeditor.js" type="text/javascript"></script>
<!--script src="./ace/theme-monokai.js" type="text/javascript"></script>
......
......@@ -3,7 +3,6 @@
<title>Catalog Gadget</title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<script src="../../node_modules/rsvp/dist/rsvp-2.0.4.js" type="text/javascript"></script>
<script src="../../lib/jschannel/jschannel.js" type="text/javascript"></script>
<script src="../../dist/renderjs-latest.js" type="text/javascript"></script>
<script src="catalog.js" type="text/javascript"></script>
</head>
......
......@@ -3,7 +3,6 @@
<title>Simple Text Editor Gadget</title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<script src="../../node_modules/rsvp/dist/rsvp-2.0.4.js" type="text/javascript"></script>
<script src="../../lib/jschannel/jschannel.js" type="text/javascript"></script>
<script src="../../dist/renderjs-latest.js" type="text/javascript"></script>
<script src="editor.js" type="text/javascript"></script>
<link rel="http://www.renderjs.org/rel/interface"
......
......@@ -3,7 +3,6 @@
<title>IO</title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<script src="../../node_modules/rsvp/dist/rsvp-2.0.4.js" type="text/javascript"></script>
<script src="../../lib/jschannel/jschannel.js" type="text/javascript"></script>
<script src="../../dist/renderjs-latest.js" type="text/javascript"></script>
<script src="../../lib/jio/sha256.js" type="text/javascript"></script>
<script src="../../lib/jio/jio.js" type="text/javascript"></script>
......
......@@ -4,7 +4,6 @@
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<link rel="stylesheet" href="jqte/jquery-te-1.4.0.css" />
<script src="../../node_modules/rsvp/dist/rsvp-2.0.4.js" type="text/javascript"></script>
<script src="../../lib/jschannel/jschannel.js" type="text/javascript"></script>
<script src="../../dist/renderjs-latest.js" type="text/javascript"></script>
<script src="../../lib/jquery/jquery.js" type="text/javascript"></script>
<script src="jqte/jquery-te-1.4.0.js" type="text/javascript"></script>
......
......@@ -7,7 +7,6 @@
<link rel="stylesheet" href="../../lib/jqm/jquery.mobile.css" />
<link rel="stylesheet" href="officejs.css" />
<script src="../../node_modules/rsvp/dist/rsvp-2.0.4.js" type="text/javascript"></script>
<script src="../../lib/jschannel/jschannel.js" type="text/javascript"></script>
<script src="../../dist/renderjs-latest.js" type="text/javascript"></script>
<script src="../../lib/jquery/jquery.js" type="text/javascript"></script>
<script src="officejs.js" type="text/javascript"></script>
......
/*
* DOMParser HTML extension
* 2012-09-04
*
* By Eli Grey, http://eligrey.com
* Public domain.
* NO WARRANTY EXPRESSED OR IMPLIED. USE AT YOUR OWN RISK.
*/
/*! @source https://gist.github.com/1129031 */
(function (DOMParser) {
"use strict";
var DOMParser_proto = DOMParser.prototype,
real_parseFromString = DOMParser_proto.parseFromString;
// Firefox/Opera/IE throw errors on unsupported types
try {
// WebKit returns null on unsupported types
if ((new DOMParser()).parseFromString("", "text/html")) {
// text/html parsing is natively supported
return;
}
} catch (ignore) {}
DOMParser_proto.parseFromString = function (markup, type) {
var result, doc, doc_elt, first_elt;
if (/^\s*text\/html\s*(?:;|$)/i.test(type)) {
doc = document.implementation.createHTMLDocument("");
doc_elt = doc.documentElement;
doc_elt.innerHTML = markup;
first_elt = doc_elt.firstElementChild;
if (doc_elt.childElementCount === 1
&& first_elt.localName.toLowerCase() === "html") {
doc.replaceChild(first_elt, doc_elt);
}
result = doc;
} else {
result = real_parseFromString.apply(this, arguments);
}
return result;
};
}(DOMParser));
{
"name": "renderjs",
"version": "0.4.1",
"version": "0.5.0",
"description": "RenderJs provides HTML5 gadgets",
"main": "dist/renderjs-latest.js",
"directories": {
"lib": "lib"
},
"dependencies": {
"rsvp": "git+http://git.erp5.org/repos/rsvp.js.git"
},
......@@ -21,7 +18,8 @@
"grunt-curl": "~1.2.1",
"sinon": "~1.7.3",
"connect-livereload": "~0.3.0",
"grunt-open": "~0.2.2"
"grunt-open": "~0.2.2",
"grunt-contrib-concat": "~0.3.0"
},
"scripts": {
"test": "./node_modules/.bin/grunt test",
......
/*! RenderJs */
/*
* DOMParser HTML extension
* 2012-09-04
*
* By Eli Grey, http://eligrey.com
* Public domain.
* NO WARRANTY EXPRESSED OR IMPLIED. USE AT YOUR OWN RISK.
*/
/*! @source https://gist.github.com/1129031 */
(function (DOMParser) {
"use strict";
var DOMParser_proto = DOMParser.prototype,
real_parseFromString = DOMParser_proto.parseFromString;
// Firefox/Opera/IE throw errors on unsupported types
try {
// WebKit returns null on unsupported types
if ((new DOMParser()).parseFromString("", "text/html")) {
// text/html parsing is natively supported
return;
}
} catch (ignore) {}
DOMParser_proto.parseFromString = function (markup, type) {
var result, doc, doc_elt, first_elt;
if (/^\s*text\/html\s*(?:;|$)/i.test(type)) {
doc = document.implementation.createHTMLDocument("");
doc_elt = doc.documentElement;
doc_elt.innerHTML = markup;
first_elt = doc_elt.firstElementChild;
if (doc_elt.childElementCount === 1
&& first_elt.localName.toLowerCase() === "html") {
doc.replaceChild(first_elt, doc_elt);
}
result = doc;
} else {
result = real_parseFromString.apply(this, arguments);
}
return result;
};
}(DOMParser));
/*
* renderJs - Generic Gadget library renderer.
* http://www.renderjs.org/documentation
......
......@@ -6,7 +6,6 @@
<meta name="viewport" content="width=device-width, height=device-height"/>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<script src="../node_modules/rsvp/dist/rsvp-2.0.4.js" type="text/javascript"></script>
<script src="../lib/jschannel/jschannel.js" type="text/javascript"></script>
<script src="../dist/renderjs-latest.js" type="text/javascript"></script>
<script src="./embedded.js" type="text/javascript"></script>
</head>
......
......@@ -9,7 +9,6 @@
<script src="../node_modules/rsvp/dist/rsvp-2.0.4.js" type="text/javascript"></script>
<script src="../node_modules/grunt-contrib-qunit/test/libs/qunit.js" type="text/javascript"></script>
<script src="../node_modules/sinon/pkg/sinon.js" type="text/javascript"></script>
<script src="../lib/jschannel/jschannel.js" type="text/javascript"></script>
<script src="../dist/renderjs-latest.js" type="text/javascript"></script>
<script src="renderjs_test.js" type="text/javascript"></script>
</head>
......
......@@ -1969,7 +1969,6 @@
"../node_modules/rsvp/dist/rsvp-2.0.4.js",
"../node_modules/grunt-contrib-qunit/test/libs/qunit.js",
"../node_modules/sinon/pkg/sinon.js",
"../lib/jschannel/jschannel.js",
"../dist/renderjs-latest.js",
"renderjs_test.js"
]);
......@@ -1984,7 +1983,6 @@
"../node_modules/rsvp/dist/rsvp-2.0.4.js",
"../node_modules/grunt-contrib-qunit/test/libs/qunit.js",
"../node_modules/sinon/pkg/sinon.js",
"../lib/jschannel/jschannel.js",
"../dist/renderjs-latest.js",
"renderjs_test.js"
]);
......
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