f2e-middleware middlewares
with lodash template
npm i f2e-middle-template --save-dev
middlewares: [
{
test: /^test\/.*.html/,
middleware: 'template'
}
]
compile .md
to .html
npm i f2e-middle-markdown --save-dev
middlewares: [
{
test: /\.md$/,
middleware: 'markdown',
suffix: 'md',
outputSuffix: 'html',
}
]
proxy url to local server
npm i f2e-middle-proxy --save-dev
middlewares: [
{
test: /^docs/,
middleware: 'proxy',
url: 'https://f2e-server.com',
pathname: ''
},
]
show QRcode of url
npm i f2e-middle-qrcode --save-dev
middlewares: [
{
test: /^qrcode/,
middleware: 'qrcode'
},
]
rename resources dest
npm i f2e-middle-dest --save-dev
middlewares: [
{
test: /^scss/,
middleware: 'dest',
dest: 'css'
},
]
with typescript compiler
npm i f2e-middle-typescript --save-dev
use tsconfig.json
middlewares: [
{
middleware: 'typescript',
getModuleId: pathname => pathname.replace('src\/', '')
}
]