Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* chore: prepare build into cjs and esm targets * refactor: convert sources from cjs into esm * chore: add forgotten rimraf * fix: more entrypoints * update changelog
- Loading branch information
1 parent
324050f
commit b7a831a
Showing
8 changed files
with
84 additions
and
38 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,29 @@ | ||
{ | ||
"presets": [ | ||
"env", | ||
"react", | ||
"stage-0" | ||
] | ||
"env": { | ||
"cjs": { | ||
"presets": [ | ||
["env", { | ||
"targets": { | ||
"node": 4.0, | ||
"browsers": ["last 2 versions"] | ||
} | ||
}], | ||
"react", | ||
"stage-0" | ||
], | ||
}, | ||
"esm": { | ||
"presets": [ | ||
["env", { | ||
"targets": { | ||
"node": 4.0, | ||
"browsers": ["last 2 versions"] | ||
}, | ||
"modules": false | ||
}], | ||
"react", | ||
"stage-0" | ||
], | ||
} | ||
} | ||
} |
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 @@ | ||
node_modules | ||
.DS_Store | ||
*.log | ||
*.lock | ||
*-lock.json | ||
dist | ||
shrinkwrap.* | ||
.nyc_output | ||
coverage |
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 |
---|---|---|
@@ -1 +1 @@ | ||
module.exports = '__THEMING__'; | ||
export default '__THEMING__'; |
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 |
---|---|---|
@@ -1,14 +1,21 @@ | ||
const createThemeProvider = require('./create-theme-provider'); | ||
const createWithTheme = require('./create-with-theme'); | ||
const channel = require('./channel'); | ||
import createThemeProvider from './create-theme-provider'; | ||
import createWithTheme from './create-with-theme'; | ||
import defaultChannel from './channel'; | ||
|
||
module.exports = { | ||
channel, | ||
withTheme: createWithTheme(), | ||
ThemeProvider: createThemeProvider(), | ||
createTheming: (customChannel = channel) => ({ | ||
export const channel = defaultChannel; | ||
export const withTheme = createWithTheme(); | ||
export const ThemeProvider = createThemeProvider(); | ||
export function createTheming(customChannel = defaultChannel) { | ||
return { | ||
channel: customChannel, | ||
withTheme: createWithTheme(customChannel), | ||
ThemeProvider: createThemeProvider(customChannel), | ||
}), | ||
}; | ||
} | ||
|
||
export default { | ||
channel: defaultChannel, | ||
withTheme, | ||
ThemeProvider, | ||
createTheming, | ||
}; |