Created
July 26, 2015 22:25
-
-
Save Craga89/4f34e9cf972456f505df to your computer and use it in GitHub Desktop.
Durandal + Webpack: Part 1 - Module Format
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
| define(id?: String, dependencies?: String[], factory: Function|Object); |
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
| var system = require('durandal/system'); | |
| var $ = require('jquery'); | |
| // Module logic here | |
| var viewEngine = { ... }; | |
| // Exports the viewEngine object | |
| module.exports = viewEngine; |
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
| define(['durandal/system', 'jquery'], function(system, $) { | |
| // Module logic here | |
| var viewEngine = { ... }; | |
| // Exports the viewEngine object | |
| return viewEngine; | |
| }); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment