Node.js 的 MVC 框架,total.js 1.9.3 發布
total.js 是個 web 應用框架,使用 JavaScript,HTML,CSS 和 Node.js(MVC) web 應用框架來構建 web 網站和 web 應用。
新特性
-
added: (IMPORTANT) merging supports BLOCKS (.js,.css), e.g. F.merge('merge.js', 'fileA.js#management,common', 'fileB.js#management')
</li> -
added: (IMPORTANT) a route with schema binding can contain filter e.g.
</li>*Schema#updateor*Group\Schema#create--> the framework validates only fields by filter -
added: TRANSFORM([transform], obj)
</li> -
added: NEWTRANSFORM(name, fn, [isDefault]) --> alias for TransformBuilder.addTransform()
</li> -
added: packages can be stored as directories (recommended for debug mode only)
</li> -
added: F.localize(name, url, [middleware], [options], [minify]) --> minify argument
</li> -
added: email supports calendar (.ics) request sending
</li> -
added: SchemaBuilderEntity.make(function(schema))
</li> -
added: F.install() supports packages mapping
</li> -
added: Support for unicode routing
</li> -
added: Packages can be loaded in framework structure (/controllers/, /modules/)
</li>exports.booting = true -
added: route flags can contains object --> the object is an additional options for middleware
</li> -
added: Utils.btoa(str) --> returns base64
</li> -
added: Utils.atob(str) --> returns binary
</li> -
added: global.TRY(fnScope, [fnError]) --> creates safe scope (more in documentation)
</li> -
added: Utils.getExtension(filename)
</li> -
added: @{head} can be imported as @{import('head')}
</li> -
added: @{meta} can be imported as @{import('meta')}
</li> -
added: controller.cookie('KEY') --> for reading
</li> -
added: controller.cookie('KEY', 'VALUE', expire, [options]) --> for writting
</li> -
added: framework.onParseQuery(function(value)) --> for parsing values from the requests
</li> -
added: framework.onParseXML(function(value)) --> for parsing values from the requests
</li> -
added: framework.onParseJSON(function(value)) --> for parsing values from the requests
</li> </ul>更新
-
updated: (IMPORTANT) F.onValidation() was renamed to F.onValidate()
</li> -
updated: (IMPORTANT) SchemaBuilderEntity.onValidation() was renamed to SchemaBuilderEntity.onValidate()
</li> -
updated: (IMPORTANT) SchemaBuilderEntity.setValidation() was renamed to SchemaBuilderEntity.setValidate()
</li> -
updated: CSS compressor removes comments
</li> -
updated: F.restrictions.allow('IP') --> does not have to be full IP
</li> -
updated: F.restrictions.disallow('IP') --> does not have to be full IP
</li> -
updated: String.startsWith() and String.endsWith() according to ES6 but with the backward compatibility
</li> -
updated: String.parseDate() supports JSON format and classic date serialization
</li> -
updated: U.request() --> response always returns string
</li> -
updated: debug.js --> now watchs packages
</li> </ul>Bug 修復
-
fixed: framework starting path (fixed problem with PM2 module)
</li> -
fixed: controller.memorize() - prevention for multiple requests
</li> -
fixed: routing (POST request without content-type is considered as
</li>application/x-www-form-urlencoded) -
fixed: sync2()
</li> -
fixed: U.minifyHTML() - now compresses JS and CSS in HTML.
</li> -
fixed: Async.cancel()
</li> -
fixed: email attachments
</li> -
fixed: throwing error in global middleware
</li> -
fixed: Pagination.last()
</li> -
fixed: CSS auto-vendor-prefixes
</li> -
fixed:
</li>tpmbinary (bug in creating packages on Windows) -
fixed: controller generators
</li> -
fixed: F.install() --> problem with names via URL import
</li> -
fixed: F.map() on Windows (problem with paths)
</li> -
fixed: HTML compression in views
</li> -
fixed: U.Async() object (problem with waitingFor)
</li> -
fixed: F.map(), problem in Windows
</li> -
fixed: CLEANUP(stream, [callback]);
</li> -
fixed: HTTP CACHE
</li> </ul>### 示例
-
EXAMPLE (NEW): https://github.com/totaljs/examples/tree/master/blocks
</li> </ul>下載:
- </li>
-
</li>
</ul>
本文由用戶 jopen 自行上傳分享,僅供網友學習交流。所有權歸原作者,若您的權利被侵害,請聯系管理員。轉載本站原創文章,請注明出處,并保留原始鏈接、圖片水印。本站是一個以用戶分享為主的開源技術平臺,歡迎各類分享!
-
-
-