You write a beautiful & documented Markdown file, we run it for you. And you have a lot of flexibility!
Example FcScripts.md file
Or if you want to ensure that your teammates are using the same version as you, it's recommended to install Maid locally:
# For npm users
npm i -D maid
# For Yarn users
yarn add maid --devPRO TIP: you can use npx or yarn command to run any locally installed executable that is inside node_modules/.bin/, e.g. use yarn maid to run the locally installed maid command.
A maidfile is where you define tasks, in Markdown!
📝 maidfile.md:
## lint
It uses ESLint to ensure code quality.
```bash
eslint --fix
```
## build
Build our main app
<!-- Following line is a maid command for running task -->
Run task `build:demo` after this
```bash
# note that you can directly call binaries inside node_modules/.bin
# just like how `npm scripts` works
babel src -d lib
```
## build:demo
You can use JavaScript to write to task script too!
```js
const webpack = require('webpack')
// Async task should return a Promise
module.exports = () =>
new Promise((resolve, reject) => {
const compiler = webpack(require('./webpack.config'))
compiler.run((err, stats) => {
if (err) return reject(err)
console.log(stats.toString('minimal'))
resolve()
})
})
```Each task is defined using h2 header and its child contents, the value of h2 header will be used as task name, its following paragraphs (optional) will be used as task description, and following code block (optional) will be used as task script.
# Start Scripts
Start running in development mode
## start:w:u
Run tasks `start:web` and `start:utils` in parallel.
## start:web
Start web with parcel
```bash
NODE_ENV=development lerna --scope=web run start --stream --NODE_ENV=development lerna --scope=utils run start --stream --Build our app
Build our main app
Run task build:demo after this
# note that you can directly call binaries inside node_modules/.bin
# just like how `npm scripts` works
babel src -d lib