Skip to content

Commit

Permalink
feat(tasks): add build, pretest and posttest tasks
Browse files Browse the repository at this point in the history
TAG: latest

closes #3
  • Loading branch information
tunnckoCore committed Aug 11, 2017
1 parent ebef300 commit 95f42e9
Show file tree
Hide file tree
Showing 3 changed files with 35 additions and 0 deletions.
11 changes: 11 additions & 0 deletions tasks/build.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
/*!
* hela <https://github.com/tunnckoCore/hela>
*
* Copyright (c) 2017 Charlike Mike Reagent <[email protected]> (https://i.am.charlike.online)
* Released under the MIT license.
*/

module.exports = ({ shell }) => {
console.log('Running `build` command...')
shell('rollup -c')
}
12 changes: 12 additions & 0 deletions tasks/posttest.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
/*!
* hela <https://github.com/tunnckoCore/hela>
*
* Copyright (c) 2017 Charlike Mike Reagent <[email protected]> (https://i.am.charlike.online)
* Released under the MIT license.
*/

const { shell } = require('execa')

module.exports = ({ app }) => {
shell("sed -i 's/dest/src/' test.js").catch((er) => app.emit('error', er))
}
12 changes: 12 additions & 0 deletions tasks/pretest.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
/*!
* hela <https://github.com/tunnckoCore/hela>
*
* Copyright (c) 2017 Charlike Mike Reagent <[email protected]> (https://i.am.charlike.online)
* Released under the MIT license.
*/

const { shell } = require('execa')

module.exports = ({ app }) => {
shell("sed -i 's/src/dest/' test.js").catch((er) => app.emit('error', er))
}

0 comments on commit 95f42e9

Please sign in to comment.