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