quasar-app-extension-qautomate
Advanced tools
Comparing version 1.0.0-alpha.4 to 1.0.0-alpha.5
{ | ||
"name": "quasar-app-extension-qautomate", | ||
"version": "1.0.0-alpha.4", | ||
"version": "1.0.0-alpha.5", | ||
"description": "Automatically add missing Quasar components, directives and plugins to quasar.conf.js", | ||
@@ -5,0 +5,0 @@ "author": "webnoob <allangaunt@gmail.com>", |
@@ -15,3 +15,4 @@ const path = require('path') | ||
this._forceApplyChanges = false | ||
this._whitelists = {} | ||
this.reset() | ||
@@ -22,3 +23,2 @@ this.buildWhitelist() | ||
reset () { | ||
this._whitelists = {} | ||
this._analysis = { | ||
@@ -42,4 +42,5 @@ existing: {}, | ||
const quasarUiPath = this._api.resolve.app(path.join('node_modules', 'quasar', 'dist', 'api')) | ||
let files = fs.readdirSync(quasarUiPath) | ||
for (let file of files) { | ||
@@ -70,6 +71,13 @@ const | ||
for (let wlItem of this._whitelists[group]) { | ||
const sourceComponent = paramCase(wlItem.name) | ||
const sourceItem = paramCase(wlItem.name) | ||
const itemSearchVariations = [ | ||
`${sourceItem}>`, | ||
`${sourceItem} `, | ||
`${sourceItem}.`, | ||
`${sourceItem}=` | ||
] | ||
if ( | ||
// Normal component / directive etc. | ||
source.indexOf(sourceComponent) > -1 || | ||
itemSearchVariations.some(s => source.indexOf(s) > -1) || | ||
( | ||
@@ -163,3 +171,2 @@ // Something like a plugin (not testing for plugin so it's more future proof) | ||
for (let group in this._analysis.merged) { | ||
// Pick out only the selected items for this group or add them all based on selectedItems | ||
@@ -176,2 +183,4 @@ let itemsToReplace = selectedItems.length > 0 | ||
if (itemsToReplace !== void 0) { | ||
// Make sure we're keeping track of what changes as we're only loading the quasar.conf.js once. | ||
this._quasarConf.framework[group] = itemsToReplace | ||
this._quasarConfFileData = this._quasarConfFileData.replace(this.getGroupRegex(group), this.stringifyConfGroup(group, itemsToReplace)) | ||
@@ -178,0 +187,0 @@ } |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Deprecated
MaintenanceThe maintainer of the package marked it as deprecated. This could indicate that a single version should not be used, or that the package is no longer maintained and any new vulnerabilities will not be fixed.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
15928
376
1