内容简介:Express middleware to expose select Node modules to browser.2020-01-24 v0.0.3 Added git link 2020-01-24 v0.0.2 Updated README format
modulastic
Express middleware to expose select Node modules to browser.
Configuration Object
{
appDir: string, // root directory below which node_modules can be found, usually __dirname
<browserRoot>: {
<nameToExpose>: {
packageName: string, // actual node package name, optional, defaults to <nameToExpose>, useful for @ prefixed packages
pathName: string // subdirectory under the module to expose, usually "dist"
}
},
... more <browserRoot> objects, rarely used
}
Example
import {modulastic} from "modulastic";
const app = express(); // obviously need to import express first
app.use(modulastic(app,{
modules: {
quill: {pathName:"dist"},
jsoneditor: {pathName:"dist"},
"dialog-polyfill": {pathName:"dist"},
"fontawesome": {packageName:"@fortawesome",pathName:"fontawesome-pro"}
},
appDir:__dirname
}));
License: MIT
Change History
2020-01-24 v0.0.3 Added git link 2020-01-24 v0.0.2 Updated README format
以上就是本文的全部内容,希望本文的内容对大家的学习或者工作能带来一定的帮助,也希望大家多多支持 码农网
猜你喜欢:本站部分资源来源于网络,本站转载出于传递更多信息之目的,版权归原作者或者来源机构所有,如转载稿涉及版权问题,请联系我们。
How to Solve It
Zbigniew Michalewicz、David B. Fogel / Springer / 2004-03-01 / USD 59.95
This book is the only source that provides comprehensive, current, and detailed information on problem solving using modern heuristics. It covers classic methods of optimization, including dynamic pro......一起来看看 《How to Solve It》 这本书的介绍吧!