Package Exports
- gulp-userscript
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (gulp-userscript) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
gulp-userscript
Generate Userscript metadata.
Usage
const gulp = require('gulp')
const userscript = require('gulp-userscript')
gulp.task('userscript', function () {
return gulp.src('/path/to/src.js')
.pipe(userscript({
name: 'Your Userscript name', // required
namespace: 'namespace',
version: '0.1',
'run-at': 'document-end',
// Use an array when the field has multiple values
match: [
'http://www.example.com/*',
'https://www.example.com/*'
],
}))
.pipe(gulp.dest('/path/to/dest'))
})will generate Userscript metadata like this:
// ==UserScript==
// @name Your Userscript name
// @namespace namespace
// @version 0.1
// @run-at document-end
// @match http://www.example.com/*
// @match https://www.example.com/*
// ==/UserScript==
// ... /path/to/src.js content hereFor more options, see https://wiki.greasespot.net/Metadata_Block
License
MIT