Project Name | Stars | Downloads | Repos Using This | Packages Using This | Most Recent Commit | Total Releases | Latest Release | Open Issues | License | Language |
---|---|---|---|---|---|---|---|---|---|---|
Avalon | 5,743 | 40 | 18 | 4 years ago | 37 | February 07, 2018 | 122 | other | JavaScript | |
an elegant efficient express mvvm framework | ||||||||||
Valley Tpl | 21 | 4 years ago | JavaScript | |||||||
JavaScript Template Engine For ValleyJS | ||||||||||
Askme | 18 | 6 months ago | 6 | mit | Kotlin | |||||
Social media app to ask and answer user questions and interact with users | ||||||||||
Node Library | 6 | 3 years ago | 3 | CSS | ||||||
全栈项目 使用nodejs作为后台 vue作为前台 使用axios进行交互 使用代理解决跨域问题(本项目已废弃,作者正在写新版本) | ||||||||||
Simplemvvmtoolkit.samples.wpf | 4 | 4 years ago | mit | C# | ||||||
Windows Presentation Foundation Sample for Simple MVVM Toolkit Express | ||||||||||
Meteor Chatroom | 4 | 7 years ago | JavaScript | |||||||
Mongodb | 3 | 5 years ago | CSS | |||||||
小米商城 | ||||||||||
Iappraise | 2 | 5 years ago | agpl-3.0 | JavaScript | ||||||
Anonymous appraise system | ||||||||||
Youtubeplayer Kotlin | 2 | 5 years ago | Kotlin | |||||||
simple mock Youtube-like player using MVVM-Architecture Components(Data-Binding, Room, ViewModel, LiveData), Dagger2, Retrofit and RxAndroid and Backend in NodeJS with mongodb |
1.1
ValleyTplJavascript StringBased Browser NodeJS
Express\Koa\koa2
MVVM DomBased MVVM StringBased
npm i
npm test
valleytpl.jsvalleytpl.min.js
npm run build:web
ValleyTpl
<script src="dist/valleytpl.js"></script>
<script src="dist/valleytpl.min.js"></script>
vtpl.useCache = true; // truefalse
vtpl(tpl, data);
NoedeJS > 8.0
vtpl-node.js
npm run build:node
const vtpl = require('./dist/index.js');
npm i valley-tpl
const vtpl = require('valley-tpl');
// run in async function
let tplContent = await vtpl.prepareTpl(tpl);
vtpl(tplContent, data);
vtpl.prepareTpl(tpl).then(tplContent => vtpl(tplContent, data));
vtp.setConfig({
extension, // xtpl
encoding, // utf-8
useCache, // truecache
})
{* ... *} //
*** ... //
{{name}} //
{{name|filter}} //
{{name|filter:1,"a"}} // namefilter
vtpl.register('functionName', function)
vtpl.unregister('functionName')
* htmlspecialchars // HTML
* datestr //
if ... else if ... else
{{if a === 1}}
...
{{elseif b === 1}}
...
{{else}}
...
{{/if}}
for
{{for i = 0; i < list.length; i ++}}
...
{{/for}}
each
{{each list as item , index}}
...
{{/each}}
hack
hack
{{hack}}
...
{{/hack}}
extends/block //smarty
{{extends parent}}
...
{{block block_name}}{{/block}}
{{block block_name}}
...
{{/block}}
common.tpl
{{include common}}