@svgr/core
Advanced tools
Comparing version 6.0.0-alpha.2 to 6.0.0-alpha.3
@@ -66,3 +66,3 @@ import { Options } from 'prettier'; | ||
declare const convert: { | ||
declare const transform: { | ||
(code: string, config?: Config, state?: Partial<State>): Promise<string>; | ||
@@ -72,2 +72,2 @@ sync(code: string, config?: Config, state?: Partial<State>): string; | ||
export { Config, ConfigPlugin, DEFAULT_CONFIG, Plugin, State, convert as default, loadConfig, resolveConfig, resolveConfigFile }; | ||
export { Config, ConfigPlugin, DEFAULT_CONFIG, Plugin, State, loadConfig, resolveConfig, resolveConfigFile, transform }; |
@@ -180,7 +180,7 @@ 'use strict'; | ||
}; | ||
const convert = async (code, config = {}, state = {}) => { | ||
const transform = async (code, config = {}, state = {}) => { | ||
config = await loadConfig(config, state); | ||
return run(code, config, state); | ||
}; | ||
convert.sync = (code, config = {}, state = {}) => { | ||
transform.sync = (code, config = {}, state = {}) => { | ||
config = loadConfig.sync(config, state); | ||
@@ -191,6 +191,6 @@ return run(code, config, state); | ||
exports.DEFAULT_CONFIG = DEFAULT_CONFIG; | ||
exports["default"] = convert; | ||
exports.loadConfig = loadConfig; | ||
exports.resolveConfig = resolveConfig; | ||
exports.resolveConfigFile = resolveConfigFile; | ||
exports.transform = transform; | ||
//# sourceMappingURL=index.js.map |
{ | ||
"name": "@svgr/core", | ||
"description": "Transform SVG into React Components.", | ||
"version": "6.0.0-alpha.2", | ||
"version": "6.0.0-alpha.3", | ||
"main": "./dist/index.js", | ||
@@ -36,3 +36,3 @@ "exports": "./dist/index.js", | ||
"dependencies": { | ||
"@svgr/plugin-jsx": "^6.0.0-alpha.2", | ||
"@svgr/plugin-jsx": "^6.0.0-alpha.3", | ||
"camelcase": "^6.2.0", | ||
@@ -44,3 +44,3 @@ "cosmiconfig": "^7.0.1" | ||
}, | ||
"gitHead": "f729efaad6e2ec22a27972b025737f41cf661045" | ||
"gitHead": "261e1b545cb4af74991af236306ecce502318245" | ||
} |
@@ -16,3 +16,3 @@ # @svgr/core | ||
```js | ||
import svgr from '@svgr/core' | ||
import { transform } from '@svgr/core' | ||
@@ -27,3 +27,3 @@ const svgCode = ` | ||
svgr(svgCode, { icon: true }, { componentName: 'MyComponent' }).then( | ||
transform(svgCode, { icon: true }, { componentName: 'MyComponent' }).then( | ||
(jsCode) => { | ||
@@ -30,0 +30,0 @@ console.log(jsCode) |
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