-
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
1 parent
e0ce7b8
commit 602f2f7
Showing
6 changed files
with
124 additions
and
1 deletion.
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 |
---|---|---|
|
@@ -9,3 +9,7 @@ Thumbs.db | |
#Ignore metadata created by OSX | ||
.DS_Store | ||
._* | ||
|
||
# Ignore node stuff | ||
package-lock.json | ||
node_modules/ |
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,81 @@ | ||
"use strict"; | ||
|
||
var autoprefixer = require('gulp-autoprefixer'); | ||
var csso = require('gulp-csso'); | ||
var del = require('del'); | ||
var gulp = require('gulp'); | ||
var htmlmin = require('gulp-htmlmin'); | ||
var runSequence = require('run-sequence'); | ||
var uglify = require('gulp-uglify'); | ||
var run = require('gulp-run'); | ||
var gutil = require('gulp-util'); | ||
var imagemin = require('gulp-imagemin'); | ||
|
||
var imagePattern = '/**/*.+(jpg|JPG|jpeg|JPEG|png|PNG|svg|SVG|gif|GIF|webp|WEBP|tif|TIF)'; | ||
|
||
var AUTOPREFIXER_BROWSERS = [ | ||
'ie >= 10', | ||
'ie_mob >= 10', | ||
'ff >= 30', | ||
'chrome >= 34', | ||
'safari >= 7', | ||
'opera >= 23', | ||
'ios >= 7', | ||
'android >= 4.4', | ||
'bb >= 10' | ||
]; | ||
|
||
var path = { | ||
site: '_site', | ||
css: '_site/css', | ||
js: '_site/js', | ||
img: '_site/img' | ||
}; | ||
|
||
gulp.task('styles', function () { | ||
return gulp.src(path.css + '/**/**.css') | ||
.pipe(autoprefixer({ | ||
browsers: AUTOPREFIXER_BROWSERS | ||
})) | ||
.pipe(csso()) | ||
.pipe(gulp.dest(path.css)); | ||
}); | ||
|
||
gulp.task('scripts', function () { | ||
return gulp.src(path.js + '/**/*.js') | ||
.pipe(uglify()) | ||
.pipe(gulp.dest(path.js)); | ||
}); | ||
|
||
gulp.task('pages', function () { | ||
return gulp.src([path.site + '/**/*.html']) | ||
.pipe(htmlmin({ | ||
collapseWhitespace: true, | ||
removeComments: true | ||
})) | ||
.pipe(gulp.dest(path.site)); | ||
}); | ||
|
||
gulp.task('clean', () => del([path.site])); | ||
|
||
gulp.task('build', function () { | ||
return gulp.src('') | ||
.pipe(run('bundle exec jekyll build')) | ||
.on('error', gutil.log); | ||
}); | ||
|
||
gulp.task('images', function () { | ||
return gulp.src(path.img + imagePattern) | ||
.pipe(imagemin()) | ||
.pipe(gulp.dest(path.img)); | ||
}); | ||
|
||
gulp.task('default', ['clean'], function () { | ||
runSequence( | ||
'build', | ||
'styles', | ||
'scripts', | ||
'pages', | ||
'images' | ||
); | ||
}); |
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,25 @@ | ||
{ | ||
"name": "netponto-org", | ||
"version": "1.0.0", | ||
"description": "Comunidade NetPonto", | ||
"repository": { | ||
"type": "git", | ||
"url": "https://github.com/netponto/netponto.github.io.git" | ||
}, | ||
"author": "Comunidade NetPonto", | ||
"homepage": "https://netponto.github.io/", | ||
"devDependencies": { | ||
"del": "^3.0.0", | ||
"gulp": "^3.9.1", | ||
"gulp-autoprefixer": "^6.0.0", | ||
"gulp-csso": "^3.0.1", | ||
"gulp-htmlmin": "^5.0.1", | ||
"gulp-run-command": "^0.0.9", | ||
"gulp-sass": "^4.0.1", | ||
"gulp-uglify": "^3.0.1", | ||
"gulp-util": "^3.0.8", | ||
"run-sequence": "^2.2.1", | ||
"gulp-run": "^1.7.1", | ||
"gulp-imagemin": "^4.1.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