@buoy-design/plugin-react 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.ts +6 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +27 -0
- package/dist/index.js.map +1 -0
- package/package.json +43 -0
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,UAAU,EAA2B,MAAM,mBAAmB,CAAC;AAG7E,QAAA,MAAM,MAAM,EAAE,UAyBb,CAAC;;AAEF,wBAA4B;AAC5B,OAAO,EAAE,MAAM,EAAE,CAAC"}
|
package/dist/index.js
ADDED
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { ReactComponentScanner } from '@buoy-design/scanners/git';
|
|
2
|
+
const plugin = {
|
|
3
|
+
metadata: {
|
|
4
|
+
name: '@buoy-design/plugin-react',
|
|
5
|
+
version: '0.0.1',
|
|
6
|
+
description: 'React and Next.js component scanner',
|
|
7
|
+
detects: ['react', 'next', 'remix', 'gatsby'],
|
|
8
|
+
},
|
|
9
|
+
async scan(context) {
|
|
10
|
+
const scanner = new ReactComponentScanner({
|
|
11
|
+
projectRoot: context.projectRoot,
|
|
12
|
+
include: context.include || ['src/**/*.tsx', 'src/**/*.jsx', 'app/**/*.tsx', 'components/**/*.tsx'],
|
|
13
|
+
exclude: context.exclude || ['**/node_modules/**', '**/*.test.*', '**/*.spec.*'],
|
|
14
|
+
options: context.config,
|
|
15
|
+
});
|
|
16
|
+
const result = await scanner.scan();
|
|
17
|
+
return {
|
|
18
|
+
components: result.items,
|
|
19
|
+
tokens: [],
|
|
20
|
+
errors: result.errors,
|
|
21
|
+
stats: result.stats,
|
|
22
|
+
};
|
|
23
|
+
},
|
|
24
|
+
};
|
|
25
|
+
export default () => plugin;
|
|
26
|
+
export { plugin };
|
|
27
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,qBAAqB,EAAE,MAAM,2BAA2B,CAAC;AAElE,MAAM,MAAM,GAAe;IACzB,QAAQ,EAAE;QACR,IAAI,EAAE,2BAA2B;QACjC,OAAO,EAAE,OAAO;QAChB,WAAW,EAAE,qCAAqC;QAClD,OAAO,EAAE,CAAC,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE,QAAQ,CAAC;KAC9C;IAED,KAAK,CAAC,IAAI,CAAC,OAAoB;QAC7B,MAAM,OAAO,GAAG,IAAI,qBAAqB,CAAC;YACxC,WAAW,EAAE,OAAO,CAAC,WAAW;YAChC,OAAO,EAAE,OAAO,CAAC,OAAO,IAAI,CAAC,cAAc,EAAE,cAAc,EAAE,cAAc,EAAE,qBAAqB,CAAC;YACnG,OAAO,EAAE,OAAO,CAAC,OAAO,IAAI,CAAC,oBAAoB,EAAE,aAAa,EAAE,aAAa,CAAC;YAChF,OAAO,EAAE,OAAO,CAAC,MAAM;SACxB,CAAC,CAAC;QAEH,MAAM,MAAM,GAAG,MAAM,OAAO,CAAC,IAAI,EAAE,CAAC;QAEpC,OAAO;YACL,UAAU,EAAE,MAAM,CAAC,KAAK;YACxB,MAAM,EAAE,EAAE;YACV,MAAM,EAAE,MAAM,CAAC,MAAM;YACrB,KAAK,EAAE,MAAM,CAAC,KAAK;SACpB,CAAC;IACJ,CAAC;CACF,CAAC;AAEF,eAAe,GAAG,EAAE,CAAC,MAAM,CAAC;AAC5B,OAAO,EAAE,MAAM,EAAE,CAAC"}
|
package/package.json
ADDED
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@buoy-design/plugin-react",
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"description": "Buoy plugin for React and Next.js component scanning",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"license": "MIT",
|
|
7
|
+
"author": "Buoy <hello@buoy.design>",
|
|
8
|
+
"homepage": "https://buoy.design",
|
|
9
|
+
"repository": {
|
|
10
|
+
"type": "git",
|
|
11
|
+
"url": "git+https://github.com/dylantarre/buoy-design.git",
|
|
12
|
+
"directory": "packages/plugin-react"
|
|
13
|
+
},
|
|
14
|
+
"bugs": {
|
|
15
|
+
"url": "https://github.com/dylantarre/buoy-design/issues"
|
|
16
|
+
},
|
|
17
|
+
"keywords": ["buoy", "plugin", "react", "nextjs", "design-system", "drift-detection"],
|
|
18
|
+
"files": ["dist", "README.md"],
|
|
19
|
+
"main": "./dist/index.js",
|
|
20
|
+
"types": "./dist/index.d.ts",
|
|
21
|
+
"exports": {
|
|
22
|
+
".": {
|
|
23
|
+
"types": "./dist/index.d.ts",
|
|
24
|
+
"import": "./dist/index.js"
|
|
25
|
+
}
|
|
26
|
+
},
|
|
27
|
+
"scripts": {
|
|
28
|
+
"build": "tsc",
|
|
29
|
+
"dev": "tsc --watch",
|
|
30
|
+
"typecheck": "tsc --noEmit",
|
|
31
|
+
"clean": "rm -rf dist"
|
|
32
|
+
},
|
|
33
|
+
"peerDependencies": {
|
|
34
|
+
"@buoy-design/core": "workspace:*"
|
|
35
|
+
},
|
|
36
|
+
"dependencies": {
|
|
37
|
+
"@buoy-design/scanners": "workspace:*"
|
|
38
|
+
},
|
|
39
|
+
"devDependencies": {
|
|
40
|
+
"@buoy-design/core": "workspace:*",
|
|
41
|
+
"typescript": "^5.0.0"
|
|
42
|
+
}
|
|
43
|
+
}
|