├── .editorconfig
├── .gitignore
├── .travis.yml
├── CHANGELOG.md
├── LICENSE
├── README.md
├── index.js
├── package-lock.json
├── package.json
└── spec
├── build.js
├── fixtures
├── blank.html
├── entry.js
├── images
│ ├── another-face.svg
│ ├── face.svg
│ ├── moods.svg
│ └── not-an-svg.png
├── index-allow-from-url.html
├── index-inline-all.html
├── index-pre-emit.html
├── index-svgo.html
├── index.html
├── partial-pre-emit.html
└── partial.html
├── index.spec.js
├── jasmine-allow-from-url.tests.js
├── jasmine-inline-all.tests.js
├── jasmine-svgo.tests.js
├── jasmine.tests.js
├── support
└── jasmine.json
├── webpack.allow-from-url.config.js
├── webpack.base.config.js
├── webpack.inline-all.config.js
├── webpack.post-emit.config.js
├── webpack.pre-emit.config.js
└── webpack.svgo.config.js
/.editorconfig:
--------------------------------------------------------------------------------
1 | root = true
2 |
3 | [*]
4 | insert_final_newline = true
5 | charset = utf-8
6 | indent_style = space
7 | indent_size = 2
8 | trim_trailing_whitespace = true
9 |
10 | [*.md]
11 | trim_trailing_whitespace = false
12 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | /node_modules/
2 | /dist/
3 | npm-debug.log
4 | .history
5 |
--------------------------------------------------------------------------------
/.travis.yml:
--------------------------------------------------------------------------------
1 | language: node_js
2 | node_js:
3 | - '8'
4 | - '10'
5 | script:
6 | - npm test
7 | notifications:
8 | slack:
9 | on_pull_requests: false
10 | rooms:
11 | secure: bKiOrBe1gYfqC0q2DPz97UW+tY8UKzbpKo8W5o8rsm5Niq2pFBNoWjHTLGOsjUlPPkmkBK3xjr2RiWMM3CvIe4fm4o8aap2tubjd4pubqMfBqEDZWlOlOQI7ZirKBhAflXIAp+CEDl4up/QBnWpq8K11/xgYgGD2CNrvp4KPfiHZzmyxXmNqgU05rt75cPbd3cYpQ0BudwNIcbVlsVkvWYc/OG8Wl4ItRfcvIjnjTqNaWaasEvcm+ljPTJ00cbcFWJdwlqIkfrMufosdyEYGaSyxHfVo+JTlSh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R3xf+qwbW/0+6kPyZ2ZeBnH499I8ri6OdlbvV2pQbvShQqBp2yyCJxv8oVn7IyQyW9sM=
18 | on:
19 | tags: true
20 | repo: theGC/html-webpack-inline-svg-plugin
21 | skip_cleanup: 'true'
22 |
--------------------------------------------------------------------------------
/CHANGELOG.md:
--------------------------------------------------------------------------------
1 | ## v2.3.0
2 |
3 | * BREAKING CHANGE: On the webpack configuration file the `svgoConfig` option must now go inside `HtmlWebpackInlineSVGPlugin({})` instead of `HtmlWebpackPlugin({})`. An error is thrown at webpack build time otherwise.
4 | * The defaults for the `svgo` module aren't hardcoded anymore and –excepting the `cleanupIDs` option– the defaults are now set by the own module `svgo` and not `html-webpack-inline-svg-plugin`.
5 |
6 | ## v2.2.0
7 |
8 | * Ability added to load SVGs from an URL (``).
9 |
10 | ## v2.0.1
11 |
12 | * added `inlineAll` option to inline all svgs the parser finds
13 |
14 | ## v2.0.0
15 |
16 | * support webpack 4
17 | * support html-webpack-plugin v4
18 | * remove broken html tests as not supported by html-webpack-plugin
19 | * upgrade parse5 to v5
20 |
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | The MIT License (MIT)
2 |
3 | Copyright (c) 2016 Jan Nicklas
4 |
5 | Permission is hereby granted, free of charge, to any person obtaining a copy
6 | of this software and associated documentation files (the "Software"), to deal
7 | in the Software without restriction, including without limitation the rights
8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | copies of the Software, and to permit persons to whom the Software is
10 | furnished to do so, subject to the following conditions:
11 |
12 | The above copyright notice and this permission notice shall be included in all
13 | copies or substantial portions of the Software.
14 |
15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21 | SOFTWARE.
22 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | `html-webpack-inline-svg-plugin`
2 | =
3 |
4 | [](https://badge.fury.io/js/html-webpack-inline-svg-plugin) [](https://travis-ci.org/theGC/html-webpack-inline-svg-plugin)
5 |
6 | Converts SVG files referenced by `` elements into inlined `