diff --git a/publish.js b/publish.js index 62405d82..fae15f0f 100644 --- a/publish.js +++ b/publish.js @@ -6,7 +6,10 @@ var fs = require('fs'); module.exports = function() { - var modulesName = fs.readdirSync(__dirname + '/dist/sub'); + var modulesName = []; + if (fs.existsSync(__dirname + '/dist/sub')){ + modulesName = fs.readdirSync(__dirname + '/dist/sub'); + } function makingComponentData(memo, name){ memo[name] = {