typesheet
A utility to generate strongly typed dicitonary of the css selectors available in html files
> typesheet --help
usage: typesheet [options] [files or globs]
--init -i run initial pass on all matched files, default: false
--output -o output directory, default: '.'
--filterRegex -f class name filter matches are kept , default: '.*' i.e. all classes
[files or globs] files or glob pattern to watch, default : **/*.(cshtml|html)
glob reference:
https://github.com/isaacs/node-glob
Example
index.html
<!-- Example row of columns --> Heading View details » Heading View details » Heading View details »
running typesheet
> node typesheet.js -i -o typings index.html
Waiting for changes in: index.html
TypeSheet Ready: typings/index.ts
typings/index.ts
VS Code Autocomplete Example
License
MIT