make boot script packager friendly
This commit is contained in:
parent
d4c11fc3dd
commit
83f3f81928
4 changed files with 22 additions and 18 deletions
15
build.js
15
build.js
|
|
@ -15,6 +15,7 @@
|
|||
//in the minified files.
|
||||
//- "none": no minification will be done.
|
||||
optimize: "closure.keepLines",
|
||||
//optimize: "none",
|
||||
inlineText: true,
|
||||
useStrict: false,
|
||||
|
||||
|
|
@ -31,6 +32,18 @@
|
|||
|
||||
modules: [
|
||||
{
|
||||
name: "demo/boot",
|
||||
include: [
|
||||
"pilot/fixoldbrowsers",
|
||||
"pilot/plugin_manager",
|
||||
"pilot/settings",
|
||||
"pilot/environment",
|
||||
"pilot/index",
|
||||
"cockpit/index",
|
||||
"demo/startup"
|
||||
]
|
||||
},
|
||||
/*{
|
||||
name: "demo/startup",
|
||||
includeRequire: false,
|
||||
include: [
|
||||
|
|
@ -48,7 +61,7 @@
|
|||
"ace/theme/textmate"
|
||||
],
|
||||
includeRequire: false
|
||||
},
|
||||
},*/
|
||||
{
|
||||
name: "ace/theme/eclipse",
|
||||
exclude: [
|
||||
|
|
|
|||
18
demo/boot.js
18
demo/boot.js
|
|
@ -36,24 +36,16 @@
|
|||
* ***** END LICENSE BLOCK ***** */
|
||||
|
||||
var config = {
|
||||
packagePaths: {
|
||||
"../support/cockpit/lib": [
|
||||
{ name: "cockpit", main: "index", lib: "." }
|
||||
],
|
||||
"../support/cockpit/support/pilot/lib": [
|
||||
{ name: "pilot", main: "index", lib: "." }
|
||||
]
|
||||
},
|
||||
paths: {
|
||||
demo: "../demo",
|
||||
ace: "../lib/ace"
|
||||
ace: "../lib/ace",
|
||||
cockpit: "../support/cockpit/lib/cockpit",
|
||||
pilot: "../support/cockpit/support/pilot/lib/pilot"
|
||||
}
|
||||
};
|
||||
|
||||
var deps = [ "pilot/fixoldbrowsers", "pilot/plugin_manager", "pilot/settings",
|
||||
"pilot/environment", "demo/startup" ];
|
||||
|
||||
require(config, deps, function() {
|
||||
require(config, ["pilot/fixoldbrowsers", "pilot/plugin_manager", "pilot/settings",
|
||||
"pilot/environment", "demo/startup"], function() {
|
||||
var catalog = require("pilot/plugin_manager").catalog;
|
||||
catalog.registerPlugins([ "pilot/index", "cockpit/index" ]).then(function() {
|
||||
var env = require("pilot/environment").create();
|
||||
|
|
|
|||
|
|
@ -197,11 +197,10 @@ echo $output;
|
|||
|
||||
<input id="cockpitInput" type="text"/>
|
||||
|
||||
<script src="demo/require.js" type="text/javascript" charset="utf-8"></script>
|
||||
<script src="build/demo/startup.js" type="text/javascript" charset="utf-8"></script>
|
||||
<script src="build/demo/require.js" type="text/javascript" charset="utf-8"></script>
|
||||
<script src="build/demo/boot.js" type="text/javascript" charset="utf-8"></script>
|
||||
<script type="text/javascript">
|
||||
require("demo/boot", function() {})
|
||||
require("demo/boot");
|
||||
</script>
|
||||
|
||||
</body>
|
||||
|
|
|
|||
|
|
@ -1 +1 @@
|
|||
Subproject commit fe35847349bb96f5c5d9d559a2ff72cef0d9ae83
|
||||
Subproject commit ecdb8b3a122a1f0d2aa3f6c507bc6d0d60461943
|
||||
Loading…
Add table
Add a link
Reference in a new issue