Total Complexity | 1 |
Complexity/F | 0 |
Lines of Code | 22 |
Function Count | 0 |
Duplicated Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | import type {Options} from './options.types' |
||
2 | import postcss = require("postcss") |
||
3 | import creator8 = require(".") |
||
4 | import schema = require("./schema.json") |
||
5 | |||
6 | export = postcss.plugin<Options>(schema.title, opts => { |
||
7 | const {prepare} = creator8(opts) |
||
8 | |||
9 | return async(root, result) => { |
||
10 | const {RootExit, RuleExit} = prepare(result as typeof result & {root: typeof root}) |
||
11 | |||
12 | if (!(RootExit && RuleExit)) |
||
13 | return |
||
14 | |||
15 | root.walkRules(RuleExit) |
||
16 | |||
17 | await RootExit(root) |
||
18 | |||
19 | return |
||
20 | } |
||
21 | }) |
||
22 | |||
23 |