Skip to content

Commit 1c94703

Browse files
authored
Rework to ep (#12)
Rework to ep
1 parent d2836ab commit 1c94703

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

68 files changed

+2692
-1557
lines changed

.babelrc

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
{
2+
"presets": [
3+
"es2015"
4+
]
5+
}

.eslintrc

Lines changed: 86 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,86 @@
1+
{
2+
"parser": "babel-eslint",
3+
"env": {
4+
"node": true,
5+
"es6": true,
6+
"browser": true
7+
},
8+
"rules": {
9+
# Possible errors
10+
comma-dangle: 2,
11+
no-console: 2,
12+
no-cond-assign: 2,
13+
no-control-regex: 2,
14+
no-debugger: 2,
15+
no-dupe-args: 2,
16+
no-dupe-keys: 2,
17+
no-duplicate-case: 2,
18+
no-empty: 2,
19+
no-empty-character-class: 2,
20+
no-ex-assign: 2,
21+
no-extra-boolean-cast: 2,
22+
no-extra-semi: 2,
23+
no-func-assign: 2,
24+
no-invalid-regexp: 2,
25+
no-irregular-whitespace: 2,
26+
no-negated-in-lhs: 2,
27+
no-obj-calls: 2,
28+
no-proto: 2,
29+
no-unexpected-multiline: 2,
30+
no-unreachable: 2,
31+
use-isnan: 2,
32+
valid-typeof: 2,
33+
valid-jsdoc: 2,
34+
# Best practices
35+
curly: [2, "multi"],
36+
eqeqeq: 2,
37+
no-fallthrough: 2,
38+
no-param-reassign: 2,
39+
no-octal: 2,
40+
no-redeclare: 2,
41+
# strict mode
42+
strict: [2, "global"],
43+
# variables
44+
no-delete-var: 2,
45+
no-undef: 2,
46+
no-unused-vars: 2,
47+
# node
48+
no-mixed-requires: 2,
49+
no-new-require: 2,
50+
# stylistic
51+
brace-style: 2,
52+
camelcase: 2,
53+
comma-style: 2,
54+
comma-spacing: 2,
55+
eol-last: 2,
56+
indent: [2, 2, {SwitchCase: 1}],
57+
keyword-spacing: 2,
58+
max-len: [2, 80, 2],
59+
max-depth: [2, 4],
60+
new-cap: 2,
61+
new-parens: 2,
62+
no-mixed-spaces-and-tabs: 2,
63+
no-multiple-empty-lines: [2, {max: 2}],
64+
no-trailing-spaces: 2,
65+
quotes: [2, "single"],
66+
semi: 2,
67+
space-before-blocks: [2, "always"],
68+
space-before-function-paren: [2, "never"],
69+
space-in-parens: [2, "never"],
70+
space-infix-ops: 2,
71+
space-unary-ops: 2,
72+
# es6
73+
arrow-parens: [2, "always"],
74+
arrow-spacing: [2, {"before": true, "after": true}],
75+
constructor-super: 2,
76+
no-class-assign: 2,
77+
no-confusing-arrow: 2,
78+
no-const-assign: 2,
79+
no-dupe-class-members: 2,
80+
no-this-before-super: 2,
81+
no-var: 2,
82+
prefer-const: 2,
83+
prefer-rest-params: 2,
84+
template-curly-spacing: 2
85+
}
86+
}

.gitignore

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,3 @@
1-
build/
1+
public/
2+
3+
test/test.js

.sass-lint.yml

Lines changed: 91 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,91 @@
1+
options:
2+
formatter: stylish
3+
files:
4+
include: 'src/script/entries/ep/**/*.s+(a|c)ss'
5+
rules:
6+
# Extends
7+
extends-before-mixins: 1
8+
extends-before-declarations: 1
9+
placeholder-in-extend: 1
10+
11+
# Mixins
12+
mixins-before-declarations: 1
13+
14+
# Line Spacing
15+
one-declaration-per-line: 1
16+
empty-line-between-blocks: 1
17+
single-line-per-selector: 1
18+
19+
# Disallows
20+
no-attribute-selectors: 0
21+
no-color-hex: 0
22+
no-color-keywords: 1
23+
no-color-literals: 1
24+
no-combinators: 0
25+
no-css-comments: 1
26+
no-debug: 1
27+
no-disallowed-properties: 0
28+
no-duplicate-properties: 1
29+
no-empty-rulesets: 1
30+
no-extends: 0
31+
no-ids: 1
32+
no-important: 1
33+
no-invalid-hex: 1
34+
no-mergeable-selectors: 1
35+
no-misspelled-properties: 1
36+
no-qualifying-elements: 1
37+
no-trailing-whitespace: 1
38+
no-trailing-zero: 1
39+
no-transition-all: 1
40+
no-universal-selectors: 0
41+
no-url-protocols: 1
42+
no-vendor-prefixes: 0
43+
no-warn: 1
44+
property-units: 0
45+
46+
# Nesting
47+
force-attribute-nesting: 1
48+
force-element-nesting: 1
49+
force-pseudo-nesting: 1
50+
51+
# Name Formats
52+
class-name-format: 1
53+
function-name-format: 1
54+
id-name-format: 0
55+
mixin-name-format: 1
56+
placeholder-name-format: 1
57+
variable-name-format: 1
58+
59+
# Style Guide
60+
attribute-quotes: 1
61+
bem-depth: 0
62+
border-zero: 1
63+
brace-style: 1
64+
clean-import-paths: 1
65+
empty-args: 1
66+
hex-length: 1
67+
hex-notation: 1
68+
indentation: 1
69+
leading-zero: 1
70+
nesting-depth: 1
71+
property-sort-order: 1
72+
pseudo-element: 1
73+
quotes: 1
74+
shorthand-values: 1
75+
url-quotes: 1
76+
variable-for-property: 1
77+
zero-unit: 1
78+
79+
# Inner Spacing
80+
space-after-comma: 1
81+
space-before-colon: 1
82+
space-after-colon: 1
83+
space-before-brace: 1
84+
space-before-bang: 1
85+
space-after-bang: 1
86+
space-between-parens: 1
87+
space-around-operator: 1
88+
89+
# Final Items
90+
trailing-semicolon: 1
91+
final-newline: 1

ISSUE_TEMPLATE.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
## Issue summary
2+
3+
## Expected behavior
4+
5+
## Browser used
6+
7+
## Steps to reproduce
8+
9+
@jh3y

LICENSE

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
ep - enhance your progress bars with minimal effort
2+
3+
https://jh3y.github.io/ep
4+
5+
MIT License
6+
7+
Copyright (c) 2016 jh3y
8+
9+
Permission is hereby granted, free of charge, to any person obtaining a copy
10+
of this software and associated documentation files (the "Software"), to deal
11+
in the Software without restriction, including without limitation the rights
12+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
13+
copies of the Software, and to permit persons to whom the Software is
14+
furnished to do so, subject to the following conditions:
15+
16+
The above copyright notice and this permission notice shall be included in all
17+
copies or substantial portions of the Software.
18+
19+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
20+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
21+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
22+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
23+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
24+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
25+
SOFTWARE.

Makefile

Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
MODULES = ./node_modules/.bin
2+
WEBPACK = $(MODULES)/webpack
3+
SERVER = $(MODULES)/webpack-dev-server
4+
MOCHA = $(MODULES)/mocha
5+
BABEL = $(MODULES)/babel
6+
UGLIFY = $(MODULES)/uglifyjs
7+
SASS = $(MODULES)/node-sass
8+
POSTCSS = $(MODULES)/postcss
9+
CLEANCSS = $(MODULES)/cleancss
10+
ESLINT = $(MODULES)/eslint
11+
SASSLINT = $(MODULES)/sass-lint
12+
GHPAGES = $(MODULES)/gh-pages
13+
14+
DEST = dist
15+
FILE_NAME = ep
16+
SCRIPT_SRC = src/script/entries/ep/index.js
17+
STYLE_SRC = src/script/entries/ep/ep.scss
18+
19+
UGLIFY_OPTS = --compress --comments --mangle -o $(DEST)/$(FILE_NAME).min.js $(DEST)/$(FILE_NAME).js
20+
CLEANCSS_OPTS = --s1 -o $(DEST)/$(FILE_NAME).min.css $(DEST)/$(FILE_NAME).css
21+
POSTCSS_OPTS = --use autoprefixer -d $(DEST)/ $(DEST)/*.css
22+
23+
help:
24+
@grep -E '^[a-zA-Z\._-]+:.*?## .*$$' $(MAKEFILE_LIST) | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-20s\033[0m %s\n", $$1, $$2}'
25+
26+
bundle: ## bundles source
27+
$(WEBPACK) --progress --colors
28+
29+
deploy: ## create deployment bundle
30+
rm -rf public && $(WEBPACK) --progress --colors -p --deploy && $(GHPAGES) -d public
31+
32+
test-bundle: ## bundles test source
33+
$(WEBPACK) --config webpack.config.test.babel.js --progress --colors
34+
35+
test: test-bundle ## runs tests
36+
$(MOCHA) test/test.js
37+
38+
develop: ## develop source
39+
$(SERVER) --progress --colors -d --hot --inline
40+
41+
setup: ## sets up project
42+
npm install
43+
44+
dist-style: ## compiles styles for dist
45+
mkdir -pv $(DEST) && $(SASS) $(STYLE_SRC) $(DEST)/$(FILE_NAME).css && $(POSTCSS) $(POSTCSS_OPTS) && $(CLEANCSS) $(CLEANCSS_OPTS)
46+
47+
dist-script: ## compiles script for dist
48+
mkdir -pv $(DEST) && $(BABEL) $(SCRIPT_SRC) -o $(DEST)/$(FILE_NAME).js && $(UGLIFY) $(UGLIFY_OPTS)
49+
50+
clean: ## removes directories
51+
rm -rf $(DEST) public
52+
53+
dist: clean ## create dist scripts
54+
rm -rf $(DEST) && mkdir -pv $(DEST) && make dist-script && make dist-style
55+
56+
lint-scripts: ## lints ep script
57+
$(ESLINT) $(SCRIPT_SRC)
58+
59+
lint-styles: ## lints ep stylesheet
60+
$(SASSLINT) --verbose
61+
62+
lint: ## lints source
63+
make lint-styles && make lint-scripts

PULL_REQUEST_TEMPLATE.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
Fixes # || Adds new feature X
2+
3+
Changes include;
4+
* a
5+
* b
6+
* c
7+
8+
Checks
9+
- [ ] Passes linting
10+
- [ ] Updated documentation
11+
- [ ] Updated versioning
12+
- [ ] Updated dist files
13+
14+
@jh3y

0 commit comments

Comments
 (0)