Skip to content
This repository was archived by the owner on May 1, 2020. It is now read-only.

Commit a2d58d6

Browse files
authored
Merge pull request #29 from driftyco/d.ts
D.ts
2 parents 17dfc1a + f9bbe00 commit a2d58d6

File tree

5 files changed

+12
-7
lines changed

5 files changed

+12
-7
lines changed

config/ngc.config.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
module.exports = {
33

44
include: [
5+
'./**/*.d.ts',
56
'./app/app.module.ts',
67
'./app/main.prod.ts'
78
]

package.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@ionic/app-scripts",
3-
"version": "0.0.22",
3+
"version": "0.0.23",
44
"description": "Scripts for Ionic Projects",
55
"homepage": "http//ionicframework.com/",
66
"author": "Ionic Team <[email protected]> (http://ionic.io)",
@@ -46,6 +46,8 @@
4646
"@types/node": "6.0.38",
4747
"@types/uglify-js": "2.0.27",
4848
"jasmine": "^2.5.2",
49+
"tslint": "3.15.1",
50+
"tslint-ionic-rules": "0.0.5",
4951
"typescript": "^2.0.3"
5052
},
5153
"repository": {

src/ngc.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ function createTmpTsConfig(context: BuildContext, ngcConfig: NgcConfig) {
9090
tsConfig.compilerOptions.target = 'es5';
9191

9292
// force where to look for ts files
93-
tsConfig.files = ngcConfig.include;
93+
tsConfig.include = ngcConfig.include;
9494

9595
// save the modified copy into the tmp directory
9696
outputJsonSync(getTmpTsConfigPath(context), tsConfig);

src/tsc.ts

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -38,8 +38,10 @@ function runTsc(context: BuildContext, options: BuildOptions) {
3838
const files: string[] = [];
3939
if (options.isProd) {
4040
files.push(join(context.srcDir, context.mainEntryProd));
41+
files.push(join(context.srcDir, '**', '*.d.ts'));
4142
} else {
4243
files.push(join(context.srcDir, context.mainEntryDev));
44+
files.push(join(context.srcDir, '**', '*.d.ts'));
4345
}
4446

4547
const tmpTsConfigPath = createTmpTsConfig(context, files);
@@ -111,10 +113,10 @@ function createTmpTsConfig(context: BuildContext, files: string[]) {
111113
tsConfig.compilerOptions.outDir = context.tmpDir;
112114

113115
// force what files to include
114-
if (Array.isArray(tsConfig.files)) {
115-
tsConfig.files = tsConfig.files.concat(files);
116+
if (Array.isArray(tsConfig.include)) {
117+
tsConfig.include = tsConfig.include.concat(files);
116118
} else {
117-
tsConfig.files = files;
119+
tsConfig.include = files;
118120
}
119121

120122
const tmpTsConfigPath = getTmpTsConfigPath(context);
@@ -161,7 +163,7 @@ export interface TsConfig {
161163
outDir: string;
162164
target: string;
163165
};
164-
files: string[];
166+
include: string[];
165167
exclude: string[];
166168
}
167169

src/util.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -203,7 +203,7 @@ export function getNodeBinExecutable(context: BuildContext, cmd: string) {
203203

204204

205205
export function isTsFilename(filename: string) {
206-
return (filename.length > 3) && (filename.substr(filename.length - 3) === '.ts') && (filename.substr(filename.length - 5) !== '.d.ts');
206+
return (filename.length > 3) && (filename.substr(filename.length - 3) === '.ts');
207207
}
208208

209209

0 commit comments

Comments
 (0)