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