This repository was archived by the owner on May 1, 2020. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +11
-3
lines changed Expand file tree Collapse file tree 1 file changed +11
-3
lines changed Original file line number Diff line number Diff line change 1
1
import { join } from 'path' ;
2
+
3
+ import * as Constants from '../util/constants' ;
2
4
import { GlobResult , globAll } from '../util/glob-util' ;
3
- import { readFileAsync } from '../util/helpers' ;
5
+ import { getStringPropertyValue , readFileAsync } from '../util/helpers' ;
4
6
import { BuildContext } from '../util/interfaces' ;
5
7
6
8
export function scanSrcTsFiles ( context : BuildContext ) {
7
- const tsFileGlob = join ( context . srcDir , '**' , '*.ts' ) ;
8
- return globAll ( [ tsFileGlob ] ) . then ( ( results : GlobResult [ ] ) => {
9
+ const srcGlob = join ( context . srcDir , '**' , '*.ts' ) ;
10
+ const globs : string [ ] = [ srcGlob ] ;
11
+ const deepLinkDir = getStringPropertyValue ( Constants . ENV_VAR_DEEPLINKS_DIR ) ;
12
+ // these two will only not be equal in some weird cases like for building Ionic's demos with our current repository set-up
13
+ if ( deepLinkDir !== context . srcDir ) {
14
+ globs . push ( join ( deepLinkDir , '**' , '*.ts' ) ) ;
15
+ }
16
+ return globAll ( globs ) . then ( ( results : GlobResult [ ] ) => {
9
17
const promises = results . map ( result => {
10
18
const promise = readFileAsync ( result . absolutePath ) ;
11
19
promise . then ( ( fileContent : string ) => {
You can’t perform that action at this time.
0 commit comments