Skip to content

Commit

Permalink
Fix build scripts for .cache dir
Browse files Browse the repository at this point in the history
  • Loading branch information
ai committed Aug 11, 2019
1 parent 14b4de3 commit beefa8b
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"bump": "./scripts/bump",
"release": "./scripts/each npm publish --access public",
"postinstall": "./scripts/each yarn",
"clean": "rimraf api.md coverage/",
"clean": "rimraf api.md coverage/ packages/.cache",
"api": "documentation build packages/*/*.js -f md -o api.md",
"spell": "yarn api && yaspeller-ci packages/*/*.md",
"test": "jest --coverage && eslint-ci . && yarn spell"
Expand Down
7 changes: 6 additions & 1 deletion scripts/each
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/usr/bin/env node

let { readdirSync } = require('fs')
let { readdirSync, existsSync } = require('fs')
let { spawn } = require('child_process')
let { join } = require('path')

Expand All @@ -15,6 +15,11 @@ function nextTick () {
if (dirs.length === 0) return
let dir = dirs.pop()

if (!existsSync(join(PACKAGES, dir, 'package.json'))) {
nextTick()
return
}

process.stdout.write(`$ cd packages/${ dir }\n`)
process.stdout.write(`$ ${ command } ${ args.join(' ') }\n`)
let run = spawn(command, args, {
Expand Down

0 comments on commit beefa8b

Please sign in to comment.