File tree 2 files changed +18
-1
lines changed 2 files changed +18
-1
lines changed Original file line number Diff line number Diff line change 8
8
"./styles" : " ./index.css"
9
9
},
10
10
"scripts" : {
11
- "build" : " radius-toolkit generate tokens.json -o styles/index.css"
11
+ "build" : " radius-toolkit generate tokens.json -o styles/index.css" ,
12
+ "build:custom" : " radius-toolkit generate tokens.json -c myCustomTemplate -T ./templates -o styles/vector.json" ,
13
+ "build:tailwind" : " radius-toolkit generate tokens.json -t tailwind"
12
14
},
13
15
"keywords" : [],
14
16
"author" : " " ,
Original file line number Diff line number Diff line change
1
+ import type { TemplateModule } from "radius-toolkit" ;
2
+
3
+ export default {
4
+ name : "my-custom-template" ,
5
+ render : ( { layers, vectors } , options ) => {
6
+ const transformed = vectors ?. map ( ( { name, properties, source } ) => {
7
+ return {
8
+ name,
9
+ properties : JSON . stringify ( properties ) ,
10
+ source,
11
+ } ;
12
+ } ) ;
13
+ return Buffer . from ( `${ JSON . stringify ( transformed ) } ` ) ;
14
+ } ,
15
+ } satisfies TemplateModule ;
You can’t perform that action at this time.
0 commit comments