-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit 8ac1afc
Showing
15 changed files
with
10,953 additions
and
0 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,12 @@ | ||
{ | ||
"env": { | ||
"browser": true, | ||
"es2021": true | ||
}, | ||
"extends": "eslint:recommended", | ||
"parserOptions": { | ||
"ecmaVersion": 12, | ||
"sourceType": "module" | ||
}, | ||
"rules": {} | ||
} |
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,4 @@ | ||
node_modules | ||
.DS_Store | ||
|
||
public |
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 @@ | ||
lts/Fermium |
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,137 @@ | ||
files: | ||
include: you-project/css/**/*.scss | ||
ignore: | ||
- 'your-project/css/vendors/**.scss' | ||
- 'you-project/css/variables.scss' | ||
options: | ||
formatter: stylish | ||
merge-default-rules: false | ||
rules: | ||
bem-depth: | ||
- 0 | ||
- max-depth: 1 | ||
border-zero: | ||
- 1 | ||
- convention: none | ||
brace-style: | ||
- 1 | ||
- allow-single-line: true | ||
class-name-format: | ||
- 0 | ||
- convention: hyphenatedbem | ||
clean-import-paths: | ||
- 1 | ||
- filename-extension: false | ||
leading-underscore: false | ||
empty-line-between-blocks: | ||
- 1 | ||
- ignore-single-line-rulesets: true | ||
extends-before-declarations: 1 | ||
extends-before-mixins: 1 | ||
final-newline: | ||
- 0 | ||
- include: true | ||
force-attribute-nesting: 1 | ||
force-element-nesting: 0 | ||
force-pseudo-nesting: 0 | ||
function-name-format: | ||
- 1 | ||
- allow-leading-underscore: true | ||
convention: hyphenatedlowercase | ||
hex-length: | ||
- 1 | ||
- style: long | ||
hex-notation: | ||
- 1 | ||
- style: lowercase | ||
id-name-format: | ||
- 0 | ||
- convention: hyphenatedbem | ||
indentation: | ||
- 1 | ||
- size: 4 | ||
leading-zero: | ||
- 0 | ||
- include: false | ||
mixin-name-format: | ||
- 1 | ||
- allow-leading-underscore: true | ||
convention: >- | ||
^([\.\%]?[a-z]*[-]?[a-z0-9\-]*)(\.[a-z0-9\-]*)?(__[a-z0-9]*[-]?[a-z0-9\-]*)?(--[a-z0-9]*[-]?[a-z0-9\-]*)?(\:[a-z]*)*$ | ||
convention-explanation: BEM pattern | ||
mixins-before-declarations: 0 | ||
nesting-depth: | ||
- 1 | ||
- max-depth: 3 | ||
no-color-keywords: 1 | ||
no-color-literals: 0 | ||
no-css-comments: 1 | ||
no-debug: 1 | ||
no-duplicate-properties: 1 | ||
no-empty-rulesets: 1 | ||
no-extends: 0 | ||
no-ids: 1 | ||
no-important: 0 | ||
no-invalid-hex: 1 | ||
no-mergeable-selectors: 1 | ||
no-misspelled-properties: | ||
- 1 | ||
- extra-properties: [] | ||
no-qualifying-elements: | ||
- 0 | ||
- allow-element-with-attribute: false | ||
allow-element-with-class: false | ||
allow-element-with-id: false | ||
no-trailing-zero: 1 | ||
no-url-protocols: 1 | ||
no-vendor-prefixes: | ||
- 0 | ||
- additional-identifiers: [] | ||
excluded-identifiers: [] | ||
placeholder-in-extend: 1 | ||
placeholder-name-format: | ||
- 1 | ||
- convention: hyphenatedbem | ||
property-sort-order: | ||
- 1 | ||
- ignore-custom-properties: false | ||
order: smacss | ||
quotes: | ||
- 1 | ||
- style: single | ||
shorthand-values: | ||
- 1 | ||
- allowed-shorthands: | ||
- 1 | ||
- 2 | ||
- 3 | ||
- 4 | ||
single-line-per-selector: 1 | ||
space-after-bang: | ||
- 1 | ||
- include: false | ||
space-after-colon: | ||
- 1 | ||
- include: true | ||
space-after-comma: 0 | ||
space-before-bang: | ||
- 1 | ||
- include: true | ||
space-before-brace: | ||
- 1 | ||
- include: true | ||
space-before-colon: 1 | ||
space-between-parens: | ||
- 1 | ||
- include: false | ||
trailing-semicolon: 1 | ||
url-quotes: 1 | ||
variable-for-property: | ||
- 0 | ||
- properties: [] | ||
variable-name-format: | ||
- 1 | ||
- allow-leading-underscore: true | ||
convention: hyphenatedlowercase | ||
zero-unit: 0 | ||
|
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,7 @@ | ||
/*jshint esversion: 8 */ | ||
|
||
export default { | ||
presets: [ | ||
['@babel/preset-env', { targets: { node: 'current' } }] | ||
], | ||
}; |
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,109 @@ | ||
/*jshint esversion: 8 */ | ||
|
||
import gulp from 'gulp'; | ||
import browserSync from 'browser-sync'; | ||
import process from 'process'; | ||
import del from 'del'; | ||
import jest from 'gulp-jest'; | ||
|
||
//SASS | ||
|
||
import gulpSass from "gulp-sass"; | ||
import dartSass from "sass"; | ||
const sass = gulpSass(dartSass); | ||
|
||
const dest = 'public'; | ||
|
||
// BrowserSync Server | ||
|
||
const server = browserSync.create(); | ||
|
||
function reload(done) { | ||
server.reload(); | ||
done(); | ||
} | ||
|
||
function serve(done) { | ||
server.init({ | ||
server: { | ||
baseDir: dest | ||
} | ||
}); | ||
done(); | ||
} | ||
|
||
// Paths and tasks ... | ||
|
||
const paths = { | ||
styles: { | ||
src: 'src/sass/**/*.scss', | ||
main: 'src/sass/main.scss', | ||
dest: `${dest}/styles/` | ||
}, | ||
scripts: { | ||
src: 'src/**/*.js', | ||
dest: `${dest}` | ||
}, | ||
html: { | ||
src: 'src/**/*.html', | ||
dest: `${dest}` | ||
} | ||
}; | ||
|
||
export const clean = async () => { | ||
del.sync([`${dest}/**`]); | ||
}; | ||
|
||
export function html() { | ||
return gulp | ||
.src(paths.html.src) | ||
.pipe(gulp.dest(paths.html.dest)); | ||
} | ||
|
||
export function styles() { | ||
return gulp | ||
.src(paths.styles.main) | ||
.pipe(sass.sync().on('error', sass.logError)) | ||
.pipe(gulp.dest(paths.styles.dest)); | ||
} | ||
|
||
export function scripts() { | ||
return gulp | ||
.src(paths.scripts.src) | ||
.pipe(gulp.dest(paths.scripts.dest)); | ||
} | ||
|
||
export const test = () => { | ||
process.env.NODE_ENV = 'test'; | ||
return gulp | ||
.src("tests/**/*test.js") | ||
.pipe(jest({ | ||
"preprocessorIgnorePatterns": [ | ||
"<rootDir>/dist/", "<rootDir>/node_modules/" | ||
], | ||
"automock": false | ||
})); | ||
}; | ||
|
||
export const build = (cb) => { | ||
clean(); | ||
html(); | ||
styles(); | ||
scripts(); | ||
cb(); | ||
}; | ||
|
||
const watch = () => { | ||
gulp.watch(paths.scripts.src, gulp.series(scripts, reload)); | ||
gulp.watch(paths.styles.src, gulp.series(styles, reload)); | ||
gulp.watch(paths.html.src, gulp.series(html, reload)); | ||
}; | ||
|
||
export const watchTests = () => { | ||
gulp.watch(["tests/**/*test.js"], test); | ||
}; | ||
|
||
export const dev = gulp.series(build, serve, watch); | ||
dev.description = 'Build app, start server, watch files, and use browsersync to update pages.'; | ||
|
||
export default dev; |
Oops, something went wrong.