1.1.3 • Published 4 months ago

bookmarklets-cli v1.1.3

Weekly downloads
-
License
MIT
Repository
github
Last release
4 months ago

bookmarklets-cli

CLI for bookmarklets development

Installation

# you can use this cli without installing locally
npx bookmarklets-cli [...]

# if needed
npm install --save bookmarklets-cli
# or
yarn add bookmarklets-cli

Usage

Build

# transpile `script.ts` into `dist` dir
npx bookmarklets-cli script.ts

# glob support
npx bookmarklets-cli 'src/*.ts'

# specify dist dir
npx bookmarklets-cli --dist-dir 'out'

Dev mode

In dev mode, every time the input script is saved, the CLI transpiles the input script and copies it to the clipboard.

Note that the leading j is removed (e.g., avascript:(()=>{}) instead of javascript:(()=>{})). Many browsers automatically remove the javascript: part from URLs pasted into the address bar to enhance security, so the leading j is removed to avoid this issue. When testing the copied output from dev mode in a browser, first type j in the address bar, then paste the copied output, and press Enter to execute it.

# watch `script.ts`
npx bookmarklets-cli --watch script.ts

# glob support
npx bookmarklets-cli --watch 'src/*.ts'
1.1.3

4 months ago

1.1.2

4 months ago

1.1.1

8 months ago

1.1.0

10 months ago

1.0.4

10 months ago

1.0.3

11 months ago

1.0.2

11 months ago

1.0.1

11 months ago

1.0.0

11 months ago

0.4.3

11 months ago

0.4.2

11 months ago

0.4.1

11 months ago

0.4.0

11 months ago