博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
[Maid] Write Tasks in Markdown with Maid
阅读量:6950 次
发布时间:2019-06-27

本文共 1739 字,大约阅读时间需要 5 分钟。

Maid enables you to write your tasks in Markdown. Create a maidfile.md or a README.mdthen add Headers to list out your tasks with codeblocks including the tasks to run. This lesson walks you through creating a few tasks in either a maidfile.md or a README.md and how to execute the tasks from the command line.

 

Install:

npm install maid --save-dev

 

Create a maidfile.md

## hello```bashecho "hi"```

Then run:

npx maid hello

 

-----

A more realworld example can be that we can use maid to run build process

 

Install:

npm i -D parcel

 

## build```bashnpx parcel build index.html```## dev```bashnpx parcel index.html```

 

npx maid buildnpx maid dev

 

 

----

 

We can also run another task before or after the build task:

## buildRun task `start`.Run task `end` after.```bashnpx parcel build index.html```## dev```bashnpx parcel index.html```## start```jsconsole.log("task start")```## end```jsconsole.log("task end")```

 

---

 

Add description for the tasks:

## buildThis build the projectRun task `start`.Run task `end` after.```bashnpx parcel build index.html```## devThis is for development```bashnpx parcel index.html```## startThis run before the build```jsconsole.log("task start")```## endThis run after the build```jsconsole.log("task end")```

 

Run: 

npx maid help

 

----

 

Using README.md:

in README file, we just need to add 

Before the tasks we want to run, and all those tasks should have "###".

# DEMOs    * mdx-deck    *react-live    *maid## Tasks
### buildThis build the projectRun task `start`.Run task `end` after.```bashnpx parcel build index.html```### devThis is for development```bashnpx parcel index.html```### startThis run before the build```jsconsole.log("task start")```### endThis run after the build```jsconsole.log("task end")```

 

 

转载地址:http://pjenl.baihongyu.com/

你可能感兴趣的文章
linux pxe 系统自动化安装
查看>>
iOS游戏开发有奖征文
查看>>
控制台读写
查看>>
LVS+keepalived负载均衡实战
查看>>
使用 IntraWeb (17) - 基本控件之 TIWRadioButton、TIWRadioGroup、TIWCheckBox
查看>>
KVM虚拟化搭建及其KVM中LVM扩容
查看>>
管理磁盘和文件系统
查看>>
CSS解决高度自适应问题
查看>>
鼠标css样式:cursor
查看>>
pdf password recovery remove去除pdf文件密码
查看>>
使用.NET连接Sybase数据库的几种方法
查看>>
myeclipse6.5安装 svn插件方法
查看>>
Spring AOP 实现原理
查看>>
肠子的小心思(三):通往消化道的入口也很神奇
查看>>
服务器负载突然飙高事件
查看>>
原来还可以这样坑人的!!切勿恶作剧!
查看>>
Memcache简介
查看>>
day18--linux下gzip、bzip2、zip、xz三种压缩工具的介绍
查看>>
Oracle 删除主键
查看>>
虚拟与现实,关于世界的本质
查看>>