forked from noansknv/github
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: Update infrastructure and rename/move js files
- Loading branch information
1 parent
7da4d28
commit efffc70
Showing
30 changed files
with
207 additions
and
349 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
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,26 @@ | ||
{ | ||
"extends": "eslint:recommended", | ||
|
||
"parserOptions": { | ||
"ecmaVersion": 6, | ||
"sourceType": "module" | ||
}, | ||
|
||
"rules": { | ||
"no-bitwise": 1, | ||
"eqeqeq": 2, | ||
"guard-for-in": 2, | ||
"no-extend-native": 2 | ||
}, | ||
|
||
"env": { | ||
"browser": true, | ||
"node": true | ||
}, | ||
|
||
"globals": { | ||
"require": false, | ||
"define": false, | ||
"escape": false | ||
} | ||
} |
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,8 +1,11 @@ | ||
.DS_Store | ||
.idea | ||
node_modules/ | ||
docs/ | ||
dist/ | ||
coverage/ | ||
node_modules/ | ||
.nyc_output/ | ||
|
||
.DS_Store | ||
.idea | ||
.zuulrc | ||
npm-debug.log | ||
sauce.json |
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,142 +1,16 @@ | ||
{ | ||
"disallowDanglingUnderscores": false, | ||
"disallowIdentifierNames": [], | ||
"disallowImplicitTypeConversion": [], | ||
"disallowKeywordsOnNewLine": [ | ||
"catch", | ||
"else" | ||
], | ||
"disallowKeywords": [ | ||
"void", | ||
"with" | ||
], | ||
"disallowMixedSpacesAndTabs": true, | ||
"disallowMultipleLineBreaks": true, | ||
"disallowMultipleLineStrings": true, | ||
"disallowMultipleSpaces": true, | ||
"disallowMultipleVarDecl": "exceptUndefined", | ||
"disallowNewlineBeforeBlockStatements": true, | ||
"disallowPaddingNewlinesBeforeKeywords": [ | ||
"case", | ||
"typeof" | ||
], | ||
"disallowPaddingNewlinesInBlocks": true, | ||
"disallowQuotedKeysInObjects": true, | ||
"disallowSpaceAfterKeywords": [ | ||
"catch", | ||
"for", | ||
"switch", | ||
"while" | ||
], | ||
"disallowSpaceAfterObjectKeys": true, | ||
"disallowSpaceAfterPrefixUnaryOperators": true, | ||
"disallowSpaceBeforePostfixUnaryOperators": true, | ||
"disallowSpacesInCallExpression": true, | ||
"disallowSpacesInsideParentheses": true, | ||
"disallowTrailingComma": true, | ||
"disallowTrailingWhitespace": true, | ||
"disallowYodaConditions": true, | ||
"preset": "google", | ||
|
||
"disallowVar": true, | ||
"jsDoc": { | ||
"checkParamExistence": true, | ||
"checkParamNames": true, | ||
"checkTypes": true, | ||
"requireParamTypes": true, | ||
"requireHyphenBeforeDescription": true, | ||
}, | ||
"maximumLineLength": 120, | ||
"requireBlocksOnNewline": true, | ||
"requireCamelCaseOrUpperCaseIdentifiers": false, | ||
"requireCapitalizedComments": { | ||
"allExcept": [ | ||
"exported", | ||
"global", | ||
"jshint" | ||
] | ||
}, | ||
"requireCapitalizedConstructors": true, | ||
"requireCommaBeforeLineBreak": true, | ||
"requireCurlyBraces": [ | ||
"catch", | ||
"do", | ||
"else", | ||
"for", | ||
"if", | ||
"try", | ||
"while" | ||
], | ||
"requireDollarBeforejQueryAssignment": true, | ||
"requireDotNotation": true, | ||
"requireKeywordsOnNewLine": [ | ||
"break", | ||
"case", | ||
"default" | ||
], | ||
"requireLineBreakAfterVariableAssignment": true, | ||
"requireOperatorBeforeLineBreak": true, | ||
"requirePaddingNewLineAfterVariableDeclaration": true, | ||
"requirePaddingNewLinesAfterBlocks": { | ||
"allExcept": [ | ||
"inArrayExpressions", | ||
"inCallExpressions", | ||
"inProperties" | ||
] | ||
}, | ||
"requirePaddingNewLinesAfterUseStrict": true, | ||
"requirePaddingNewLinesBeforeExport": true, | ||
"requirePaddingNewlinesBeforeKeywords": [ | ||
"do", | ||
"for", | ||
"function", | ||
"if", | ||
"return", | ||
"switch", | ||
"try", | ||
"void", | ||
"while", | ||
"with" | ||
], | ||
"requirePaddingNewLinesBeforeLineComments": { | ||
"allExcept": "firstAfterCurly" | ||
}, | ||
"requirePaddingNewLinesInObjects": true, | ||
"requireParenthesesAroundIIFE": true, | ||
"requireSemicolons": true, | ||
"requireSpaceAfterBinaryOperators": true, | ||
"requireSpaceAfterKeywords": [ | ||
"case", | ||
"do", | ||
"else", | ||
"if", | ||
"return", | ||
"try", | ||
"typeof" | ||
], | ||
"requireSpaceAfterLineComment": true, | ||
"requireSpaceBeforeBinaryOperators": true, | ||
"requireSpaceBeforeBlockStatements": true, | ||
"requireSpaceBeforeKeywords": [ | ||
"catch", | ||
"else" | ||
], | ||
"requireSpaceBeforeObjectValues": true, | ||
"requireSpaceBetweenArguments": true, | ||
"requireSpacesInAnonymousFunctionExpression": { | ||
"beforeOpeningCurlyBrace": true | ||
}, | ||
"requireSpacesInConditionalExpression": true, | ||
"requireSpacesInForStatement": true, | ||
"requireSpacesInFunctionDeclaration": { | ||
"beforeOpeningCurlyBrace": true | ||
}, | ||
"requireSpacesInFunctionExpression": { | ||
"beforeOpeningCurlyBrace": true | ||
}, | ||
"requireSpacesInFunction": { | ||
"beforeOpeningCurlyBrace": true | ||
}, | ||
"requireSpacesInNamedFunctionExpression": { | ||
"beforeOpeningCurlyBrace": true | ||
}, | ||
"safeContextKeyword": ["that"], | ||
"validateAlignedFunctionParameters": true, | ||
"validateIndentation": 3, | ||
"validateLineBreaks": "LF", | ||
"validateNewlineAfterArrayElements": { | ||
"maximum": 3 | ||
}, | ||
"validateParameterSeparator": ", ", | ||
"validateQuoteMarks": "'" | ||
} |
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,23 @@ | ||
{ | ||
"tags": { | ||
"dictionaries": ["jsdoc"] | ||
}, | ||
"source": { | ||
"include": ["src", "package.json", "README.md"], | ||
"includePattern": ".js$", | ||
"excludePattern": "(node_modules/|docs)" | ||
}, | ||
"plugins": [ | ||
"plugins/markdown" | ||
], | ||
"templates": { | ||
"cleverLinks": false, | ||
"monospaceLinks": true | ||
}, | ||
"opts": { | ||
"destination": "./docs/", | ||
"encoding": "utf8", | ||
"recurse": true, | ||
"template": "./node_modules/minami" | ||
} | ||
} |
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 |
---|---|---|
@@ -0,0 +1,87 @@ | ||
import gulp from 'gulp'; | ||
import jscs from 'gulp-jscs'; | ||
import eslint from 'gulp-eslint'; | ||
import stylish from 'gulp-jscs-stylish'; | ||
|
||
import babel from 'gulp-babel'; | ||
import rename from 'gulp-rename'; | ||
|
||
import browserify from 'browserify'; | ||
import buffer from 'vinyl-buffer'; | ||
import del from 'del'; | ||
import path from 'path'; | ||
import {Promise} from 'es6-promise'; | ||
import source from 'vinyl-source-stream'; | ||
import sourcemaps from 'gulp-sourcemaps'; | ||
import uglify from 'gulp-uglify'; | ||
|
||
const ALL_SOURCES = [ | ||
path.join(__dirname, '/*.js'), | ||
path.join(__dirname, '/src/*.js'), | ||
path.join(__dirname, '/test/*.js') | ||
]; | ||
|
||
gulp.task('lint', function() { | ||
const opts = { | ||
base: './' | ||
}; | ||
return gulp.src(ALL_SOURCES, opts) | ||
.pipe(eslint()) | ||
.pipe(jscs()) | ||
.pipe(stylish.combineWithHintResults()) | ||
.pipe(stylish()) | ||
; | ||
}); | ||
|
||
gulp.task('clean', function() { | ||
return Promise.all([del('dist/'), del('coverage/')]); | ||
}); | ||
|
||
const browserifyConfig = { | ||
debug: true, | ||
entries: 'src/Github.js', | ||
standalone: 'Github' | ||
}; | ||
gulp.task('build', function() { | ||
browserify(browserifyConfig) | ||
.transform('babelify') | ||
.bundle() | ||
.pipe(source('Github.js')) | ||
.pipe(buffer()) | ||
.pipe(sourcemaps.init({ | ||
loadMaps: true | ||
})) | ||
.pipe(uglify()) | ||
.pipe(rename({ | ||
extname: '.bundle.min.js' | ||
})) | ||
.pipe(sourcemaps.write('.')) | ||
.pipe(gulp.dest('dist')) | ||
; | ||
|
||
browserify(browserifyConfig) | ||
.transform('babelify') | ||
.bundle() | ||
.pipe(source('Github.js')) | ||
.pipe(buffer()) | ||
.pipe(sourcemaps.init({ | ||
loadMaps: true | ||
})) | ||
.pipe(rename({ | ||
extname: '.bundle.js' | ||
})) | ||
.pipe(sourcemaps.write('.')) | ||
.pipe(gulp.dest('dist')) | ||
; | ||
|
||
return gulp.src('src/*.js') | ||
.pipe(babel()) | ||
.pipe(sourcemaps.init()) | ||
.pipe(sourcemaps.write('.')) | ||
.pipe(gulp.dest('dist/components')) | ||
; | ||
}); | ||
|
||
gulp.task('default', ['clean'], function() { | ||
gulp.start('lint', 'test:mocha', 'build'); | ||
}); |
Oops, something went wrong.