Skip to content

Commit 933ad4f

Browse files
author
tunnckoCore
committed
first commits
0 parents  commit 933ad4f

14 files changed

+560
-0
lines changed

.editorconfig

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
# .editorconfig <https://github.com/tunnckoCore/dotfiles>
2+
#
3+
# Copyright (c) 2014-2015 Charlike Mike Reagent, contributors.
4+
# Released under the MIT license.
5+
#
6+
7+
root = true
8+
9+
[*]
10+
indent_style = space
11+
charset = utf-8
12+
end_of_line = lf
13+
insert_final_newline = false
14+
trim_trailing_whitespace = false
15+
16+
[*.{js,php}]
17+
indent_size = 2
18+
insert_final_newline = true
19+
trim_trailing_whitespace = true
20+
21+
[*.{php,html}]
22+
indent_size = 4
23+
24+
[*.{json,cson,yml,yaml,html,md,jade,css,stylus}]
25+
indent_size = 2
26+
27+
[Makefile]
28+
indent_size = 2
29+
indent_style = tab
30+
31+
[.*rc]
32+
indent_size = 2
33+
indent_style = space
34+
trim_trailing_whitespace = true

.gitattributes

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
# .gitattributes <https://github.com/tunnckoCore/dotfiles>
2+
#
3+
# Copyright (c) 2014-2015 Charlike Mike Reagent, contributors.
4+
# Released under the MIT license.
5+
#
6+
7+
# These settings are for any web project
8+
9+
# Handle line endings automatically for files detected as text
10+
# and leave all files detected as binary untouched.
11+
12+
* text=auto
13+
14+
#
15+
# The above will handle all files NOT found below
16+
# These files are text and should be normalized (Convert crlf => lf)
17+
#
18+
19+
*.php text
20+
*.css text
21+
*.js text
22+
*.htm text
23+
*.html text
24+
*.xml text
25+
*.txt text
26+
*.ini text
27+
*.inc text
28+
.htaccess text
29+
30+
#
31+
# These files are binary and should be left untouched
32+
# (binary is a macro for -text -diff)
33+
#
34+
35+
*.png binary
36+
*.jpg binary
37+
*.jpeg binary
38+
*.gif binary
39+
*.ico binary
40+
*.mov binary
41+
*.mp4 binary
42+
*.mp3 binary
43+
*.flv binary
44+
*.fla binary
45+
*.swf binary
46+
*.gz binary
47+
*.zip binary
48+
*.7z binary
49+
*.ttf binary

.gitignore

Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
# .gitignore <https://github.com/tunnckoCore/dotfiles>
2+
#
3+
# Copyright (c) 2014-2015 Charlike Mike Reagent, contributors.
4+
# Released under the MIT license.
5+
#
6+
7+
# Always-ignore dirs #
8+
# ####################
9+
_gh_pages
10+
node_modules
11+
bower_components
12+
components
13+
vendor
14+
build
15+
dest
16+
dist
17+
src
18+
lib-cov
19+
coverage
20+
nbproject
21+
cache
22+
temp
23+
tmp
24+
25+
# Packages #
26+
# ##########
27+
*.7z
28+
*.dmg
29+
*.gz
30+
*.iso
31+
*.jar
32+
*.rar
33+
*.tar
34+
*.zip
35+
36+
# OS, Logs and databases #
37+
# #########################
38+
*.pid
39+
*.dat
40+
*.log
41+
*.sql
42+
*.sqlite
43+
*~
44+
~*
45+
46+
# Another files #
47+
# ###############
48+
Icon?
49+
.DS_Store*
50+
Thumbs.db
51+
ehthumbs.db
52+
Desktop.ini
53+
npm-debug.log
54+
.directory
55+
._*

.jscsrc

Lines changed: 116 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,116 @@
1+
{
2+
"fileExtensions": [".js"],
3+
"maxErrors": 10,
4+
"esnext": true,
5+
"safeContextKeyword": ["self", "_this", "that"],
6+
7+
"maximumLineLength": {
8+
"value": 80,
9+
"allowUrlComments": true,
10+
"allowComments": true,
11+
"allowRegex": true
12+
},
13+
14+
"validateQuoteMarks": "'",
15+
"validateIndentation": 2,
16+
17+
"requireCurlyBraces": [
18+
"if",
19+
"else",
20+
"for",
21+
"while",
22+
"do",
23+
"try",
24+
"catch"
25+
],
26+
"requireSpaceAfterKeywords": [
27+
"if",
28+
"else",
29+
"for",
30+
"while",
31+
"do",
32+
"switch",
33+
"case",
34+
"return",
35+
"try",
36+
"catch",
37+
"typeof"
38+
],
39+
40+
"requireCamelCaseOrUpperCaseIdentifiers": true,
41+
"requireSpacesInConditionalExpression": true,
42+
"requireSpaceBeforeBlockStatements": true,
43+
"requireSpaceBeforeBinaryOperators": true,
44+
"requireOperatorBeforeLineBreak": true,
45+
"requireCapitalizedConstructors": true,
46+
"requireParenthesesAroundIIFE": true,
47+
"requireCommaBeforeLineBreak": true,
48+
"requireLineFeedAtFileEnd": true,
49+
"requireDotNotation": true,
50+
51+
"disallowYodaConditions": true,
52+
"disallowMultipleLineStrings": true,
53+
"disallowMultipleLineBreaks": true,
54+
"disallowMultipleVarDecl": true,
55+
"disallowMixedSpacesAndTabs": true,
56+
"disallowTrailingComma": true,
57+
"disallowTrailingWhitespace": true,
58+
"disallowSpaceAfterPrefixUnaryOperators": true,
59+
"disallowSpacesInsideObjectBrackets": "all",
60+
"disallowSpacesInsideParentheses": true,
61+
"disallowSpacesInsideArrayBrackets": true,
62+
"disallowNewlineBeforeBlockStatements": true,
63+
"disallowSpaceBeforePostfixUnaryOperators": true,
64+
"disallowImplicitTypeConversion": ["string"],
65+
"disallowKeywords": ["with"],
66+
"disallowKeywordsOnNewLine": ["else"],
67+
"disallowSpacesInCallExpression": true,
68+
69+
"requireSpacesInFunctionExpression": {
70+
"beforeOpeningCurlyBrace": true
71+
},
72+
"disallowSpacesInFunctionExpression": {
73+
"beforeOpeningRoundBrace": true
74+
},
75+
"disallowSpacesInFunctionDeclaration": {
76+
"beforeOpeningRoundBrace": true
77+
},
78+
79+
"plugins": [
80+
"jscs-jsdoc"
81+
],
82+
"jsDoc": {
83+
"checkParamNames": true,
84+
"requireParamTypes": true,
85+
"checkRedundantParams": true,
86+
"checkReturnTypes": true,
87+
"checkRedundantReturns": true,
88+
"requireReturnTypes": true,
89+
"checkRedundantAccess": true,
90+
"checkTypes": "capitalizedNativeCase",
91+
"checkAnnotations": {
92+
"preset": "jsdoc3",
93+
"extra": {
94+
"api": true
95+
}
96+
}
97+
},
98+
99+
"excludeFiles": [
100+
"_gh_pages/**",
101+
"node_modules/**",
102+
"bower_components/**",
103+
"components/**",
104+
"vendor/**",
105+
"build/**",
106+
"dest/**",
107+
"dist/**",
108+
"src/**",
109+
"lib-cov/**",
110+
"coverage/**",
111+
"nbproject/**",
112+
"cache/**",
113+
"temp/**",
114+
"tmp/**"
115+
]
116+
}

.jshintignore

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
# .jshintignore <https://github.com/tunnckoCore/dotfiles>
2+
#
3+
# Copyright (c) 2014-2015 Charlike Mike Reagent, contributors.
4+
# Released under the MIT license.
5+
#
6+
7+
# Always-ignore dirs #
8+
# ####################
9+
_gh_pages
10+
node_modules
11+
bower_components
12+
components
13+
vendor
14+
build
15+
dest
16+
dist
17+
src
18+
lib-cov
19+
coverage
20+
nbproject
21+
cache
22+
temp
23+
tmp

.jshintrc

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
{
2+
"maxerr" : 10,
3+
"indent" : 2,
4+
5+
"maxparams" : 3,
6+
"maxdepth" : 3,
7+
"maxstatements" : 15,
8+
"maxlen" : 120,
9+
10+
"camelcase" : true,
11+
"forin" : false,
12+
"immed" : true,
13+
"newcap" : true,
14+
"quotmark" : "single",
15+
16+
"asi" : true,
17+
"eqnull" : true,
18+
"esnext" : true,
19+
"funcscope" : true,
20+
"globalstrict" : true,
21+
"lastsemic" : true,
22+
"shadow" : true,
23+
24+
"node" : true,
25+
"nonstandard" : true,
26+
27+
"globals": {
28+
"it": true,
29+
"describe": true,
30+
"beforeEach": true,
31+
"afterEach": true,
32+
"before": true,
33+
"after": true,
34+
"define": true,
35+
"should": true
36+
}
37+
}

.travis.yml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
language: node_js
2+
node_js:
3+
- "0.10"
4+
- "0.11"
5+
matrix:
6+
allow_failures:
7+
- node_js: "0.10"
8+
fast_finish: true
9+
script: "npm run-script test-travis"
10+
after_script: "npm install coveralls && cat ./coverage/lcov.info | coveralls"

fixtures.js

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
2+
module.exports.fixtureOne = function() {
3+
return {
4+
fn: function testing(cmd, args, opts) {
5+
var obj = {
6+
maybe: 'yea'
7+
};
8+
var come = function come() { return true; };
9+
10+
return {
11+
only: 'one',
12+
command: cmd,
13+
arguments: args,
14+
come: come
15+
};
16+
},
17+
body: '\n var obj = {\n maybe: \'yea\'\n };\n var come = function come() { return true; };\n\n return {\n only: \'one\',\n command: cmd,\n arguments: args,\n come: come\n };\n '
18+
};
19+
}
20+
21+
module.exports.fixtureTwo = function() {
22+
return {
23+
fn: function typeOf(val) {
24+
if (typeof val !== 'object') {
25+
return typeof val;
26+
}
27+
28+
if (Array.isArray(val)) {
29+
return 'array';
30+
}
31+
32+
return {}.toString(val).slice(8, -1).toLowerCase();
33+
},
34+
body: '\n if (typeof val !== \'object\') {\n return typeof val;\n }\n\n if (Array.isArray(val)) {\n return \'array\';\n }\n\n return {}.toString(val).slice(8, -1).toLowerCase();\n '
35+
};
36+
};

history.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
2+
3+
## v0.0.0 / January 25, 2015
4+
- first commits

index.js

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
/**
2+
* function-regex <https://github.com/tunnckoCore/function-regex>
3+
*
4+
* Copyright (c) 2014-2015 Charlike Mike Reagent, contributors.
5+
* Released under the MIT license.
6+
*/
7+
8+
'use strict';
9+
10+
module.exports = function functionRegex() {
11+
return /^function\s*(\w*)\s*\(([\w\s,]*)\)\s*\{([\w\W\s\S]*)\}$/;
12+
};

0 commit comments

Comments
 (0)