Skip to content

Instantly share code, notes, and snippets.

@foxdonut
Created March 30, 2015 14:08
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save foxdonut/a644dcc03a9e0ce12761 to your computer and use it in GitHub Desktop.
Save foxdonut/a644dcc03a9e0ce12761 to your computer and use it in GitHub Desktop.
wire with require and extend, some wire/aop
var _ = require("lodash");
module.exports = _.extend({
$plugins: [
require("wire/aop")
]},
require("../resource/wire-spec"), {
bookListViewModel: {
module: require("./viewModel"),
afterFulfilling: {
"bookResource.query": "bookResource.getEntity | books",
"bookResource.save": "bookResource.getEntity | addBook"
},
afterReturning: {
deleteBook: "bookResource.delete"
}
},
bookListRegistry: {
module: require("../../component/registry"),
init: {
register: [ "book-list", require("./component") ]
}
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment