@the-oz/globs-generate
v1.0.4
Published
generator glob type files
Downloads
6
Keywords
Readme
GLOBS GENERATOR
Use this project to generate typescript glob type files from serialized glob types
GETTING STARTED
Install locally
npm install
npm run build
npm link
Run
Find commands:
globs-generate --h
Or pass the directory as an argument
Change directory to the root of the shopify theme
globs-generate -f "file.json"
Or pass the directory as an argument
globs-generate -d "model"
If you need to save the output in a specific directory (relative to current directory):
# current directory: /root
globs-generate -o "destination" "..."
# generate outputs to /root/output/
Or pass the type as an string
globs-generate -d '{"kind":"aType2", "fields":[{"name":"bigDecimalArrayField", "type":"bigDecimalArray"}]}'
Run in development
npm run build && node build/main/index.js -d "model"
TODO
- create a ts file that holds the globTypes already known at generation so that we can import them directly whenever
- we need to create a globTypes with nested globs