[Maid] Write Tasks in Markdown with Maid
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")
```
[Maid] Write Tasks in Markdown with Maid的更多相关文章
- 【推理】UVa 10771 - Barbarian tribes
Barbarian tribes In a lost land two primitive tribes coexist: Gareds and Kekas. Every summer sols ...
- 项目开发笔记-传单下发 名片替换 文件复制上传/html静态内容替换/json解析/html解析
//////////////////////////// 注意: 此博客是个人工作笔记 非独立demo////////////////////////////////// .............. ...
- Echarts基于动态数据初步使用 及问题 代码记录.
ECHARTS 插件 基本的动态数据展示(横向图) 下载 echarts.commn.min.js文件 在页面中进行引用, 并为Echarts图形准备一个div盒子 <!-- 引入插件 --&g ...
- 好文推荐系列--------(3)GruntJS 在线重载 提升生产率至新境界
好文原文地址:http://segmentfault.com/a/1190000000354555 本文将首先介绍grunt-markdown插件如何配合HTML模板使用,接着我将介绍如何使用grun ...
- MarkDown入门指南
标题 标题是每篇文章必备而且最常用的格式. 在Markdown中,如果想将一段文字定义为标题,只需要在这段文字前面加上 #,再在 # 后加一个空格即可.还可增加二.三.四.五.六级标题,总共六级,只需 ...
- 网易云免费OSS服务用做Markdown图床或博客图片外链
我使用据说是Windows下最好用的Markdown编辑器“MarkdownPad2”(个人感觉还是Visual Code+Markdown插件666)写Markdown,在贴图方面遇到一个问题,于是 ...
- markdown绘图插件----mermaid简介
作者:黄永刚 mermaid简介 当撰写文档的时候,对于流程图的生成大多使用Visio等繁重的工具,没有一种轻便的工具能够画图从而简化文档的编写,就像markdown那样. mermaid解决这个痛点 ...
- 配置 Sublime Text 3 作为Python R LaTeX Markdown IDE
配置 Sublime Text 3 作为Python R LaTeX Markdown IDE 配置 Sublime Text 3 作为Python IDE IDE的基本功能:代码提醒.补全:编译文件 ...
- 掌握Markdown
翻译自 https://guides.github.com/features/mastering-markdown/ 转载请注明链接 掌握Markdown Markdown是Github平台上一种轻量 ...
随机推荐
- 模块 (Module)
#1.模块概念的官网描述 -- Module If you quit from the Python interpreter and enter it again, the definitions y ...
- nodejs的学习
nodejs 就是使用js来编写服务端的程序.它的特性是(单线程 速度快 耗内存多 异步 事件驱动) ( 一些技术的解决方案:默认情况下是 1.不支持多核,可以使用cluster 进行解 ...
- POJ数据的输入输出格式
POJ在评阅习题时需要向程序提供输入数据,并获取程序的输出结果.因此提交的程序需按照每个习题具体的输入输出格式要求处理输入输出.有的时候,测评系统给出程序的评判结果是“数据错误”或“结果错误”,有可能 ...
- json 存 window.localStorage.setItem('hideColums',hideArr);
onColumnSwitch:function(row, $element){ //JSON.parse() var showColumns=$('#table').bootstrapTable('g ...
- Win10上 visual studio设置为本地IIS运行网站时 必须以管理员身份加载项目的解决方法
右键,选择“兼容性疑难解答”. 选择“疑难解答程序” 选择“该程序需要附加权限” 点击测试程序 点击下一步 选择 是,为此程序保存这些设置
- 计算机内存数据存储基本原理----寄存器和RAM的电路基础
计算机里存储数据主要有这几个部件:CPU里的寄存器和缓存.内存(内存条)和磁盘,这里我们主要简单讲下寄存器和内存条的基础实现电路. 在前面的文章<CPU怎么计算1+1----CPU计算的电路基础 ...
- vue之packages.json添加注释的正确写法
(1)问题描述 使用vue脚手架vue-cli搭建好项目架构后,在packages.json文件里,加入注释(如下所示).接下来,运行npm run dev命令后出现报错 (2)问题解析 ①记得jso ...
- 浏览器通知Web Notifications实例页面
HTML代码: <button id="button">有人想加你为好友</button> <p id="text">< ...
- (thinkPHP)PHP常用函数大全
usleep() 函数延迟代码执行若干微秒.unpack() 函数从二进制字符串对数据进行解包.uniqid() 函数基于以微秒计的当前时间,生成一个唯一的 ID.time_sleep_until() ...
- bootloader的移植
jz2440开发板 在介绍bootloader里边的内容的时候,需要知道的是: bootloader的引入的目的就是启动linux内核,一个简单的bootloader编写需要以下的步骤: ①初始化硬件 ...