Skip to content
This repository has been archived by the owner on Nov 28, 2022. It is now read-only.

Commit

Permalink
minore fix
Browse files Browse the repository at this point in the history
  • Loading branch information
vedees committed May 28, 2018
1 parent 876f428 commit b943ecd
Show file tree
Hide file tree
Showing 9 changed files with 4,423 additions and 2,343 deletions.
Binary file modified .DS_Store
Binary file not shown.
3 changes: 2 additions & 1 deletion .jshintignore
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
node_modules/
node_modules/
dev/js/libs/
Binary file modified dev/.DS_Store
Binary file not shown.
Binary file modified dev/img/.DS_Store
Binary file not shown.
4 changes: 2 additions & 2 deletions dev/pug/pages/404.pug
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
extends layout/main

block variables
- var title = 'Page not found'
- var description = 'Error - page not found'
- var title = 'Page not found';
- var description = 'Error - page not found';

block content
h1 404 - Page not found
Expand Down
6 changes: 3 additions & 3 deletions dev/pug/pages/index.pug
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
extends layout/main

block variables
- var pageClass = 'index-page'
- var title = 'Index page'
- var description = 'Description for main page'
- var pageClass = 'index-page';
- var title = 'Index page';
- var description = 'Description for main page';


block content
Expand Down
56 changes: 30 additions & 26 deletions gulpfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ var gulp = require('gulp'),
tinypng = require('gulp-tinypng'),
plumber = require('gulp-plumber'),
notify = require('gulp-notify'),
beep = require('beepbeep'),
concat = require('gulp-concat'),
uglify = require('gulp-uglifyjs'),
jshint = require('gulp-jshint'),
Expand All @@ -24,7 +23,7 @@ var config = {
};


//Pug files
//Pug
gulp.task('pug', function () {
return gulp
.src(config.devFolder +'/pug/pages/*.pug')
Expand All @@ -38,17 +37,18 @@ gulp.task('pug', function () {
});


//Stylus Develop
//Stylus Dev
gulp.task('style:dev', function(){
return gulp
.src(config.devFolder +'/stylus/main.styl')
.pipe(sourcemaps.init())
.pipe(plumber({ errorHandler: onError }))
.pipe(stylus({
//Libs is 'devFolder' +'/sylus/libs.styl'
//Libs include here - 'devFolder' +'/sylus/libs.styl'
'include css': true
}))
.pipe(autoprefixer({
//3v for Flex-box
browsers: ['last 3 version']
}))
.pipe(sourcemaps.write('.'))
Expand All @@ -72,15 +72,16 @@ gulp.task('style:build', function(){
});


//JS Develop
//JS Dev
gulp.task('script:dev', function() {
return gulp

//Libs here
//Libs here:
.src([
'./node_modules/jquery/dist/jquery.min.js',
// './YOU_PATH/anotherLib.js',
'./dev/js/common.js'
// EXAMPLE:
// './node_modules/jquery/dist/jquery.min.js',
config.devFolder +'/js/libs/*.js',
config.devFolder +'/js/common.js'
])
.pipe(plumber())

Expand All @@ -91,7 +92,7 @@ gulp.task('script:dev', function() {
Also, you can comment on 2 lines below if you dont need jshint.
*/
.pipe(jshint())
.pipe(jshint.reporter('jshint-stylish', {beep: true}))
.pipe(jshint.reporter('jshint-stylish'))

.pipe(concat('main.js'))
.pipe(gulp.dest(config.buildFolder +config.secondBuildFolder +'/js'))
Expand All @@ -102,10 +103,11 @@ gulp.task('script:dev', function() {
gulp.task('script:build', function() {
return gulp

//Libs here
//Libs here:
.src([
'./node_modules/jquery/dist/jquery.min.js',
// './YOU_PATH/anotherLib.js',
// EXAMPLE:
// './node_modules/jquery/dist/jquery.min.js',
config.devFolder +'/js/libs/*.js',
config.devFolder +'/js/common.js'
])
.pipe(plumber())
Expand Down Expand Up @@ -137,6 +139,7 @@ gulp.task('img:dev', function() {
gulp.task('img:build', function() {
return gulp
.src(config.devFolder +'/img/**/*.{jpg,gif,png,svg,ico}')

/*
Go to https://tinypng.com/developers
Replace 'YOU_API_KEY' in your API
Expand Down Expand Up @@ -168,36 +171,38 @@ gulp.task('other', function() {
});


//Clean /build
//Clean buildFolder
gulp.task('clean', function() {
return del.sync(config.buildFolder)
});


//Watch
gulp.task('watch', function(){
gulp.watch(config.devFolder +'/pug/**/*.pug', ['pug']);
gulp.watch(config.devFolder +'/stylus/**/*.styl', ['style:dev']);
gulp.watch(config.devFolder +'/js/**/*.js', ['script:dev']);
gulp.watch(config.devFolder +'/img/**/*.img', ['img:dev']);
});


//Server
gulp.task('serve', function() {
browserSync({
server:{
baseDir: config.buildFolder
},
// port: 8080,
// open: true,
notify: false
})
});


//Watch
gulp.task('watch', function(){
gulp.watch(config.devFolder +'/pug/**/*.pug', ['pug']);
gulp.watch(config.devFolder +'/stylus/**/*.styl', ['style:dev']);
gulp.watch(config.devFolder +'/js/**/*.js', ['script:dev']);
gulp.watch(config.devFolder +'/img/**/*.img', ['img:dev']);
});


//MAIN TASK

//gulp
gulp.task('default', ['clean','style:dev','script:dev','pug','fonts','img:dev','other','serve','watch']);
gulp.task('default', ['clean','pug','style:dev','script:dev','fonts','img:dev','other','watch','serve']);

//build
gulp.task('build', ['clean','style:build','script:build','pug','fonts','img:build','other']);
Expand All @@ -219,7 +224,7 @@ gulp.task('deploy', function() {
.pipe(conn.dest('/server/folder'));
});

//Cache
//cache
gulp.task('cache', function() {
return cache.clearAll();
});
Expand All @@ -231,6 +236,5 @@ var onError = function(err) {
title: "Error in " + err.plugin,
message: err.message
})(err);
beep(2);
this.emit('end');
};
Loading

0 comments on commit b943ecd

Please sign in to comment.