Parcel plugin for Greasemonkey.
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
example
src
.gitignore
.travis.yml
LICENSE
README.md
package.json
yarn.lock

README.md

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

FAQ

Q. Does not insert header. A. Please check your script file name is ended with .user.js. This plugin only check .user.js file.

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