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. Log4net快速搭建

    nuget安装log4net 2018.12.10当前版本为2.0.8 找到所在项目的[Properties->AssemblyInfo] 在底部加上 [assembly: log4net.Co ...

  2. 从Code::Blocks到Dev–C++,Dev-C++安装调试一条龙

    关于单文件调试 Codeblocks只支持单文件编译,不支持单文件调试,只有整个工程才能调试,还有路径名里不能有中文和空格,很坑的!就因为这个弃用了. 去你的吧! 老子用别的了 谁支持单文件编译和调试 ...

  3. flask的基本搭建

    from flask import Flask app = Flask(__name__) @app.route("/")def index(): return "ok& ...

  4. zabbix基础安装

    环境依赖:LNMP或者LAMP 简介参考:http://blog.51cto.com/zhang789/1868880 一.准备 我安装的环境及其版本如下: 系统版本 CentOS Linux rel ...

  5. python 双冒号

    Python序列切片地址可以写为[开始:结束:步长],其中的开始和结束可以省略 1.range(n)生成[0,n)区间整数 range(10) [0,1,2,3,4,5,6,7,8,9] 2.开始st ...

  6. 【原】简单shell练习(一)

    1.交互式脚本 #!/bin/bash read -p "Enter your name:" name #read提示用户输入 echo "hello $name, we ...

  7. Bullet:MySQL增强半同步参数rpl_semi_sync_master_wait_point值AFTER_SYNC和AFTER_COMMIT的对比实验

    MySQL 5.7.22启用增强半同步复制 MySQL对该参数值的描述 Semisync can wait for slave ACKs at one of two points, AFTER_SYN ...

  8. JZOJ5776. 【NOIP2008模拟】小x游世界树

    题目:[NOIP2008模拟]小x游世界树: 题目的附加题解给的很清楚,这里只给一个代码: #include<iostream> #include<cstdio> #inclu ...

  9. [Luogu] P3846 [TJOI2007]可爱的质数

    题目描述 给定一个质数P(2<=P<2312^{31}231),以及一个整数B(2<=B<P),一个整数N(2<=N<P). 现在要求你计算一个最小的L,满足BL≡ ...

  10. 启发式合并CodeForces - 1009F

    E - Dominant Indices CodeForces - 1009F You are given a rooted undirected tree consisting of nn vert ...