rollup-plugin-json-map-keys
v1.2.0
Published
Rollup plugin to replace json values with the key path.
Maintainers
Readme
rollup-plugin-json-map-keys
Rollup plugin to replace json values with the keys path.
Example:
{
"a": {
"b": "Text Note"
}
}Will generate
{
"a": {
"b": "a.b"
}
}Install
npm install rollup-plugin-json-map-keys --save-devUsage
import jsonMapKeys from 'rollup-plugin-json-map-keys'
export default {
input: 'src/index.js',
output: {
dir: 'dist',
format: 'es'
},
plugins: [
jsonMapKeys({
prefix: '[name]:'
})
]
}License
Rollup Plugin JSON Map Keys © 2021 by Tiago Porto is licensed under MIT License.
