Koa myth 打包神话或返工示例到Koa中间件中
koa-myth 将神话或实例包装到 koa 中间件中。安装方法:npm install koa-myth
。用法示例:
const km = require('koa-myth');
const rework = require('rework');
const http = require('http');
const myth = require('myth');
const koa = require('koa');
const fs = require('fs');
const port = process.env.port || 1337;
const app = koa();
const css = fs.readFileSync('index.css', 'utf8');
const bundle = km(css);
通过这个示例,您可以看到如何将 myth 集成到 koa 中,打包和处理 CSS 文件。
下载地址
用户评论