-
Notifications
You must be signed in to change notification settings - Fork 75
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #71 from ice-lab/release/1.2.0
release/1.2.0
- Loading branch information
Showing
8 changed files
with
85 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
import Context from '../src/core/Context' | ||
import path = require('path') | ||
|
||
describe('load js config', () => { | ||
const context = new Context({ | ||
args: {}, | ||
command: 'start', | ||
rootDir: path.join(__dirname, 'fixtures/jsConfig/') | ||
}); | ||
|
||
it('combine basic config', async () => { | ||
await context.resolveConfig(); | ||
expect(context.userConfig.entry).toEqual('src/index'); | ||
}); | ||
}); | ||
|
||
describe('load ts config', () => { | ||
const context = new Context({ | ||
args: {}, | ||
command: 'start', | ||
rootDir: path.join(__dirname, 'fixtures/tsConfig/') | ||
}); | ||
|
||
it('combine basic config', async () => { | ||
await context.resolveConfig(); | ||
expect(context.userConfig.entry).toEqual('src/index'); | ||
}); | ||
}); | ||
|
||
describe('load mix config', () => { | ||
const context = new Context({ | ||
args: {}, | ||
command: 'start', | ||
rootDir: path.join(__dirname, 'fixtures/mixConfig/') | ||
}); | ||
|
||
it('combine basic config', async () => { | ||
await context.resolveConfig(); | ||
expect(context.userConfig.entry).toEqual('src/index.ts'); | ||
}); | ||
}); |
3 changes: 3 additions & 0 deletions
3
packages/build-scripts/test/fixtures/jsConfig/build.config.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
module.exports = { | ||
entry: 'src/index' | ||
}; |
3 changes: 3 additions & 0 deletions
3
packages/build-scripts/test/fixtures/mixConfig/build.config.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
module.exports = { | ||
entry: 'src/index.js' | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
{ | ||
"entry": "src/index.ts" | ||
} |
9 changes: 9 additions & 0 deletions
9
packages/build-scripts/test/fixtures/tsConfig/build.config.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
interface Config { | ||
entry: string; | ||
} | ||
|
||
const config: Config = { | ||
entry: 'src/index', | ||
}; | ||
|
||
export default config; |