Skip to content

Commit

Permalink
try to fix ci
Browse files Browse the repository at this point in the history
  • Loading branch information
kroeder committed Dec 27, 2018
1 parent 13123b7 commit a903991
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 11 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
"bootstrap": "node ./scripts/bootstrap.js",
"bootstrap:crna-kitchen-sink": "npm --prefix examples-native/crna-kitchen-sink install",
"bootstrap:docs": "yarn install --cwd docs",
"build-packs": "lerna exec --scope '@storybook/*' --parallel -- \\$LERNA_ROOT_PATH/scripts/build-pack.sh \\$LERNA_ROOT_PATH/packs",
"build-packs": "lerna exec --scope '@storybook/*' -- \\$LERNA_ROOT_PATH/scripts/build-pack.sh \\$LERNA_ROOT_PATH/packs",
"build-storybooks": "./scripts/build-storybooks.sh",
"changelog": "pr-log --sloppy --cherry-pick",
"changelog:next": "pr-log --sloppy --since-prerelease",
Expand Down
5 changes: 2 additions & 3 deletions scripts/compile-ts.js
Original file line number Diff line number Diff line change
Expand Up @@ -43,10 +43,9 @@ function tscfy(options = {}) {
}

const command = getCommand(watch);
const shellExecReturn = shell.exec(command, { silent });
const { code } = shellExecReturn;
const { code } = shell.exec(command, { silent });

handleExit(code, errorCallback(shellExecReturn));
handleExit(code, errorCallback);
}

module.exports = {
Expand Down
12 changes: 5 additions & 7 deletions scripts/prepare.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,23 +29,21 @@ function removeTsFromDist() {
}
}

function logError(type, packageJson, shellExecReturn) {
function logError(type, packageJson) {
log.error(
`FAILED to compile ${type}: ${chalk.bold(
`${packageJson.name}@${packageJson.version}\n ${shellExecReturn}`
)}`
`FAILED to compile ${type}: ${chalk.bold(`${packageJson.name}@${packageJson.version}`)}`
);
}

const packageJson = getPackageJson();

removeDist();
if (packageJson && packageJson.types && packageJson.types.indexOf('d.ts') !== -1) {
tscfy({ errorCallback: shellExecMessage => logError('ts', packageJson, shellExecMessage) });
tscfy({ errorCallback: () => logError('ts', packageJson) });
} else {
babelify({ errorCallback: shellExecMessage => logError('js', packageJson, shellExecMessage) });
babelify({ errorCallback: () => logError('js', packageJson) });
removeTsFromDist();
tscfy({ errorCallback: shellExecMessage => logError('ts', packageJson, shellExecMessage) });
tscfy({ errorCallback: () => logError('ts', packageJson) });
}

console.log(chalk.gray(`Built: ${chalk.bold(`${packageJson.name}@${packageJson.version}`)}`));

0 comments on commit a903991

Please sign in to comment.