Skip to content

Commit

Permalink
feat(build): enable incremental compilation
Browse files Browse the repository at this point in the history
Signed-off-by: Miroslav Bajtoš <[email protected]>
  • Loading branch information
bajtos committed Jun 7, 2019
1 parent 77acebd commit 2120712
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 0 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ packages/tsdocs/fixtures/monorepo/docs
/docs/site/readmes
/docs/apidocs/reports-temp
/docs/apidocs/models
*.tsbuildinfo

# TBD: Exclude api reports from git for now
/docs/apidocs/reports
Expand Down
2 changes: 2 additions & 0 deletions packages/build/config/tsconfig.common.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@
// FIXME(bajtos) LB4 is not compatible with this setting yet
"strictPropertyInitialization": false,

"incremental": true,

"lib": ["es2018", "esnext.asynciterable"],
"module": "commonjs",
"moduleResolution": "node",
Expand Down
3 changes: 3 additions & 0 deletions packages/cli/generators/project/templates/_.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -62,3 +62,6 @@ api-docs/

# Transpiled JavaScript files from Typescript
/dist

# Cache used by TypeScript's incremental build
*.tsbuildinfo
2 changes: 2 additions & 0 deletions packages/cli/generators/project/templates/tsconfig.json.ejs
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@
"resolveJsonModule": true,
"skipLibCheck": true,
"incremental": true,
"lib": ["es2018", "esnext.asynciterable"],
"module": "commonjs",
"moduleResolution": "node",
Expand Down
4 changes: 4 additions & 0 deletions packages/cli/test/integration/generators/app.integration.js
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,10 @@ describe('app-generator specific files', () => {
const pkg = JSON.parse(await readFile('package.json'));
expect(pkg.scripts).to.have.property('migrate', 'node ./dist/migrate');
});

it('creates .gitignore', () => {
assert.fileContent('.gitignore', /^\*\.tsbuildinfo$/m);
});
});

describe('app-generator with docker disabled', () => {
Expand Down

0 comments on commit 2120712

Please sign in to comment.