Skip to content

Commit

Permalink
fix: onwrite not returning the promise
Browse files Browse the repository at this point in the history
  • Loading branch information
tivac committed Nov 21, 2017
1 parent 623be71 commit 9ab15de
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion packages/rollup/rollup.js
Original file line number Diff line number Diff line change
Expand Up @@ -99,9 +99,10 @@ module.exports = function(opts) {
},

onwrite : function(bundle, result) {
result.css.then(function(data) {
return result.css.then((data) => {
if(options.css) {
mkdirp.sync(path.dirname(options.css));

fs.writeFileSync(
options.css,
data.css
Expand All @@ -110,6 +111,7 @@ module.exports = function(opts) {

if(options.json) {
mkdirp.sync(path.dirname(options.json));

fs.writeFileSync(
options.json,
JSON.stringify(data.compositions, null, 4)
Expand Down

0 comments on commit 9ab15de

Please sign in to comment.