1 |
|
2 | ## 5.0.0~6.0.0
|
3 |
|
4 | * `koa@2` is supported by default and `koa@1` is not supported
|
5 | * don't compile released code to ES5 (this means you need Node_v7.6, the same as `koa@2` requires)
|
6 | * [BugFix] fix error if filename contains dot
|
7 | * [BugFix] default extension should not be changed
|
8 | * [BugFix] fix partials not working properly in handlebars
|
9 | * make consolidate engine source optional and allow configuration
|
10 |
|
11 | ## 5.0.0
|
12 |
|
13 | * `koa@2` support by @ifraixedes
|
14 |
|
15 | ## 4.1.0
|
16 |
|
17 | * [BugFix] state will pass now if no locals are passed
|
18 |
|
19 | ## 4.0.1
|
20 |
|
21 | * [Bugfix] Select correct extension in order to decide if the view should be sent or rendered
|
22 |
|
23 | ## 4.0.0
|
24 |
|
25 | ### Breaking changes
|
26 |
|
27 | * no root option -> use `views(path, ...)`
|
28 | * `path` should now always be absolute (no magic anymore)
|
29 |
|
30 | ```js
|
31 | // don't
|
32 | app.use(views('./views'))
|
33 |
|
34 | // do
|
35 | app.use(views(__dirname + '/views'))
|
36 | ```
|
37 |
|
38 | * `opts` is now always an object, no string can be passed in as engine
|
39 |
|
40 | ```js
|
41 | // this
|
42 | app.use(views(__dirname + '/views', 'jade'))
|
43 | // is now this
|
44 | app.use(views(__dirname + '/views', {
|
45 | extension: 'jade'
|
46 | }))
|
47 | ```
|
48 | * `opts.default` renamed to `opts.extension` to avoid misconceptions
|
49 |
|
50 | ### Non-breaking changes
|
51 |
|
52 | * more robust file require
|
53 |
|
54 |
|
55 | ```js
|
56 | // all valid (when opts.extension) set
|
57 | ./fixtures/index.ejs
|
58 | ./fixtures/index.ejs
|
59 | ./fixtures/index
|
60 | ./fixtures/
|
61 | ./fixtures
|
62 | fixtures
|
63 | ```
|
64 |
|
65 | ## 3.0.0
|
66 |
|
67 | * _Breaking_: `this.locals` is now `this.state`
|
68 | * return and yield next if this.render already exists
|
69 |
|
70 | # 2.1.2
|
71 |
|
72 | * support default to ./index.[ext]
|
73 |
|
74 | # 2.0.3
|
75 |
|
76 | * Resolves circular dependencies in `this.locals`
|
77 |
|
78 | ## 2.0.0 / 4.28.2014
|
79 |
|
80 | * default extension to .html
|
81 | * better debug messages
|
82 | * move default ext to options
|
83 | * name middleware
|
84 | * change locals behavior so they don't get set twice
|
85 | * fix path confusion, hopefully.
|
86 |
|
87 | ## 1.2.0 / 2.22.2014
|
88 |
|
89 | * use middleware instead of direct app reference
|
90 | * `this.body = yield this.render()` -> `yield this.render()`
|
91 |
|
92 | ## 1.1.0 / 2.16.2014
|
93 |
|
94 | * Use a koa instance to extend koa itself instead of adding a each method on every request.
|
95 | * `this.locals =` instead of `this.locals()`
|
96 |
|
97 | ## 1.0.0 / 2.15.2014
|
98 |
|
99 | * Renamed project from `koa-render` to `koa-views`.
|
100 | * added `this.locals()` for per-request locals.
|
101 | * refactored API
|
102 | * more descriptive debug messages.
|
103 |
|
104 | ## 0.1.0 / 12.19.2013
|
105 |
|
106 | * Allowing using extension different than engine's shortname.
|
107 |
|
108 | ## 0.0.1 / 12.19.2013
|
109 |
|
110 | * Initial commit.
|