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. js里的稀疏数组

    今天在逛掘金网站的时候,在一篇文章里学到一个新名字,稀疏数组,特此记录一下. 稀疏数组就是包含从0开始的不连续索引的数组.也就是说数组中大部分的内容值都未被使用(或都为零). var arr = ne ...

  2. window10换系统为windows7

    第一步 第二步 第三步 下载系统:http://www.dnxtc.net 1.GHO镜像安装器和WIN7,GHO文件必须一起放在除C盘外的其他盘的根目录 2.“GHO镜像安装器“工具上右键管理员方式 ...

  3. Java中List集合的遍历

    一.对List的遍历有三种方式 List<String> list = new ArrayList<String>(); list.add("testone" ...

  4. JavaScript中的跨域问题

    跨域问题其实很普遍的存在的,如何解决跨域问题呢,跨域问题到底是怎么产生的,解决方法的由来又是什么?我觉得看了视频讲解,值得写下来,记录下来. 一.跨域问题是怎么产生? 概念:只要协议.域名.端口有任何 ...

  5. 图解C/C++多级指针与多维数组

    声明:本文转自 chenyang_yao ,欢迎阅读原文. 指针与数组是C/C++编程中非常重要的元素,同时也是较难以理解的.其中,多级指针与“多维”数组更是让很多人云里雾里,其实,只要掌握一定的方法 ...

  6. 两种js下载文件的方法(转)

    function DownURL(strRemoteURL, strLocalURL){ try{ var xmlHTTP = new ActiveXObject("Microsoft.XM ...

  7. 配置jdk环境变量和配置的作用

    对于JDK要配置三个环境变量,分别是JAVA_HOME.path.classpath 对于我本人电脑来说,配置如下: JAVA_HOME:C:\Program Files\Java\jdk1.8.0_ ...

  8. 配置python3 项目环境

    安装python3 安装仓库软件 sudo apt-get install software-properties-common python-software-properties 添加仓库 sud ...

  9. UVaLive 4868 Palindrometer (暴力 / 构造)

    题意: 给定一个固定长度的字符串, 字符串是一个含有前导0的数字, 问这个数字加上多少能构成一个回文字符串. 分析: 其实这题有很多种方法, 方法12是我做完后看别人代码总结的, 方法3是我当时想的一 ...

  10. FPGA学习笔记(六)—— 时序逻辑电路设计

    用always@(posedge clk)描述        时序逻辑电路的基础——计数器(在每个时钟的上升沿递增1) 例1.四位计数器(同步使能.异步复位) // Module Name: coun ...