File tree Expand file tree Collapse file tree 2 files changed +29
-0
lines changed
fixtures/build-withTsconfig/src Expand file tree Collapse file tree 2 files changed +29
-0
lines changed Original file line number Diff line number Diff line change
1
+ {
2
+ // ensure that extends works (trailing comma & comment too)
3
+ "extends" : " ../tsconfig.base.json" ,
4
+ "compilerOptions" : {
5
+ "declarationDir" : " ../typingsCustom/"
6
+ }
7
+ }
Original file line number Diff line number Diff line change @@ -174,6 +174,28 @@ describe('tsdx build', () => {
174
174
expect ( output . code ) . toBe ( 0 ) ;
175
175
} ) ;
176
176
177
+ it ( 'should read custom --tsconfig path' , ( ) => {
178
+ util . setupStageWithFixture ( stageName , 'build-withTsconfig' ) ;
179
+
180
+ const output = shell . exec (
181
+ 'node ../dist/index.js build --format cjs --tsconfig ./src/tsconfig.json'
182
+ ) ;
183
+
184
+ expect ( shell . test ( '-f' , 'dist/index.js' ) ) . toBeTruthy ( ) ;
185
+ expect (
186
+ shell . test ( '-f' , 'dist/build-withtsconfig.cjs.development.js' )
187
+ ) . toBeTruthy ( ) ;
188
+ expect (
189
+ shell . test ( '-f' , 'dist/build-withtsconfig.cjs.production.min.js' )
190
+ ) . toBeTruthy ( ) ;
191
+
192
+ expect ( shell . test ( '-f' , 'dist/index.d.ts' ) ) . toBeFalsy ( ) ;
193
+ expect ( shell . test ( '-f' , 'typingsCustom/index.d.ts' ) ) . toBeTruthy ( ) ;
194
+ expect ( shell . test ( '-f' , 'typingsCustom/index.d.ts.map' ) ) . toBeTruthy ( ) ;
195
+
196
+ expect ( output . code ) . toBe ( 0 ) ;
197
+ } ) ;
198
+
177
199
afterEach ( ( ) => {
178
200
util . teardownStage ( stageName ) ;
179
201
} ) ;
You can’t perform that action at this time.
0 commit comments