-
Notifications
You must be signed in to change notification settings - Fork 4.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(jsx-to-rn/babel-preset-taro): 支持 css module
- Loading branch information
1 parent
f7bbd62
commit 64c9d95
Showing
7 changed files
with
213 additions
and
90 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
34 changes: 6 additions & 28 deletions
34
packages/babel-plugin-transform-react-jsx-to-rn-stylesheet/src/types.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,33 +1,11 @@ | ||
import { NodePath } from '@babel/traverse' | ||
import { PluginPass } from 'babel__core' | ||
|
||
type BabelTransformationFile = { | ||
opts: { | ||
filename: string | ||
babelrc: boolean | ||
configFile: boolean | ||
passPerPreset: boolean | ||
envName: string | ||
cwd: string | ||
root: string | ||
plugins: unknown[] | ||
presets: unknown[] | ||
parserOpts: Record<string, any> | ||
generatorOpts: Record<string, any> | ||
} | ||
declarations: Record<string, any> | ||
path: NodePath | null | ||
ast: Record<string, any> | ||
scope: unknown | ||
metadata: Record<string, any> | ||
code: string | ||
inputMap: Record<string, any> | null | ||
} | ||
export interface PluginOptions { | ||
isCSSModule?: boolean | ||
|
||
export type Opts = { | ||
extensions?: string[] | ||
} | ||
|
||
export type State = { | ||
file: BabelTransformationFile | ||
opts: Opts | ||
export interface ConvertPluginPass extends PluginPass { | ||
file: any | ||
opts: PluginOptions | undefined | ||
} |
Oops, something went wrong.