Skip to content

Commit d2bf660

Browse files
committed
Initial Commit
1 parent b564209 commit d2bf660

16 files changed

+342
-0
lines changed

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
node_modules/
2+
package-lock.json

.sass-lint.yml

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

README.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
#Super Simple Parallax
2+
3+
This aims to a super simple parallax plugin driven by CSS custom properties and transforms.

gulp/tasks/clean.js

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
'use strict';
2+
3+
var gulp = require('gulp');
4+
var del = require('del');
5+
6+
gulp.task('clean', function() {
7+
return del(global.destination);
8+
});

gulp/tasks/copy.js

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
'use strict';
2+
3+
var gulp = require('gulp');
4+
5+
gulp.task('copy', function () {
6+
var staticAssets = gulp.src([
7+
'src/**/*',
8+
// Exclude the following:
9+
'!src/*.html', // html files are handled by html task
10+
'!src/{js,js/**}', // scripts are handled by scripts task
11+
'!src/{img,img/**}', // handled by image task
12+
'!src/{scss,scss/**}', // handled by styles task
13+
])
14+
.pipe(gulp.dest(global.destination));
15+
return staticAssets;
16+
});

gulp/tasks/development.js

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
'use strict';
2+
3+
var gulp = require('gulp');
4+
var runSequence = require('run-sequence');
5+
6+
gulp.task('dev', function(cb) {
7+
global.mode = 'dev';
8+
global.destination = 'dev';
9+
runSequence('clean', ['styles', 'scsslint', 'scripts', 'jshints', 'copy'], 'watch', cb);
10+
});

gulp/tasks/jshints.js

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
'use strict';
2+
3+
var gulp = require('gulp'),
4+
jshint = require('gulp-jshint'),
5+
stylish = require('jshint-stylish'),
6+
handleErrors = require('../util/handleErrors');
7+
8+
gulp.task('jshints',function(){
9+
return gulp.src(['src/js/**/*.js', '!src/js/vendor/**/*.js'])
10+
.pipe(jshint())
11+
.pipe(jshint.reporter(stylish))
12+
});

gulp/tasks/production.js

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
'use strict';
2+
3+
var gulp = require('gulp');
4+
var runSequence = require('run-sequence');
5+
6+
gulp.task('prod', function(cb) {
7+
8+
global.mode = 'prod';
9+
global.destination = 'dist';
10+
runSequence('clean', 'styles', ['scripts', 'copy'], cb);
11+
});

gulp/tasks/scripts.js

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
'use strict';
2+
3+
var gulp = require('gulp'),
4+
uglify = require('gulp-uglify'),
5+
gulpif = require('gulp-if'),
6+
replace = require('gulp-replace'),
7+
jshint = require('gulp-jshint'),
8+
stylish = require('jshint-stylish'),
9+
handleErrors = require('../util/handleErrors');
10+
11+
gulp.task('scripts', function() {
12+
return gulp.src(['src/js/**/*.js'])
13+
.pipe(gulpif(global.mode !== 'dev',uglify()))
14+
.on('error', handleErrors)
15+
.pipe(gulp.dest(global.destination + '/js'));
16+
});

gulp/tasks/scsslint.js

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
'use strict';
2+
3+
var gulp = require('gulp'),
4+
sass = require('gulp-sass'),
5+
sassLint = require('gulp-sass-lint'),
6+
handleErrors = require('../util/handleErrors');
7+
8+
gulp.task('scsslint', function () {
9+
10+
return gulp.src(['src/scss/**/*.scss','!src/scss/vendor/**/*.scss','!src/scss/_mixins.scss'])
11+
.pipe(sassLint({
12+
options:{
13+
formatter: 'stylish'
14+
},
15+
configFile: '.sass-lint.yml'
16+
}))
17+
.pipe(sassLint.format())
18+
.on('error', handleErrors);
19+
});

0 commit comments

Comments
 (0)