express-tsx
Advanced tools
Comparing version 5.0.4 to 5.0.5
# Change Log | ||
## [5.x.x] | ||
- [ √ ] 每个 `expressTsx` 实例都有单独的 `tsconfig` 配置 | ||
- [ √ ] 编译器封装独立成一个单独包 `express-tsx-compiler` | ||
- [ × ] 不损失状态下进行热更新 | ||
- [ × ] 符合`consolidate`规范 | ||
- [x] 每个 `expressTsx` 实例都有单独的 `tsconfig` 配置 | ||
- [x] 编译器封装独立成一个单独包 `express-tsx-compiler` | ||
- [ ] 不损失状态下进行热更新 | ||
- [ ] 符合`consolidate`规范 |
@@ -26,4 +26,4 @@ "use strict"; | ||
app.settings["compilerId" /* compilerId */] = `compiler${exports.cursor++}`; | ||
const compiler = app.settings["compiler" /* compiler */] = new _1.Compile(); | ||
app.use("/express-tsx/" /* express_tsx_path */, compiler.staticServer); | ||
app.settings["compiler" /* compiler */] = new _1.Compile(viewsDir); | ||
app.use("/express-tsx/" /* express_tsx_path */, app.settings["compiler" /* compiler */].staticServer); | ||
Object.defineProperty(app.settings, 'express_tsx_path', { get() { return exports.AddBaseUrl(this.baseUrl, "/express-tsx/" /* express_tsx_path */); } }); | ||
@@ -30,0 +30,0 @@ app.use("/express-tsx-hotreload/" /* express_tsx_hotreload_path */, hotreload_1.hotreload); |
{ | ||
"name": "express-tsx", | ||
"version": "5.0.4", | ||
"version": "5.0.5", | ||
"description": "express view engine to render tsx file", | ||
@@ -18,3 +18,3 @@ "main": "dist/index.js", | ||
"consolidate": "^0.15.0", | ||
"express-tsx-compiler": "^1.0.1", | ||
"express-tsx-compiler": "^1.1.0", | ||
"fs-extra": "^4.0.2", | ||
@@ -37,3 +37,3 @@ "requirejs": "^2.3.5" | ||
"ts-node": "^3.2.0", | ||
"typescript": "^2.4.1" | ||
"typescript": "^2.6.1" | ||
}, | ||
@@ -40,0 +40,0 @@ "keywords": [ |
@@ -1,2 +0,5 @@ | ||
# 使用 | ||
# 文档 | ||
## 使用 | ||
```js | ||
@@ -7,3 +10,3 @@ var render = expressTsx(requirejsConfig,compiler=new Compiler()) | ||
# 核心 | ||
## 核心 | ||
@@ -27,5 +30,6 @@ - **编译器** | ||
- **编译好的静态文件服务** | ||
*** | ||
# 扩展 | ||
## 扩展 | ||
@@ -43,3 +47,4 @@ - **缓存** 通过 `{ cache:boolean }` 来开关, 开启后将生成一个名为 `${id}.${renderfile}.${hash}` 的html载体 | ||
- _`transform=false`_ 开启后, 在生产环境下 `paths` 配置中的 `/node_modules/module/path` 会被转换为 `https://unpkg.com/module@version/path` | ||
- <del>_`callback`_</del> 之类的不可序列化的配置是无效的 (比如不能被 `JSON.stringify` 转成字符串的属性) | ||
- _`callback`_ 之类的不可序列化的配置是无效的 (比如不能被 `JSON.stringify` 转成字符串的属性) | ||
*** |
@@ -25,4 +25,4 @@ import express = require('express') | ||
app.settings[key.compilerId] = `compiler${cursor++}` | ||
const compiler = app.settings[key.compiler] = new Compile() | ||
app.use(Vars.express_tsx_path,compiler.staticServer) | ||
app.settings[key.compiler] = new Compile(viewsDir) | ||
app.use(Vars.express_tsx_path,app.settings[key.compiler].staticServer) | ||
Object.defineProperty( | ||
@@ -29,0 +29,0 @@ app.settings, 'express_tsx_path', |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
45470
48
+ Addedcall-bound@1.0.2(transitive)
+ Addedes-object-atoms@1.0.0(transitive)
+ Addedget-intrinsic@1.2.6(transitive)
+ Addedmath-intrinsics@1.0.0(transitive)
+ Addedside-channel@1.1.0(transitive)
+ Addedside-channel-list@1.0.0(transitive)
+ Addedside-channel-map@1.0.1(transitive)
+ Addedside-channel-weakmap@1.0.2(transitive)
- Removedget-intrinsic@1.2.5(transitive)
- Removedside-channel@1.0.6(transitive)
Updatedexpress-tsx-compiler@^1.1.0