A CLI for creating bookmarklets.
It's powered by sade, esbuild, and TypeScript.
Install @ryanccn/bookmarklet
into your project or globally:
# locally
$ npm i -D @ryanccn/bookmarklet
$ yarn add --dev @ryanccn/bookmarklet
# globally
$ npm i -g @ryanccn/bookmarklet
$ yarn global add @ryanccn/bookmarklet
And build your bookmarklet!
$ bookmarklet index.ts
Built in 11.81ms
Wrote to bookmarklet.txt
[copied to clipboard]
bookmarklet
currently reads configuration from
.bookmarklet.mjs
.bookmarklet.json
The types are as follows:
{
target?: string | undefined;
write?: string | false;
print?: boolean;
copy?: boolean;
}