parcel-plugin-greasemonkey

parcel-plugin for Greasemonkey.

Usage no npm install needed!

<script type="module">
  import parcelPluginGreasemonkey from 'https://cdn.skypack.dev/parcel-plugin-greasemonkey';
</script>

README

parcel-plugin-greasemonkey

Parcel plugin for Greasemonkey/Tampermonkey.

Features

  • Add UserScript header to bundled file

Install

Install with npm:

npm install parcel-plugin-greasemonkey

Usage

├── greasemonkey.header
├── yourscript.user.js
└── package.json
  1. Create greasemonkey.header in project root directory
// ==UserScript==
// @name user-script
// @namespace info.efcl
// @match https://*
// @grant none
// ==/UserScript==
  1. Install parcel-plugin-greasemonkey
npm install parcel-plugin-greasemonkey --save-dev
# or
yarn install parcel-plugin-greasemonkey -D
  1. Build .user.js as entry file
parcel build ---no-source-maps --no-content-hash ./yourscript.user.js --out-dir ./dist

Finally, Generate Greasemonkey script to ./dist/yourscript.user.js!

// ==UserScript==
// @name user-script
// @namespace info.efcl
// @match https://*
// @grant none
// ==/UserScript==

// your script

Changelog

See Releases page.

Running tests

Install devDependencies and Run npm test:

npm test

Contributing

Pull requests and stars are always welcome.

For bugs and feature requests, please create an issue.

  1. Fork it!
  2. Create your feature branch: git checkout -b my-new-feature
  3. Commit your changes: git commit -am 'Add some feature'
  4. Push to the branch: git push origin my-new-feature
  5. Submit a pull request :D

Author

License

MIT © azu