-
Notifications
You must be signed in to change notification settings - Fork 330
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Make cleaning async and deal with the consequences of that
Use rimraf as a function, fixes #181 Includes a bit of refactoring to reduce duplicated spinner management
- Loading branch information
Showing
18 changed files
with
203 additions
and
202 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,6 @@ | ||
import exec from '../exec' | ||
import {clean} from '../utils' | ||
|
||
import ora from 'ora' | ||
|
||
export default function cleanApp(args) { | ||
export default function cleanApp(args, cb) { | ||
let dist = args._[1] || 'dist' | ||
|
||
let spinner = ora('Cleaning app').start() | ||
try { | ||
exec('rimraf', ['coverage', dist]) | ||
spinner.succeed() | ||
} | ||
catch (err) { | ||
spinner.fail() | ||
throw err | ||
} | ||
clean('app', ['coverage', dist], cb) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,5 @@ | ||
import exec from '../exec' | ||
import {clean} from '../utils' | ||
|
||
import ora from 'ora' | ||
|
||
export default function cleanModule(args) { | ||
let spinner = ora('Cleaning demo').start() | ||
try { | ||
exec('rimraf', ['demo/dist']) | ||
spinner.succeed() | ||
} | ||
catch (err) { | ||
spinner.fail() | ||
throw err | ||
} | ||
export default function cleanDemo(args, cb) { | ||
clean('demo', ['demo/dist'], cb) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,5 @@ | ||
import exec from '../exec' | ||
import {clean} from '../utils' | ||
|
||
import ora from 'ora' | ||
|
||
export default function cleanModule(args) { | ||
let spinner = ora('Cleaning module').start() | ||
try { | ||
exec('rimraf', ['coverage', 'es', 'lib', 'umd']) | ||
spinner.succeed() | ||
} | ||
catch (err) { | ||
spinner.fail() | ||
throw err | ||
} | ||
export default function cleanModule(args, cb) { | ||
clean('module', ['coverage', 'es', 'lib', 'umd'], cb) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.