@beequeue/tokens-plugin
Advanced tools
Comparing version 0.0.0-beta.1 to 0.0.0-beta.2
@@ -6,10 +6,13 @@ import * as webpack from 'webpack'; | ||
modules: string[]; | ||
excludeTokens?: string | undefined; | ||
} | undefined) => unplugin.VitePlugin; | ||
declare const TokensRollupPlugin: (options?: { | ||
modules: string[]; | ||
excludeTokens?: string | undefined; | ||
} | undefined) => unplugin.RollupPlugin; | ||
declare const TokensWebpackPlugin: (options?: { | ||
modules: string[]; | ||
excludeTokens?: string | undefined; | ||
} | undefined) => webpack.WebpackPluginInstance; | ||
export { TokensRollupPlugin, TokensVitePlugin, TokensWebpackPlugin }; |
@@ -87,3 +87,3 @@ var __create = Object.create; | ||
return (_a = new RegExp(`from ["'](${name}(?:/.*?)?)["']`, "g").exec(code)) == null ? void 0 : _a[1]; | ||
}).filter((match) => match != null); | ||
}).filter((result) => result != null); | ||
if (importedModules.length === 0) | ||
@@ -98,2 +98,5 @@ return code; | ||
for (const [token, value] of tokens) { | ||
if ((options == null ? void 0 : options.excludeTokens) && token.includes(options.excludeTokens)) { | ||
continue; | ||
} | ||
newCode = newCode.replaceAll(token, JSON.stringify(value)); | ||
@@ -106,3 +109,7 @@ } | ||
}); | ||
var { vite: TokensVitePlugin, rollup: TokensRollupPlugin, webpack: TokensWebpackPlugin } = unplugin; | ||
var { | ||
vite: TokensVitePlugin, | ||
rollup: TokensRollupPlugin, | ||
webpack: TokensWebpackPlugin | ||
} = unplugin; | ||
module.exports = __toCommonJS(src_exports); | ||
@@ -109,0 +116,0 @@ // Annotate the CommonJS export names for ESM import in node: |
{ | ||
"name": "@beequeue/tokens-plugin", | ||
"version": "0.0.0-beta.1", | ||
"version": "0.0.0-beta.2", | ||
"author": "BeeeQueue <adam@haglund.dev>", | ||
@@ -5,0 +5,0 @@ "license": "MIT", |
Sorry, the diff of this file is not supported yet
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
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
9512
212