forked from loilo-archive/HtmlToClipboard
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Michael
committed
Oct 3, 2017
1 parent
56afe95
commit 35f09ef
Showing
6 changed files
with
260 additions
and
161 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
module.exports = { | ||
"env": { | ||
"browser": true, | ||
"greasemonkey": true, | ||
"es6": true | ||
}, | ||
"extends": "eslint:recommended", | ||
"rules": { | ||
"comma-dangle": [ | ||
"warn", | ||
"always-multiline" | ||
], | ||
"indent": [ | ||
"warn", | ||
"tab" | ||
], | ||
"linebreak-style": [ | ||
"off" | ||
], | ||
"no-console": [ | ||
"error", { | ||
allow: [ | ||
"warn", | ||
"error" | ||
] | ||
} | ||
], | ||
"quotes": [ | ||
"warn", | ||
"single" | ||
], | ||
"semi": [ | ||
"warn", | ||
"always" | ||
] | ||
} | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
node_modules |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
//gulp | ||
const gulp = require('gulp'); | ||
|
||
//load all plugins in "devDependencies" into the variable $ | ||
const $ = require('gulp-load-plugins')({ | ||
pattern: ['*'], | ||
scope: ['devDependencies'], | ||
}); | ||
|
||
//change the linting engine to use ES6 with gulp-uglify | ||
const composer = require('gulp-uglify/composer'); | ||
const minify = composer($.uglifyEs, console); | ||
|
||
const config = { | ||
uglify: { | ||
mangle: false, | ||
output: { | ||
beautify: true, | ||
indent_level: 2, | ||
}, | ||
}, | ||
}; | ||
|
||
gulp.task('default', ['build']); | ||
|
||
//build and lint ./dist/DealDash_CS.user.js | ||
gulp.task('build', function(cb) { | ||
$.pump([ | ||
gulp.src('./html-to-clipboard.js'), | ||
minify(config.uglify), | ||
gulp.dest('./dist/'), | ||
], | ||
cb | ||
); | ||
}); |
Oops, something went wrong.