fixing and simplifying build process
This commit is contained in:
parent
13c5afa300
commit
ed7427cd79
4 changed files with 8 additions and 13 deletions
|
|
@ -55,9 +55,7 @@ copy({
|
||||||
copy.source.commonjs({
|
copy.source.commonjs({
|
||||||
project: project,
|
project: project,
|
||||||
require: [
|
require: [
|
||||||
'pilot/fixoldbrowsers',
|
|
||||||
'pilot/plugin_manager',
|
'pilot/plugin_manager',
|
||||||
'pilot/settings',
|
|
||||||
'pilot/environment',
|
'pilot/environment',
|
||||||
'pilot/index',
|
'pilot/index',
|
||||||
'startup',
|
'startup',
|
||||||
|
|
@ -244,7 +242,7 @@ copy({
|
||||||
// Create the compressed and uncompressed output files
|
// Create the compressed and uncompressed output files
|
||||||
copy({
|
copy({
|
||||||
source: data,
|
source: data,
|
||||||
//filter: copy.filter.uglifyjs,
|
filter: copy.filter.uglifyjs,
|
||||||
dest: 'build/old-ace.js'
|
dest: 'build/old-ace.js'
|
||||||
});
|
});
|
||||||
copy({
|
copy({
|
||||||
|
|
|
||||||
|
|
@ -35,8 +35,7 @@
|
||||||
*
|
*
|
||||||
* ***** END LICENSE BLOCK ***** */
|
* ***** END LICENSE BLOCK ***** */
|
||||||
|
|
||||||
var deps = [ "pilot/fixoldbrowsers", "pilot/plugin_manager", "pilot/settings",
|
var deps = [ "pilot/plugin_manager", "pilot/environment" ];
|
||||||
"pilot/environment" ];
|
|
||||||
|
|
||||||
require(deps, function() {
|
require(deps, function() {
|
||||||
var catalog = require("pilot/plugin_manager").catalog;
|
var catalog = require("pilot/plugin_manager").catalog;
|
||||||
|
|
|
||||||
|
|
@ -17,7 +17,7 @@
|
||||||
}
|
}
|
||||||
}</div>
|
}</div>
|
||||||
|
|
||||||
<script src="ace2-uncompressed.js" type="text/javascript" charset="utf-8"></script>
|
<script src="ace-uncompressed.js" type="text/javascript" charset="utf-8"></script>
|
||||||
<script>
|
<script>
|
||||||
document.addEventListener("DOMContentLoaded", function() {
|
document.addEventListener("DOMContentLoaded", function() {
|
||||||
ace.edit("editor");
|
ace.edit("editor");
|
||||||
|
|
|
||||||
|
|
@ -47,8 +47,6 @@ function define(module, payload) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
console.log('defining module: ' + module + ' as a ' + typeof payload);
|
|
||||||
|
|
||||||
if (!define.modules) {
|
if (!define.modules) {
|
||||||
define.modules = {};
|
define.modules = {};
|
||||||
}
|
}
|
||||||
|
|
@ -58,7 +56,7 @@ function define(module, payload) {
|
||||||
/**
|
/**
|
||||||
* Get at functionality define()ed using the function above
|
* Get at functionality define()ed using the function above
|
||||||
*/
|
*/
|
||||||
define.require = function(module, callback) {
|
function require(module, callback) {
|
||||||
if (Array.isArray(module)) {
|
if (Array.isArray(module)) {
|
||||||
var params = [];
|
var params = [];
|
||||||
module.forEach(function(m) {
|
module.forEach(function(m) {
|
||||||
|
|
@ -71,13 +69,13 @@ define.require = function(module, callback) {
|
||||||
}
|
}
|
||||||
|
|
||||||
if (typeof module === 'string') {
|
if (typeof module === 'string') {
|
||||||
payload = define.lookup(module);
|
var payload = define.lookup(module);
|
||||||
if (callback) {
|
if (callback) {
|
||||||
callback();
|
callback();
|
||||||
}
|
}
|
||||||
return payload;
|
return payload;
|
||||||
}
|
}
|
||||||
};
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Internal function to lookup moduleNames and resolve them by calling the
|
* Internal function to lookup moduleNames and resolve them by calling the
|
||||||
|
|
@ -90,9 +88,9 @@ define.lookup = function(moduleName) {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (typeof payload === 'function') {
|
if (typeof module === 'function') {
|
||||||
var exports = {};
|
var exports = {};
|
||||||
payload(define.require, exports, { id: moduleName, uri: '' });
|
module(require, exports, { id: moduleName, uri: '' });
|
||||||
// cache the resulting module object for next time
|
// cache the resulting module object for next time
|
||||||
define.modules[moduleName] = exports;
|
define.modules[moduleName] = exports;
|
||||||
return exports;
|
return exports;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue