Skip to content

Commit

Permalink
initialisation
Browse files Browse the repository at this point in the history
  • Loading branch information
Michael committed Oct 3, 2017
1 parent 56afe95 commit 35f09ef
Show file tree
Hide file tree
Showing 6 changed files with 260 additions and 161 deletions.
37 changes: 37 additions & 0 deletions .eslintrc.js
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"
]
}
};
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
node_modules
35 changes: 35 additions & 0 deletions gulpfile.js
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
);
});
Loading

0 comments on commit 35f09ef

Please sign in to comment.