Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement better directory structure for pug #20

Merged
merged 3 commits into from
May 10, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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")