This repository has been archived by the owner on May 12, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 282
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
Showing
10 changed files
with
141 additions
and
125 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
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
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
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,95 @@ | ||
'use strict' | ||
|
||
# -- Dependencies -------------------------------------------------------------- | ||
|
||
gulp = require 'gulp' | ||
gutil = require 'gulp-util' | ||
sass = require 'gulp-sass' | ||
concat = require 'gulp-concat' | ||
coffee = require 'gulp-coffee' | ||
header = require 'gulp-header' | ||
uglify = require 'gulp-uglify' | ||
cssmin = require 'gulp-cssmin' | ||
addsrc = require 'gulp-add-src' | ||
changed = require 'gulp-changed' | ||
pkg = require './package.json' | ||
prefix = require 'gulp-autoprefixer' | ||
strip = require 'gulp-strip-css-comments' | ||
browserSync = require 'browser-sync' | ||
reload = browserSync.reload | ||
|
||
# -- Files --------------------------------------------------------------------- | ||
|
||
src = | ||
sass: | ||
main : 'assets/scss/uno.scss' | ||
files : ['assets/scss/**/**'] | ||
js : | ||
main : ['assets/js/src/__init.coffee' | ||
'assets/js/src/cover.coffee' | ||
'assets/js/src/search.coffee' | ||
'assets/js/src/post.coffee'] | ||
vendor : ['assets/vendor/parrotjs/dist/parrot.standalone.js' | ||
'assets/vendor/parrot-module-device/dist/parrot.device.js' | ||
'assets/vendor/fastclick/lib/fastclick.js' | ||
'assets/vendor/ghostHunter/jquery.ghostHunter.min.js' | ||
'assets/vendor/pace/pace.min.js' | ||
'assets/vendor/reading-time/build/readingTime.min.js' ] | ||
css : | ||
main : 'assets/css/uno.css' | ||
vendor : ['assets/vendor/animate.css/animate.min.css'] | ||
|
||
dist = | ||
css : 'assets/css' | ||
js : 'assets/js' | ||
|
||
banner = [ "/**" | ||
" * <%= pkg.name %> - <%= pkg.description %>" | ||
" * @version v<%= pkg.version %>" | ||
" * @link <%= pkg.homepage %>" | ||
" * @author <%= pkg.author.name %> (<%= pkg.author.url %>)" | ||
" * @license <%= pkg.license %>" | ||
" */" | ||
"" ].join("\n") | ||
|
||
# -- Tasks --------------------------------------------------------------------- | ||
|
||
gulp.task 'css', -> | ||
gulp.src src.css.vendor | ||
.pipe changed dist.css | ||
.pipe addsrc src.sass.main | ||
.pipe sass() | ||
.pipe concat 'uno.css' | ||
.pipe prefix() | ||
.pipe strip | ||
all: true | ||
.pipe cssmin() | ||
.pipe header banner, pkg: pkg | ||
.pipe gulp.dest dist.css | ||
return | ||
|
||
gulp.task 'js', -> | ||
gulp.src src.js.main | ||
.pipe changed dist.js | ||
.pipe coffee().on "error", gutil.log | ||
.pipe addsrc src.js.vendor | ||
.pipe concat 'uno.js' | ||
.pipe uglify mangle: false | ||
.pipe header banner, pkg: pkg | ||
.pipe gulp.dest dist.js | ||
return | ||
|
||
gulp.task 'server', -> | ||
browserSync.init null, | ||
proxy: 'http://127.0.0.1:2387' | ||
files: ["assets/**/*.*"] | ||
reloadDelay: 300 | ||
port: 3000 | ||
return | ||
|
||
gulp.task 'build', ['css', 'js'] | ||
|
||
gulp.task "default", -> | ||
gulp.start ["build", "server"] | ||
gulp.watch src.sass.files, ["css"] | ||
gulp.watch src.js.main, ["js"] |
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