Created
December 6, 2012 16:56
-
-
Save mkuklis/4226014 to your computer and use it in GitHub Desktop.
approach to client-side modules
This file contains hidden or 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
// modules (one per file) | |
(function (namespace) { | |
"use strict"; | |
// implementation | |
})(namespace); | |
// files.js (loaded in dev) | |
(function (namespace) { | |
namespace.files = [ | |
'module1', | |
'module2', | |
... | |
'moduleN']; | |
})(namespace); | |
// init.js (in dev) | |
// https://github.com/ded/script.js/ | |
$script.order(namespace.files); | |
// in prod use grunt tasks to prepare for release (concat, min, etc) | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment