Skip to content

Commit

Permalink
Merge pull request #20 from jr-cologne/pug-better-dir-structure
Browse files Browse the repository at this point in the history
Implement better directory structure for pug
  • Loading branch information
jr-cologne committed May 10, 2019
2 parents 6336ec2 + f030702 commit ecdd14c
Show file tree
Hide file tree
Showing 10 changed files with 40 additions and 31 deletions.
6 changes: 3 additions & 3 deletions gulpfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
* @author JR Cologne <kontakt@jr-cologne.de>
* @copyright 2019 JR Cologne
* @license https://github.com/jr-cologne/gulp-starter-kit/blob/master/LICENSE MIT
* @version v0.7.0-alpha
* @version v0.8.0-alpha
* @link https://github.com/jr-cologne/gulp-starter-kit GitHub Repository
* @link https://www.npmjs.com/package/@jr-cologne/create-gulp-starter-kit npm package site
*
Expand Down Expand Up @@ -50,7 +50,7 @@ gulp.task('html', () => {
});

gulp.task('pug', () => {
return gulp.src([ src_folder + '**/*.pug' ], { base: src_folder })
return gulp.src([ src_folder + 'pug/**/!(_)*.pug' ], { base: src_folder + 'pug' })
.pipe(plumber())
.pipe(pug())
.pipe(gulp.dest(dist_folder))
Expand Down Expand Up @@ -139,7 +139,7 @@ gulp.task('watch', () => {

const watch = [
src_folder + '**/*.html',
src_folder + '**/*.pug',
src_folder + 'pug/**/*.pug',
src_assets_folder + 'sass/**/*.sass',
src_assets_folder + 'scss/**/*.scss',
src_assets_folder + 'js/**/*.js'
Expand Down
14 changes: 7 additions & 7 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@jr-cologne/create-gulp-starter-kit",
"version": "0.7.0-alpha",
"version": "0.8.0-alpha",
"description": "A simple Gulp 4 Starter Kit for modern web development.",
"keywords": [
"gulp",
Expand Down Expand Up @@ -39,7 +39,7 @@
"@babel/preset-env": "^7.4.4",
"browser-sync": "^2.26.5",
"del": "^4.1.1",
"gulp": "^4.0.1",
"gulp": "^4.0.2",
"gulp-autoprefixer": "^6.1.0",
"gulp-babel": "^8.0.0",
"gulp-concat": "^2.6.1",
Expand Down
19 changes: 0 additions & 19 deletions src/index-pug.pug

This file was deleted.

1 change: 1 addition & 0 deletions src/pug/_includes.pug
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
include helpers/_mixins
Empty file added src/pug/helpers/_mixins.pug
Empty file.
9 changes: 9 additions & 0 deletions src/pug/index.pug
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
extends templates/_default

block content
h1.title Gulp Starter Kit

p.description
strong A simple Gulp 4 Starter Kit for modern web development.

img.image(src="/assets/images/sample.jpg" alt="")
8 changes: 8 additions & 0 deletions src/pug/templates/_default.pug
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
include ../_includes

include partials/_head

body
block content

include partials/_foot
2 changes: 2 additions & 0 deletions src/pug/templates/partials/_foot.pug
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
link(rel="stylesheet" href="https://fonts.googleapis.com/css?family=Roboto:100,300")
script(async src="/assets/js/all.js")
8 changes: 8 additions & 0 deletions src/pug/templates/partials/_head.pug
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
doctype html
html(lang="en")
head
meta(charset="UTF-8")
meta(name="viewport" content="width=device-width, initial-scale=1.0")
meta(http-equiv="X-UA-Compatible" content="ie=edge")
title Gulp Starter Kit
link(rel="stylesheet" href="/assets/css/pages/index.css")

0 comments on commit ecdd14c

Please sign in to comment.