Skip to content

Commit

Permalink
feat(icon): rename accessibleIcons to iconPlugin
Browse files Browse the repository at this point in the history
  • Loading branch information
pi0 committed Aug 14, 2020
1 parent c64226c commit 3e175f9
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion docs/content/en/icon.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ Array of sizes to be generated (Square).
**targetDir**
- Default: `icons`

**accessibleIcons**
**iconPlugin**
- Default: true

Make icons accessible through `ctx` or Vue instances.
Expand Down
6 changes: 3 additions & 3 deletions lib/icon/module.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ async function run (pwa, _emitAssets) {
[1242, 2688, 'iphonexsmax'] // Iphone XS Max
],
targetDir: 'icons',
accessibleIcons: true,
iconPlugin: true,
iconProperty: '$icon',
publicPath,
iconSrc: null,
Expand Down Expand Up @@ -79,7 +79,7 @@ async function run (pwa, _emitAssets) {
addManifest.call(this, options, pwa)

// Add plugin
if (options.accessibleIcons) {
if (options.iconPlugin) {
addPlugin.call(this, options)
}

Expand Down Expand Up @@ -109,7 +109,7 @@ function addPlugin (options) {
icons[asset.name] = joinUrl(options.publicPath, asset.target)
}

if (options.accessibleIcons) {
if (options.iconPlugin) {
this.addPlugin({
src: path.resolve(__dirname, './plugin.js'),
fileName: 'nuxt-icons.js',
Expand Down

0 comments on commit 3e175f9

Please sign in to comment.