Skip to content

Commit

Permalink
gulp css's task enhancement
Browse files Browse the repository at this point in the history
  • Loading branch information
erikyo committed May 20, 2019
1 parent 0ec7ef2 commit 8f9c04d
Show file tree
Hide file tree
Showing 9 changed files with 11 additions and 61 deletions.
16 changes: 0 additions & 16 deletions assets/dist/css/atf.css

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

16 changes: 0 additions & 16 deletions assets/dist/css/editor.css
Original file line number Diff line number Diff line change
@@ -1,17 +1 @@
@charset "UTF-8";
/*!
Theme Name: Modul R
Description: default theme description
Theme URI: https://nas.codekraft.it/modular/
Author: Codekraft Studio - info@codekraft.it
Author URI: https://codekraft.it
Requires at least: WordPress 4.9.6
Version: 1.0.1
License: GNU General Public License v3 or later
License: © 2019 Codekraft Studio - info@codekraft.it
License URI: https://github.com/erikyo/modular-wordpress-theme/blob/master/LICENSE
Text Domain: modul-r
Tags: portfolio, one-column, custom-background, custom-header, custom-menu, editor-style, featured-images, full-width-template, block-styles, wide-blocks
*/

.wp-block{max-width:1000px}
17 changes: 0 additions & 17 deletions assets/dist/css/style.css

This file was deleted.

12 changes: 7 additions & 5 deletions gulpfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -205,29 +205,31 @@ function buildMainCSS() {
// compile all other styles that's name is not style.scss or atf
function CSS() {
return gulp
.src(opts.devPath + 'scss/!(atf.scss|style.scss)*.scss')
.src([
opts.devPath + 'scss/editor.scss'
])
.pipe(sourcemaps.init())
.pipe(sass(opts.sass.dev))
.on('error', notify.onError('Error: <%= error.message %>,title: "SASS Error"'))
.pipe(postcss([
autoprefixer(opts.autoprefixer.dev)
]))
.pipe(header(opts.banner, pkg))
.pipe(gulp.dest(opts.distPath + 'css/'))
.pipe(sourcemaps.write('.', { sourceRoot: '/' }))
.pipe(gulp.dest(opts.distPath + 'css/'));
}

function buildCSS() {
return gulp
.src(opts.devPath + 'scss/!(atf.scss|style.scss)*.scss')
.src([
opts.devPath + 'scss/editor.scss'
])
.pipe(sass(opts.sass.build))
.on('error', notify.onError('Error: <%= error.message %>,title: "SASS Error"'))
.pipe(postcss([
autoprefixer(opts.autoprefixer.build),
cssnano(opts.cssnano)
]))
.pipe(header(opts.banner, pkg))
.pipe(gulp.dest(opts.distPath + 'css/'));
}

Expand Down Expand Up @@ -263,4 +265,4 @@ exports.buildMainCSS = buildMainCSS;
exports.imageMinify = imageMinify;
exports.BuildAll = BuildAll;
exports.watch = watch;
exports.default = watch;
exports.default = BuildAll;
2 changes: 1 addition & 1 deletion header.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<meta name="viewport" content="width=device-width, initial-scale=1" />
<meta name="theme-color" content="#118886">
<style><?php // include the above the fold style and, remind, include is different than enqueue and the code will be added directly to the page
include (TEMPLATEPATH . '/atf.css' );
include (TEMPLATEPATH . '/assets/dist/css/atf.css' );
?></style>
<?php wp_head(); ?>
</head>
Expand Down
2 changes: 1 addition & 1 deletion inc/template-functions.php
Original file line number Diff line number Diff line change
Expand Up @@ -220,7 +220,7 @@ function modu_cookie_banner() {

if ( ! function_exists('modu_header_textcolor') ) :
function modu_header_textcolor() {
if (get_header_textcolor() != HEADER_TEXTCOLOR ) {
if (get_header_textcolor()) {
echo ' style="color:#' . get_header_textcolor(). '"';
}
}
Expand Down
4 changes: 0 additions & 4 deletions inc/theme-setup.php
Original file line number Diff line number Diff line change
Expand Up @@ -80,10 +80,6 @@ function theme_setup() {
// Add support for responsive embedded content.
add_theme_support( 'responsive-embeds' );

// Add default color to the customizer
// TODO: Better color customizer integration
define( 'HEADER_TEXTCOLOR', '17bebb' );

}

add_action( 'after_setup_theme', 'theme_setup' );
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"homepage": "https://nas.codekraft.it/modular/",
"wp": {
"themeName": "Modul R",
"description": "default theme description",
"description": "Modul R is a powerful and flexible theme that provides a fast way to create an awesome website.",
"textDomain": "modul-r",
"tags": "portfolio, one-column, custom-background, custom-header, custom-menu, editor-style, featured-images, full-width-template, block-styles, wide-blocks",
"licenseURI": "https://github.com/erikyo/modular-wordpress-theme/blob/master/LICENSE"
Expand Down
1 change: 1 addition & 0 deletions readme.txt
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ follow this tutorial https://gulpjs.com/docs/en/getting-started/quick-start
= 1.0.1 =
* Gulp tasks fix
* Better wordpress customizer integration
* Vendors javascript path fix

= 1.0.0 =
* First release
Expand Down

0 comments on commit 8f9c04d

Please sign in to comment.