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