@pixelondesign/tools-artset
v1.0.4
Published
tools to process svgs
Downloads
2
Readme
use case
this is a template repo to publish a typescript package to npm
Project Structure
.
.
├── dist -- compiled files, don't touch
├── lib -- were the queryset resides
├── bin -- clis
├── scripts -- scripts to run to init the repo
└── test -- jest test
create a new repo using this template
prerequisites
- install GitHub CLI | Take GitHub to the command line and login the cli
- registered an npm account and created a automation token
create folder and setup git
the repo folder convention should be querset-xxxx
eg
git clone -b main --single-branch [email protected]:vaconsole/template-queryset.git queryset-arsetio
- init the template
cd queryset-arsetio
scripts/init_repo.sh
use case
commands
- pull template changes
git pull template
- publish to npm
run the following command to trigger the github action to publish to npm, each time it will increase the package.json patch version by one
npm run patch-release
- cli
the bin/cli.ts is the cli for experiement with the queryset
tips
generate types from the queryset
- run cli to generate the queryset output to a file
npm install ts-node -g
ts-node bin/cli.ts iconByKeyword > tmp/test.json
save the queryset output to a file, say tmp/test.json
use qucktype to generate the types
npm install -g quicktype
quicktype tmp/test.json --just-types --lang typescript --no-enums
status
Installation
npm install @pixelondesign/tools-artset
Loading and configuring the module
import {...} from "@pixelondesign/tools-artset"