-
Notifications
You must be signed in to change notification settings - Fork 53
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
2c0bd32
commit 8fff161
Showing
4 changed files
with
14 additions
and
32 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 |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
'@talend/scripts-config-storybook-lib': minor | ||
--- | ||
|
||
feat: use icons from talend/icons and not from unpkg |
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,35 +1,5 @@ | ||
const fs = require('fs/promises'); | ||
const path = require('path'); | ||
|
||
module.exports = { | ||
webpackFinal: async config => { | ||
const spriteAll = await fs.readFile(path.resolve(__dirname, '../dist/svg-bundle/all.svg'), { | ||
encoding: 'utf8', | ||
}); | ||
const spriteXS = await fs.readFile(path.resolve(__dirname, '../dist/svg-bundle/XS.svg'), { | ||
encoding: 'utf8', | ||
}); | ||
const spriteS = await fs.readFile(path.resolve(__dirname, '../dist/svg-bundle/S.svg'), { | ||
encoding: 'utf8', | ||
}); | ||
const spriteM = await fs.readFile(path.resolve(__dirname, '../dist/svg-bundle/M.svg'), { | ||
encoding: 'utf8', | ||
}); | ||
const spriteL = await fs.readFile(path.resolve(__dirname, '../dist/svg-bundle/L.svg'), { | ||
encoding: 'utf8', | ||
}); | ||
config.plugins.forEach(plugin => { | ||
if (plugin.constructor.name.includes('HtmlWebpackPlugin')) { | ||
const htmlPlugin = plugin; | ||
htmlPlugin.userOptions.templateParameters.bodyHtmlSnippet += spriteAll; | ||
htmlPlugin.userOptions.templateParameters.bodyHtmlSnippet += spriteXS; | ||
htmlPlugin.userOptions.templateParameters.bodyHtmlSnippet += spriteS; | ||
htmlPlugin.userOptions.templateParameters.bodyHtmlSnippet += spriteM; | ||
htmlPlugin.userOptions.templateParameters.bodyHtmlSnippet += spriteL; | ||
return htmlPlugin; | ||
} | ||
return plugin; | ||
}); | ||
return config; | ||
}, | ||
}; |
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