-
-
Notifications
You must be signed in to change notification settings - Fork 4
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
Waren Gonzaga
committed
Nov 5, 2020
1 parent
1430ef5
commit 7c82f1b
Showing
13 changed files
with
1,630 additions
and
112 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,9 @@ | ||
{ | ||
"parserOptions": { | ||
"ecmaVersion": 2017 | ||
}, | ||
|
||
"env": { | ||
"es6": true | ||
} | ||
} |
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,24 @@ | ||
/*! | ||
* Fork Corner - https://github.com/WarenGonzaga/fork-corner#readme | ||
* A modern and global open source fork corner label for your project's landing page. | ||
* Version: 1.0.0-alpha.1 | ||
* Github: https://github.com/WarenGonzaga/fork-corner | ||
* Licensed Under The MIT License: http://opensource.org/licenses/MIT | ||
* Copyright (c) 2020 Waren Gonzaga | ||
* | ||
* Facebook: @warengonzagaofficial | ||
* Twitter: @warengonzaga | ||
* Github: @warengonzaga | ||
* Website: warengonzaga.com | ||
*/ | ||
|
||
/*! | ||
* Main Stylesheet | Fork Corner | ||
* By Waren Gonzaga | ||
*//*! | ||
* Variables Stylesheet | Fork Corner | ||
* By Waren Gonzaga | ||
*//*! | ||
* Base Stylesheet | Fork Corner | ||
* By Waren Gonzaga | ||
*/ |
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 @@ | ||
/*! | ||
* Fork Corner - https://github.com/WarenGonzaga/fork-corner#readme | ||
* A modern and global open source fork corner label for your project's landing page. | ||
* Version: 1.0.0-alpha.1 | ||
* Github: https://github.com/WarenGonzaga/fork-corner | ||
* Licensed Under The MIT License: http://opensource.org/licenses/MIT | ||
* Copyright (c) 2020 Waren Gonzaga | ||
* | ||
* Facebook: @warengonzagaofficial | ||
* Twitter: @warengonzaga | ||
* Github: @warengonzaga | ||
* Website: warengonzaga.com | ||
*/ | ||
|
||
/*! | ||
* Main Stylesheet | Fork Corner | ||
* By Waren Gonzaga | ||
*/ | ||
/*! | ||
* Variables Stylesheet | Fork Corner | ||
* By Waren Gonzaga | ||
*/ | ||
/*! | ||
* Base Stylesheet | Fork Corner | ||
* By Waren Gonzaga | ||
*/ |
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,24 @@ | ||
/*! | ||
* Fork Corner - https://github.com/WarenGonzaga/fork-corner#readme | ||
* A modern and global open source fork corner label for your project's landing page. | ||
* Version: 1.0.0-alpha.1 | ||
* Github: https://github.com/WarenGonzaga/fork-corner | ||
* Licensed Under The MIT License: http://opensource.org/licenses/MIT | ||
* Copyright (c) 2020 Waren Gonzaga | ||
* | ||
* Facebook: @warengonzagaofficial | ||
* Twitter: @warengonzaga | ||
* Github: @warengonzaga | ||
* Website: warengonzaga.com | ||
*/ | ||
|
||
/*! | ||
* Main Stylesheet | Fork Corner | ||
* By Waren Gonzaga | ||
*//*! | ||
* Variables Stylesheet | Fork Corner | ||
* By Waren Gonzaga | ||
*//*! | ||
* Base Stylesheet | Fork Corner | ||
* By Waren Gonzaga | ||
*/ |
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,27 @@ | ||
/*! | ||
* Fork Corner - https://github.com/WarenGonzaga/fork-corner#readme | ||
* A modern and global open source fork corner label for your project's landing page. | ||
* Version: 1.0.0-alpha.1 | ||
* Github: https://github.com/WarenGonzaga/fork-corner | ||
* Licensed Under The MIT License: http://opensource.org/licenses/MIT | ||
* Copyright (c) 2020 Waren Gonzaga | ||
* | ||
* Facebook: @warengonzagaofficial | ||
* Twitter: @warengonzaga | ||
* Github: @warengonzaga | ||
* Website: warengonzaga.com | ||
*/ | ||
|
||
/*! | ||
* Fork Corner - https://github.com/WarenGonzaga/fork-corner#readme | ||
* A modern and global open source fork corner label for your project's landing page. | ||
* Version: 1.0.0-alpha.1 | ||
* Github: https://github.com/WarenGonzaga/fork-corner | ||
* Licensed Under The MIT License: http://opensource.org/licenses/MIT | ||
* Copyright (c) 2020 Waren Gonzaga | ||
* | ||
* Facebook: @warengonzagaofficial | ||
* Twitter: @warengonzaga | ||
* Github: @warengonzaga | ||
* Website: warengonzaga.com | ||
*/ |
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,103 @@ | ||
/*! | ||
* Fork Corner | Gulpfile | ||
* By Waren Gonzaga | ||
*/ | ||
|
||
// modules | ||
const { | ||
series, | ||
src, | ||
dest, | ||
watch } = require('gulp'), | ||
sass = require('gulp-sass'), | ||
sassLint = require('gulp-sass-lint'), | ||
header = require('gulp-header'), | ||
rename = require('gulp-rename'), | ||
clean = require('gulp-clean'), | ||
fs = require('fs'); | ||
|
||
const path = { | ||
root: "./", | ||
build: "./*.css", | ||
source: "./source", | ||
demo: "./demo" | ||
}; | ||
|
||
// open source label | ||
const pkg = JSON.parse(fs.readFileSync('package.json')); | ||
const data = { | ||
banner: [ | ||
'/*!', | ||
' * Fork Corner - <%= homepage %>', | ||
' * <%= description %>', | ||
' * Version: <%= version %>', | ||
' * Github: <%= github %>', | ||
' * Licensed Under The MIT License: http://opensource.org/licenses/MIT', | ||
' * Copyright (c) <%= new Date().getFullYear() %> <%= author %>', | ||
' *', | ||
' * Facebook: @warengonzagaofficial', | ||
' * Twitter: @warengonzaga', | ||
' * Github: @warengonzaga', | ||
' * Website: warengonzaga.com', | ||
' */\n\n', | ||
].join('\n'), | ||
}; | ||
|
||
// setup sass compiler | ||
sass.compiler = require('node-sass'); | ||
|
||
// link css | ||
function lintCSS() { | ||
return src(path.source+'/*.scss') | ||
.pipe(sassLint()) | ||
.pipe(sassLint.format()) | ||
.pipe(sassLint.failOnError()); | ||
} | ||
|
||
// compile css | ||
function compile() { | ||
return src(path.source+'/*.scss') | ||
.pipe(sass().on('error', sass.logError)) | ||
.pipe(dest(path.root)); | ||
} | ||
|
||
// minify css | ||
function minify() { | ||
return src(path.build) | ||
.pipe(rename({ | ||
suffix: '.min' | ||
})) | ||
.pipe(sass({outputStyle: "compressed"}).on('error', sass.logError)) | ||
.pipe(dest(path.root)); | ||
} | ||
|
||
// add copyright label | ||
function copyright() { | ||
return src(path.build) | ||
.pipe(header(data.banner, pkg)) | ||
.pipe(dest(path.root)); | ||
} | ||
|
||
// clean builds | ||
function cleanBuild() { | ||
return src([path.build, path.demo+'/assets/css/*.css'], {read: false}) | ||
.pipe(clean()); | ||
} | ||
|
||
// develop builds | ||
function devBuild() { | ||
return watch(path.source+'/*.scss', series( | ||
lintCSS, compile, minify, copyright, demo | ||
)); | ||
} | ||
|
||
// demo | ||
function demo() { | ||
return src('./fork-corner.min.css') | ||
.pipe(dest(path.demo+'/assets/css/')) | ||
} | ||
|
||
// gulp process | ||
exports.default = series(lintCSS, compile, minify, copyright, demo); | ||
exports.dev = devBuild; | ||
exports.clean = cleanBuild; |
Oops, something went wrong.