Skip to content

Commit 32289b4

Browse files
committed
re-organize build-process
* rename main.js to functions.js * rename main.scss to bundler.scss * remove vendor-dependencies from `functions-wppsetup.php` and `bundler.scss` * add all vendor-dependencies to the gulpfile to have them organized in one place * remove bower, use npm for frontend-modules/vendors
1 parent 2117f2c commit 32289b4

File tree

9 files changed

+66
-56
lines changed

9 files changed

+66
-56
lines changed

CHANGELOG.md

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,13 @@
11
# CHANGELOG
22

3-
## HEAD | 1.1.4 | 02.02.2018
3+
## HEAD | 1.1.5 | 06.02.2018
4+
* re-organize build-process
5+
* rename main.js to functions.js
6+
* rename main.scss to bundler.scss
7+
* remove vendor-dependencies from `functions-wppsetup.php` and `bundler.scss`
8+
* add all vendor-dependencies to the gulpfile to have them organized in one place
9+
* remove bower, use npm for frontend-modules/vendors
410
* fix minor bugs and cleanup code
5-
* remove bower, use npm for frontend-modules/vendors
611
* rearrange defaults in vars.scss
712
* remove editor-hiding in elements-template (we can hide it within ACF now)
813

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<img src="/assets/images/wpseed.png" width="518"/>
22

3-
**Version 1.1.4** (02.02.2018)
3+
**Version 1.1.5** (02.02.2018)
44

55
## What is WPSeed?
66
WPSeed is a WordPress starter theme following the intention of being able to skip the time-consuming first steps when creating a new theme.

assets/scripts/essentials.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
/**
1+
/*!
22
* Essential javascript functions/variables
33
*
44
* @author Flurin Dürst
5-
* @version 1.0
5+
* @version 1.0.1
66
* @since WPSeed 0.11.0
77
*
88
*/
Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
1-
/**
2-
* All sorts javascript/jQuery functions go here
1+
/*!
2+
* All sorts javascript/jQuery functions
33
*
44
* @author Flurin Dürst
5-
* @version 3.3.0
5+
* @version 3.4.0
66
* @since WPSeed 0.12
7+
* was main.js until 3.4.0
78
*
89
*/
910

assets/styles/bundle.scss

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
/*!
2+
* Main CSS File
3+
* Merges all .scss files (in the desired order) before they're processed by gulp
4+
*
5+
* @author Flurin Dürst
6+
* @version 1.6.0
7+
* @since WPSeed 0.1
8+
* was main.scss until 1.6.0
9+
*
10+
*/
11+
12+
13+
@charset 'UTF-8';
14+
15+
/* VARS/FUNCTIONS
16+
/===================================================== */
17+
@import 'vars';
18+
@import 'essentials';
19+
20+
/* SITE STYLES
21+
/===================================================== */
22+
@import 'general';
23+
@import 'content';
24+
@import 'nav';

assets/styles/main.scss

Lines changed: 0 additions & 30 deletions
This file was deleted.

functions/functions-wpsetup.php

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
* menus, theme-support settings, general settings and a wp_head cleaner
55
*
66
* @author Flurin Dürst
7-
* @version 1.7.1
7+
* @version 1.8.0
88
* @since WPSeed 0.1.6
99
*
1010
*/
@@ -18,18 +18,14 @@
1818
// enqueue sctipts
1919
// » https://developer.wordpress.org/reference/functions/wp_enqueue_script/
2020
function wpseed_enqueue_scripts_and_styles() {
21-
# jquery.js (from wp core)
21+
# jQuery (from wp core)
2222
wp_deregister_script( 'jquery' );
23-
// wp_register_script( 'jquery', includes_url( '/js/jquery/jquery.js' ), false, NULL, true );
2423
wp_register_script('jquery', 'https://ajax.googleapis.com/ajax/libs/jquery/2.1.4/jquery.min.js', false, '2.1.4');
2524
wp_enqueue_script( 'jquery' );
26-
# main.js
25+
# scripts
2726
wp_register_script('wpseed/scripts', get_template_directory_uri() . '/dist/script.min.js', false, array( 'jquery' ), true);
2827
wp_enqueue_script('wpseed/scripts');
29-
# wow.js
30-
wp_register_script('wowjs', get_template_directory_uri() . '/node_modules/wowjs/dist/wow.min.js', false, array( 'wowjs' ), true);
31-
wp_enqueue_script('wowjs');
32-
# main.css
28+
# styles
3329
wp_enqueue_style('wpseed/styles', get_template_directory_uri() . '/dist/style.min.css', false, null);
3430
# fonts
3531
wp_enqueue_style('google/fonts', 'https://fonts.googleapis.com/css?family=Ubuntu:400,500,700', false, null);

gulpfile.js

Lines changed: 23 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,21 @@
11
/*
22
* GULP CONFIG
33
*
4-
* Desciption: Clean gulpfile for web development workflow with browsersync, compiling/optimization of sass, javascript and images from assets to dist
5-
* Usage: gulp (to run the whole process), gulp watch (to watch for changes and compile if anything was modified)
4+
* Desciption: Clean gulpfile for web development workflow using
5+
* - browsersync
6+
* - compiling/optimization of sass, javascript and images from assets to dist and vendors (usally from npm_modules to dist)
7+
* Usage: gulp (to run the whole process), gulp watch (to watch for changes and compile if anything is being modified)
68
*
79
* Author: Flurin Dürst (https://flurinduerst.ch)
810
*
9-
* Version: 1.3.1
11+
* Version: 1.4.0
1012
*
1113
*/
1214

1315

1416
/* SETTINGS
1517
/===================================================== */
16-
var browsersync_proxy = "wpseed.dev";
18+
var browsersync_proxy = "wpseed.vm";
1719

1820

1921
/* DEPENDENCIES
@@ -60,12 +62,19 @@ gulp.task('browsersync', function() {
6062

6163
/* CSS
6264
/------------------------*/
63-
// from: assets/styles/main.css
65+
// from: assets/styles/main.css (+ optional vendors)
6466
// actions: compile, minify, prefix, rename
6567
// to: dist/style.min.css
6668
gulp.task('css', function() {
67-
gulp.src('assets/styles/main.scss')
69+
gulp.src([
70+
//main
71+
'assets/styles/bundle.scss',
72+
// vendors
73+
'node_modules/hamburgers/dist/hamburgers.min.css', // https://jonsuh.com/hamburgers/
74+
'node_modules/animate.css/animate.min.css' // https://daneden.github.io/animate.css/
75+
])
6876
.pipe(plumber({errorHandler: notify.onError("<%= error.message %>")}))
77+
.pipe(concat('style.min.css'))
6978
.pipe(sass())
7079
.pipe(autoprefixer('last 2 version', { cascade: false }))
7180
.pipe(cleanCSS())
@@ -76,11 +85,16 @@ gulp.task('css', function() {
7685

7786
/* JAVASCRIPT
7887
/------------------------*/
79-
// from: assets/scripts/
88+
// from: assets/scripts/ (+ optional vendors)
8089
// actions: concatinate, minify, rename
81-
// to: dist/script.min.js
90+
// to: dist/script.min.css
8291
gulp.task('javascript', function() {
83-
gulp.src('assets/scripts/*.js')
92+
gulp.src([
93+
// main
94+
'assets/scripts/*.js',
95+
// vendors
96+
'node_modules/wowjs/dist/wow.min.js' // https://github.com/matthieua/WOW
97+
])
8498
.pipe(plumber({errorHandler: notify.onError("<%= error.message %>")}))
8599
.pipe(concat('script.min.js'))
86100
.pipe(uglify())

style.css

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
Theme Name: WPSeed
33
Author: Flurin Dürst
44
Description: WordPress Starter Theme
5-
Version: 1.1.4
5+
Version: 1.1.5
66
License: MIT Public License
77
License URI: https://github.com/flurinduerst/WPSeed/blob/master/LICENSE
88
Tags: This theme is licensed under the MIT Public License.

0 commit comments

Comments
 (0)