xwenliang / fis-zoo Goto Github PK
View Code? Open in Web Editor NEW基于FIS的前端模块化解决方案,支持release到相对目录
基于FIS的前端模块化解决方案,支持release到相对目录
我在做一个基于ionic的hybrid app项目,希望release后,所有的资源引用能替换为相对路径。
安装zoo后,我做了一个demo测试,但是releas后的路径并不符合预期。
demo结构:
/demo/index.html, 在index.htm里引用 app.js, "js/app.js"
/demo/js/app.js
release后,
/output/index.html, 在index.html里的app.js 引用变成了 “../js/app.js", 预期的路径应该是”js/app.js"
/output/js/app.js
@xwenliang, 请问是我配置的问题,还是 zoo并不是设计做这个的。
附上配置:
//发布为相对路径
fis.config.set('roadmap.relative', true);
//部署配置
fis.config.set('roadmap.path', [
{
reg:/.*\.(?:js|sass|css|png|jpg|gif|html)/i,
release: '$&'
},
//任何其它文件不发布
{
reg: /\w+.(?:json|cmd)/i,
release: false
}
]);
//使用fis release --dest local来使用这个配置
fis.config.merge({
deploy : {
local : {
to : '../output',
exclude: /(?:\/_[^/]+\.\w+)|(?:\.(?:cmd|json))$/i
}
}
});
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.