Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
added airbnb linting for all js. Added linting to test pipeline in tr…
…avis.
- Loading branch information
madison.grubb
committed
Nov 26, 2017
1 parent
52e608c
commit 814f03e
Showing
5 changed files
with
3,713 additions
and
63 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,15 @@ | ||
module.exports = { | ||
'env': { | ||
'browser': true, | ||
'es6': true, | ||
'node': true, | ||
}, | ||
'extends': 'airbnb-base', | ||
'parserOptions': { | ||
'sourceType': 'module', | ||
}, | ||
'rules': { | ||
// This is a cli tool. Therefore, we don't really care about console logs. | ||
'no-console': 'off', | ||
} | ||
}; |
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
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 |
---|---|---|
@@ -1,48 +1,48 @@ | ||
var gulp = require('gulp'), | ||
markdownpdf = require('gulp-markdown-pdf'), | ||
zip = require('gulp-zip'), | ||
changed = require('gulp-changed'), | ||
fs = require('fs'), | ||
pjson = require('./package.json'); | ||
const gulp = require('gulp'); | ||
const markdownpdf = require('gulp-markdown-pdf'); | ||
const zip = require('gulp-zip'); | ||
const changed = require('gulp-changed'); | ||
const fs = require('fs'); | ||
const pjson = require('./package.json'); | ||
|
||
var config = { | ||
mdPath: 'src/markdown/*.md', | ||
cssPath: 'src/styles/main.css', | ||
out: 'documents', | ||
readme: 'README.md', | ||
const config = { | ||
mdPath: 'src/markdown/*.md', | ||
cssPath: 'src/styles/main.css', | ||
out: 'documents', | ||
readme: 'README.md', | ||
}; | ||
|
||
// compile all the documents | ||
gulp.task('compile', function() { | ||
var cwd = process.cwd(); | ||
return gulp.src(config.mdPath) | ||
.pipe(changed(config.out, {extension: '.pdf'})) | ||
.pipe(markdownpdf({ | ||
cwd: cwd, | ||
cssPath: config.cssPath | ||
})) | ||
.pipe(gulp.dest(config.out)); | ||
gulp.task('compile', () => { | ||
const cwd = process.cwd(); | ||
return gulp.src(config.mdPath) | ||
.pipe(changed(config.out, { extension: '.pdf' })) | ||
.pipe(markdownpdf({ | ||
cwd, | ||
cssPath: config.cssPath, | ||
})) | ||
.pipe(gulp.dest(config.out)); | ||
}); | ||
|
||
// create release zip from documents | ||
gulp.task('release', function() { | ||
fs.stat('documents', function(err, stat) { | ||
if (err) { | ||
return console.log(err); | ||
} | ||
var release = 'microluxe20_' + pjson.version + '.zip'; | ||
return gulp.src(['documents/*', 'character-sheets/*', 'map/*.png', 'LICENSE']) | ||
.pipe(zip(release)) | ||
.pipe(gulp.dest('./release')); | ||
}); | ||
gulp.task('release', () => { | ||
fs.stat('documents', (err) => { | ||
if (err) { | ||
return console.log(err); | ||
} | ||
const release = `microluxe20_${pjson.version}.zip`; | ||
return gulp.src(['documents/*', 'character-sheets/*', 'map/*.png', 'LICENSE']) | ||
.pipe(zip(release)) | ||
.pipe(gulp.dest('./release')); | ||
}); | ||
}); | ||
|
||
gulp.task('watch', function() { | ||
gulp.watch([config.mdPath, config.cssPath], ['compile']); | ||
gulp.task('watch', () => { | ||
gulp.watch([config.mdPath, config.cssPath], ['compile']); | ||
}); | ||
|
||
gulp.task('default', function() { | ||
console.log(fs.readFileSync(config.readme, { | ||
encoding: 'UTF8' | ||
})); | ||
gulp.task('default', () => { | ||
console.log(fs.readFileSync(config.readme, { | ||
encoding: 'UTF8', | ||
})); | ||
}); |
Oops, something went wrong.