Skip to content

Instantly share code, notes, and snippets.

@Craga89
Created July 26, 2015 22:25
Show Gist options
  • Select an option

  • Save Craga89/4f34e9cf972456f505df to your computer and use it in GitHub Desktop.

Select an option

Save Craga89/4f34e9cf972456f505df to your computer and use it in GitHub Desktop.
Durandal + Webpack: Part 1 - Module Format
define(id?: String, dependencies?: String[], factory: Function|Object);
var system = require('durandal/system');
var $ = require('jquery');
// Module logic here
var viewEngine = { ... };
// Exports the viewEngine object
module.exports = viewEngine;
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