From f0c915c54a16b2e26e1a3cae832ed215aa187474 Mon Sep 17 00:00:00 2001 From: Norbert de Langen Date: Tue, 21 Jan 2020 10:04:43 +0100 Subject: [PATCH] ignore ember-cli example for now --- scripts/build-storybooks.js | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/scripts/build-storybooks.js b/scripts/build-storybooks.js index fd0376e6b53d..1d0538e15010 100755 --- a/scripts/build-storybooks.js +++ b/scripts/build-storybooks.js @@ -7,11 +7,11 @@ const { readFile: readFileRaw, writeFile: writeFileRaw, statSync, + readFileSync, } = require('fs'); const { join } = require('path'); const readdir = promisify(readdirRaw); -const readFile = promisify(readFileRaw); const writeFile = promisify(writeFileRaw); const p = l => join(__dirname, '..', ...l); @@ -35,8 +35,8 @@ const exec = async (command, args = [], options = {}) => }); }); -const hasBuildScript = async l => { - const text = await readFile(l, 'utf8'); +const hasBuildScript = l => { + const text = readFileSync(l, 'utf8'); const json = JSON.parse(text); return !!json.scripts['build-storybook']; @@ -123,10 +123,11 @@ const handleExamples = async files => { try { stats = statSync(packageJsonLocation); } catch (e) { - // + // the folder had no package.json, we'll ignore } - return stats && stats.isFile() && hasBuildScript(packageJsonLocation); + // we do not build ember-cli example for now, since it fails + return stats && stats.isFile() && hasBuildScript(packageJsonLocation) && !f.match(/ember/); }); await deployables.reduce(async (acc, d) => {