An ember-cli-deploy plugin to convert index.html to json config
npm install ember-cli-deploy-json-config> An ember-cli-deploy plugin to convert index.html to json config

This plugin will take an index.html file and extract the data from it, outputting it to JSON. This can be used by a web server that might want to have more control over the templating of the index.html file on the server while still being able to point to the ember-cli assets deployed by ember-cli-deploy.
For a more in depth use case as to why one might want to use this plugin, refer to "Why would I use this plugin?"
A plugin is an addon that can be executed as a part of the ember-cli-deploy pipeline. A plugin will implement one or more of the ember-cli-deploy's pipeline hooks.
For more information on what plugins are and how they work, please refer to the [Plugin Documentation][1].
- Ensure [ember-cli-deploy-build][2] is installed and configured
- Install this plugin
``bash`
$ ember install ember-cli-deploy-json-config
- Run the pipeline
`bash`
$ ember deploy
`bash`
ember install ember-cli-deploy-json-config
For detailed information on what plugin hooks are and how they work, please refer to the [Plugin Documentation][1].
- configuredidBuild
-
For detailed information on how configuration of plugins works, please refer to the [Plugin Documentation][1].
A pattern that matches the file you would like to convert to JSON. This pattern should be relative to distDir.
Default: 'index.html'
A pattern that matches the file you would like to output the JSON to. This pattern should be relative to distDir.
Default: index.json
The root directory where the file matching fileInputPattern will be searched for. By default, this option will use the distDir property of the deployment context.
Default: context.distDir
The blueprint indicating what fields to read from the HTML file and convert into JSON.
Default:
`javascript`
base: {
selector: 'base',
attributes: ['href']
},
meta: {
selector: 'meta[name*="/config/environment"]',
attributes: ['name', 'content']
},
link: {
selector: 'link',
attributes: ['rel', 'href', 'integrity']
},
script: {
selector: 'script',
attributes: ['src', 'integrity'],
includeContent: false,
}