yewumian / nodetpl Goto Github PK
View Code? Open in Web Editor NEWA powerful, efficient, easy to use, funny JavaScript template engine
Home Page: http://www.nodetpl.com/
License: MIT License
A powerful, efficient, easy to use, funny JavaScript template engine
Home Page: http://www.nodetpl.com/
License: MIT License
模板中样式若出现 @Keyframes 设置动画,样式解析出错。
@-webkit-keyframes preloaderSpin {
100% {
-webkit-transform: rotate(360deg);
transform: rotate(360deg);
}
}
@keyframes preloaderSpin {
100% {
-webkit-transform: rotate(360deg);
transform: rotate(360deg);
}
}
随机ID会插入到错误的位置:
@-webkit-keyframes #nodetpl_g_04203291708387551 preloaderSpin {
100% #nodetpl_g_04203291708387551 {
-webkit-transform: rotate(360deg);
transform: rotate(360deg);
}
}
@keyframes #nodetpl_g_04203291708387551 preloaderSpin {
100% #nodetpl_g_04203291708387551 {
-webkit-transform: rotate(360deg);
transform: rotate(360deg);
}
}
像php的原生模板语法如下:
$value): ?><? if(): ?>
<? else if(): ?>
<? endif ?>
include增加头部 尾部 公共模块 这个便于开发者 头尾部只需要书写一次
C:\Users\movf\AppData\Roaming\npm\node_modules\nodetpl\lib\cli.js:42
if (!path.isAbsolute(options.path)) {
^
TypeError: Object # has no method 'isAbsolute'
at async.waterfall.fs.stat.filemode (C:\Users\movf\AppData\Roaming\npm\node_
modules\nodetpl\lib\cli.js:42:15)
at nextTask (C:\Users\movf\AppData\Roaming\npm\node_modules\nodetpl\node_mod
ules\async\dist\async.js:6627:18)
at Object.waterfall (C:\Users\movf\AppData\Roaming\npm\node_modules\nodetpl
node_modules\async\dist\async.js:6630:9)
at Object. (C:\Users\movf\AppData\Roaming\npm\node_modules\nodetp
l\lib\cli.js:30:7)
at Module._compile (module.js:456:26)
at Object.Module._extensions..js (module.js:474:10)
at Module.load (module.js:356:32)
at Function.Module._load (module.js:312:12)
at Module.require (module.js:364:17)
at require (module.js:380:17)
增加注释功能。
语法:
Demo:
get方法里使用相对路径不调用回调函数
这很蛋疼啊...nodetpl.client.js没有使用手册用起来很费劲了
CSS中,若存在单引号,模板会误把单引号做两次转义,从而导致报错。
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.