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

```bash
echo "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

```bash
npx parcel build index.html
``` ## dev ```bash
npx parcel index.html
```
npx maid build

npx maid dev

----

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

## build

Run task `start`.

Run task `end` after.

```bash
npx parcel build index.html
``` ## dev ```bash
npx parcel index.html
``` ## start ```js
console.log("task start")
``` ## end ```js
console.log("task end")
```

---

Add description for the tasks:

## build

This build the project

Run task `start`.

Run task `end` after.

```bash
npx parcel build index.html
``` ## dev This is for development ```bash
npx parcel index.html
``` ## start This run before the build ```js
console.log("task start")
``` ## end This run after the build ```js
console.log("task end")
```

Run:

npx maid help

----

Using README.md:

in README file, we just need to add

<!-- maid-tasks -->

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

# DEMOs

    * mdx-deck
*react-live
*maid ## Tasks
<!-- maid-tasks --> ### build This build the project Run task `start`. Run task `end` after. ```bash
npx parcel build index.html
``` ### dev This is for development ```bash
npx parcel index.html
``` ### start This run before the build ```js
console.log("task start")
``` ### end This run after the build ```js
console.log("task end")
```

Github

[Maid] Write Tasks in Markdown with Maid的更多相关文章

  1. 【推理】UVa 10771 - Barbarian tribes

      Barbarian tribes  In a lost land two primitive tribes coexist: Gareds and Kekas. Every summer sols ...

  2. 项目开发笔记-传单下发 名片替换 文件复制上传/html静态内容替换/json解析/html解析

    //////////////////////////// 注意: 此博客是个人工作笔记 非独立demo////////////////////////////////// .............. ...

  3. Echarts基于动态数据初步使用 及问题 代码记录.

    ECHARTS 插件 基本的动态数据展示(横向图) 下载 echarts.commn.min.js文件 在页面中进行引用, 并为Echarts图形准备一个div盒子 <!-- 引入插件 --&g ...

  4. 好文推荐系列--------(3)GruntJS 在线重载 提升生产率至新境界

    好文原文地址:http://segmentfault.com/a/1190000000354555 本文将首先介绍grunt-markdown插件如何配合HTML模板使用,接着我将介绍如何使用grun ...

  5. MarkDown入门指南

    标题 标题是每篇文章必备而且最常用的格式. 在Markdown中,如果想将一段文字定义为标题,只需要在这段文字前面加上 #,再在 # 后加一个空格即可.还可增加二.三.四.五.六级标题,总共六级,只需 ...

  6. 网易云免费OSS服务用做Markdown图床或博客图片外链

    我使用据说是Windows下最好用的Markdown编辑器“MarkdownPad2”(个人感觉还是Visual Code+Markdown插件666)写Markdown,在贴图方面遇到一个问题,于是 ...

  7. markdown绘图插件----mermaid简介

    作者:黄永刚 mermaid简介 当撰写文档的时候,对于流程图的生成大多使用Visio等繁重的工具,没有一种轻便的工具能够画图从而简化文档的编写,就像markdown那样. mermaid解决这个痛点 ...

  8. 配置 Sublime Text 3 作为Python R LaTeX Markdown IDE

    配置 Sublime Text 3 作为Python R LaTeX Markdown IDE 配置 Sublime Text 3 作为Python IDE IDE的基本功能:代码提醒.补全:编译文件 ...

  9. 掌握Markdown

    翻译自 https://guides.github.com/features/mastering-markdown/ 转载请注明链接 掌握Markdown Markdown是Github平台上一种轻量 ...

随机推荐

  1. [转载]iTOP-4418开发板Ubuntu系统烧写方法分享

    本文转自迅为论坛:http://topeetboard.com 开发平台:iTOP-4418开发板系统:Ubuntu 1. TF卡读写速度测试烧写 Ubuntu 对于 TF 卡的要求比较高,很多老旧的 ...

  2. (转) 淘淘商城系列——解决KindEditor上传图片浏览器兼容性问题

    http://blog.csdn.net/yerenyuan_pku/article/details/72808229 上文我们已实现了图片上传功能,但是有个问题,那就是对浏览器兼容性不够,因为Map ...

  3. fedora27安装ssh

    Fedora安装sshd 先确认是否已安装ssh服务: [root@localhost ~]# rpm -qa | grep openssh-server openssh-server-5.3p1-1 ...

  4. “完美”解决微信小程序购物车抛物动画,在连续点击时出现计算错误问题,定时器停不下来。

    最近做,微信点餐小程序,遇到添加商品时出现抛物动画,参考借鉴了这位大神的方法 https://www.cnblogs.com/greengage/p/7815842.html 但出现了一个问题,连续点 ...

  5. nodejs初探

    var http= require('http');var server= http.createServer(function(req,res){ res.writeHead(200,{" ...

  6. BZOJ 3144 切糕 最小割

    题意: 一个矩阵,每个格子分配一个数,不同的数字,代价不同,要求相邻格子数字差小等于d 求最小代价. 分析: 我猜肯定有人看题目就想到最小割了,然后一看题面理科否决了自己的这个想法…… 没错,就是最小 ...

  7. 梦回----32位CPU和64位CPU的通用寄存器

    1 32位Intel的CPU通用寄存器 32位CPU所含有的寄存器有:4个数据寄存器(EAX.EBX.ECX和EDX):2个变址和指针寄存器(ESI和EDI):2个指针寄存器(ESP和EBP):6个段 ...

  8. ubuntu(linux)占领小米平板2(mipad2)

    昨天 2014年,媳妇坐月子,给媳妇买了mi6和一个小米平板2(16G).是我们人生拥有的第一个平板,激动不已. 买之前看了小米平板1的口碑不错,arm构架,NVIDIA的主板好像,图形处理做得当然没 ...

  9. YOLOv3测试命令

    一.老规矩 在darknet\build\darknet\x6下按住shift键,点击鼠标右键选择“在此处打开Powershell 窗口(s)” 二.测试图片命令: .\darknet detect ...

  10. Java使用ZXing生成/解析二维码图片

    ZXing是一种开源的多格式1D/2D条形码图像处理库,在Java中的实现.重点是在手机上使用内置摄像头来扫描和解码设备上的条码,而不与服务器通信.然而,该项目也可以用于对桌面和服务器上的条形码进行编 ...