Skip to content

Commit

Permalink
Add a dev tsconfig and use it when building poi demos. (tensorflow#432)
Browse files Browse the repository at this point in the history
  • Loading branch information
manrajgrover authored and Nikhil Thorat committed Dec 31, 2017
1 parent 8fff915 commit 1a29e8e
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 7 deletions.
16 changes: 11 additions & 5 deletions demos/poi.config.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,15 @@
module.exports = {
const path = require('path');

module.exports = options => ({
webpack(config) {
config.output.publicPath = '';
return config;
},
presets: [
require('poi-preset-typescript')(/* options */)
],
};
presets: [require('poi-preset-typescript')({
loaderOptions: {
configFile: options.mode === 'development' ?
path.join('..', 'tsconfig-dev.json') :
path.join('..', 'tsconfig.json')
}
})],
});
10 changes: 10 additions & 0 deletions demos/tsconfig-dev.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"extends": "../tsconfig.json",
"include": [
"**/*"
],
"compilerOptions": {
"declaration": false,
"target": "es2017"
}
}
3 changes: 1 addition & 2 deletions demos/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
"extends": "../tsconfig.json",
"include": ["**/*"],
"compilerOptions": {
"declaration": false,
"target": "es2017"
"declaration": false
}
}

0 comments on commit 1a29e8e

Please sign in to comment.