Skip to content

Commit

Permalink
Make an addon
Browse files Browse the repository at this point in the history
  • Loading branch information
mixonic committed Aug 25, 2015
1 parent 6a2fbcf commit c7ae737
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 3 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ var mobiledoc = {
]
]
};
var renderer = new DOMRenderer();
var renderer = new MobiledocDOMRenderer();
var cards = {};
var rendered = renderer.render(mobiledoc, document.createElement('div'), cards);
document.getElementById('output').appendChild(rendered);
Expand Down
17 changes: 17 additions & 0 deletions index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
var Funnel = require('broccoli-funnel');

module.exports = {
name: "mobiledoc-dom-renderer",
treeForVendor: function() {
var files = new Funnel(__dirname + '/dist/', {
files: [
'global/mobiledoc-dom-renderer.js'
],
destDir: 'mobiledoc-dom-renderer'
});
return files;
},
included: function(app) {
app.import('vendor/mobiledoc-dom-renderer/global/mobiledoc-dom-renderer.js');
}
};
8 changes: 6 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
"name": "mobiledoc-dom-renderer",
"version": "0.1.10",
"description": "Renders Mobiledoc input to DOM output",
"main": "dist/global/mobiledoc-dom-renderer.js",
"scripts": {
"test": "testem ci",
"build": "rm -rf dist/ && broccoli build dist"
Expand All @@ -12,6 +11,7 @@
"url": "https://github.com/bustlelabs/mobiledoc-dom-renderer"
},
"keywords": [
"ember-addon",
"mobiledoc",
"content-kit"
],
Expand All @@ -22,7 +22,8 @@
},
"files": [
"dist",
"lib"
"lib",
"index.js"
],
"homepage": "https://github.com/bustlelabs/mobiledoc-dom-renderer",
"devDependencies": {
Expand All @@ -31,5 +32,8 @@
"broccoli-multi-builder": "^0.2.6",
"broccoli-test-builder": "^0.2.0",
"testem": "^0.9.0-1"
},
"dependencies": {
"broccoli-funnel": "^0.2.8"
}
}

0 comments on commit c7ae737

Please sign in to comment.