This repository has been archived by the owner on Dec 31, 2017. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 129
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update to function with latest version of build system.
- Loading branch information
Showing
5 changed files
with
68 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,24 +1,55 @@ | ||
/** | ||
* Build profiles look mostly the same in Dojo 1.7 as they do in previous versions of the toolkit. | ||
*/ | ||
dependencies = { | ||
// First cleans the dist directory of existing code, then builds a new release. | ||
action: 'clean,release', | ||
async: true, | ||
|
||
// Strips all comments from CSS files. | ||
cssOptimize: 'comments', | ||
|
||
// Excludes tests, demos, and original template files from being included in the built version. | ||
mini: true, | ||
|
||
// Uses ShrinkSafe as the JavaScript minifier. This can also be set to "closure" to use Closure Compiler. | ||
optimize: 'shrinksafe', | ||
|
||
// This is the directory within the output directory that built JavaScript will be placed. | ||
releaseName: 'js', | ||
|
||
// Strips all calls to console functions within the code. | ||
stripConsole: 'all', | ||
|
||
// Builds can be split into multiple different JavaScript files called "layers". This allows applications to | ||
// defer loading large sections of code until they are actually required. Note that, at the moment, module IDs | ||
// in "dependencies" are still written using dots instead of slashes. | ||
layers: [ | ||
{ name: '../app/_base.js', resourceName: 'app._base', dependencies: [ 'app._base', 'app.main' ] } | ||
// The default selector engine is not included by default in a dojo.js build in order to make mobile builds | ||
// smaller. We add it back here to avoid that extra HTTP request. | ||
{ name: 'dojo.js', dependencies: [ 'dojo.selector.acme' ] }, | ||
|
||
// This is our main application layer. This layer will normally contain most or all of your application code. | ||
{ name: '../app/main.js', dependencies: [ 'app.main' ] }, | ||
|
||
// In the demo application, we conditionally require app/Dialog on the client-side, so we're building a | ||
// separate layer containing just that client-side code. | ||
{ name: '../app/Dialog.js', dependencies: [ 'app.Dialog' ] } | ||
], | ||
|
||
// Each package requires a defined prefix so that the builder can find and combine modules into a single file. | ||
// The first string in each array is the package name, and the second string is the path to that package, relative | ||
// to the directory containing dojo.js. | ||
prefixes: [ | ||
[ 'dijit', '../dijit' ], | ||
[ 'dojox', '../dojox' ], | ||
[ 'app', '../app' ], | ||
[ 'dbp', '../dbp' ] | ||
], | ||
|
||
// Providing hints to the build system allows code to be conditionally removed on a more granular level than | ||
// simple module dependencies can allow. This is especially useful for creating tiny mobile builds. | ||
// Keep in mind that dead code removal only happens in minifiers that support it! Currently, ShrinkSafe does not | ||
// support dead code removal; Closure Compiler and UglifyJS do. | ||
staticHasFeatures: { | ||
'dojo-sync-loader':0 | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
/** | ||
* This file is used to reconfigure parts of the loader at runtime for this application. We've put this extra | ||
* configuration in a separate file, instead of adding it directly to index.html, because it contains options that | ||
* can be shared if the application is run on both the client and the server. | ||
* | ||
* If you aren't planning on running your app on both the client and the server, you could easily move this | ||
* configuration into index.html (as a dojoConfig object) if it makes your life easier. | ||
* | ||
* This file must remain outside of any defined package directory at the current time or it will be transformed by the | ||
* build system into a legacy module. | ||
*/ | ||
require({ | ||
// The base path for all packages and modules. If you don't provide this, baseUrl defaults to the directory | ||
// that contains dojo.js. | ||
baseUrl: 'js/', | ||
|
||
// A list of packages to register. Strictly speaking, you do not need to register any packages, | ||
// but you can't require "app" and get app/main.js if you do not register the "app" package (the loader will look | ||
// for a module at app.js instead). Unregistered packages also cannot use the packageMap feature, which might | ||
// be important to you if you need to relocate dependencies. | ||
packages: [ | ||
{ name: 'dojo', location: 'dojo' }, | ||
{ name: 'dijit', location: 'dijit' }, | ||
{ name: 'dojox', location: 'dojox' }, | ||
{ name: 'app', location: 'app' }, | ||
{ name: 'dbp', location: 'dbp' } | ||
] | ||
}, [ 'app' ]); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters