-
Notifications
You must be signed in to change notification settings - Fork 936
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Harmony/merge extension simple config (#2552)
* write configs added by extensions into package.json in the component capsule * add stub tests for configs * export component factory extension from api * related to #2456 * related to #2537
- Loading branch information
1 parent
5af208b
commit 566219f
Showing
10 changed files
with
203 additions
and
118 deletions.
There are no files selected for viewing
1 change: 1 addition & 0 deletions
1
e2e/fixtures/extensions/extension-add-config/simple-config/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 @@ | ||
module.exports = require('./simple-config.manifest'); |
15 changes: 15 additions & 0 deletions
15
e2e/fixtures/extensions/extension-add-config/simple-config/simple-config.manifest.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,15 @@ | ||
const ComponentFactoryExt = require('bit-bin').ComponentFactoryExt; | ||
|
||
module.exports = { | ||
name: 'simple config', | ||
dependencies: [ComponentFactoryExt], | ||
provider: async ([component]) => { | ||
console.log('simple config runs'); | ||
component.registerAddConfig('simple-config', config => { | ||
console.log('config registration hook is running'); | ||
return { | ||
'my-custom-key': 'my-custom-val' | ||
}; | ||
}); | ||
} | ||
}; |
Large diffs are not rendered by default.
Oops, something went wrong.
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
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