v0.6.0-beta.3
Pre-release
Pre-release
LoicPoullain
released this
27 Aug 10:14
·
4315 commits
to master
since this release
Features
- Do not build test when running npm run build (#182).
- Remove all the outdated test.ts which are not required anymore in v0.6.0-beta.2 (#182).
- Make
render
use template paths (#184). - Move migrations to
src/migrations
(issue: #175) (#185). - Add the exports to the
index.ts
when creating a file (#186). - [@foal/cli] [Internal] Refactor @foal/cli (#188).
How to migrate
Update your dependencies by running npm update
.
The render
util
// Before
import { readFileSync } from 'fs';
import { join } from 'path';
const login = readFileSync(join(__dirname, './templates/login.html'), 'utf8');
render(login, { csrfToken: ctx.request.csrfToken() });
// After
render('./templates/login.html', { csrfToken: ctx.request.csrfToken() }, __dirname);
The migrations
- Move you root
migrations
directory (if it exists) tosrc
. - Update your
tslint.json
andormconfig.json
with:
{
...
"linterOptions": {
"exclude": "src/migrations/*.ts"
}
}
{
...
"migrations": ["lib/migrations/*.js"],
"cli": {
"migrationsDir": "src/migrations"
},
}