All Projects → srikat → genesis-sample-task-runner

srikat / genesis-sample-task-runner

Licence: other
Gulp workflow for Auto prefixing, Sass compiling, CSS minification, automatic browser reloading and more

Programming Languages

CSS
56736 projects
javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to genesis-sample-task-runner

gulp-starter-kit
My Gulp Starter Kit
Stars: ✭ 91 (+295.65%)
Mutual labels:  gulp, browsersync, autoprefixer
frontie
Frontie is a front-end boilerplate. Gulp | Twig.js | Sass | Autoprefixer | Browsersync | Bootstrap 4 Grid System & Responsive Breakpoints
Stars: ✭ 28 (+21.74%)
Mutual labels:  gulp, browsersync, autoprefixer
Fastshell
Fiercely quick front-end boilerplate and workflows, HTML5, Gulp, Sass
Stars: ✭ 563 (+2347.83%)
Mutual labels:  gulp, workflow, browsersync
bootstrap-4-boilerplate
Basic Bootstrap 4 Starter Template
Stars: ✭ 50 (+117.39%)
Mutual labels:  gulp, browsersync, autoprefixer
Long Haul
A minimal, type-focused Jekyll theme.
Stars: ✭ 524 (+2178.26%)
Mutual labels:  gulp, browsersync, autoprefixer
Frontie Webpack
Front-end Boilerplate | Gulp 4 + Webpack 4 + Babel + ITCSS Architecture + BEM Methodology + Twig.js
Stars: ✭ 102 (+343.48%)
Mutual labels:  gulp, workflow, browsersync
Gopablo
🐺 Static site generator.
Stars: ✭ 166 (+621.74%)
Mutual labels:  gulp, workflow, browsersync
gw-starter-kit
PEPELAC - Современный инструментарий для вёрстки и создания статичных сайтов с использованием Webpack
Stars: ✭ 30 (+30.43%)
Mutual labels:  gulp, browsersync
sage-starter
The best starter theme with a modern front-end development workflow. Based on Sage, HTML5 Boilerplate, gulp, Bower, and Bootstrap.
Stars: ✭ 42 (+82.61%)
Mutual labels:  gulp, browsersync
gulp-sass-bootstrap-boilerplate
⏰📌 Boilerplate with gulp.js, Sass, Babel, and Browsersync.
Stars: ✭ 24 (+4.35%)
Mutual labels:  gulp, browsersync
genesis-js-no-js
WordPress plugin for Genesis child themes. Adds a 'no-js' body class to the front-end, and a small inline script that changes it to `js` if JavaScript is enabled. Allows for styling of elements (like potential hiding) if JavaScript is enabled.
Stars: ✭ 21 (-8.7%)
Mutual labels:  genesis-framework, genesis
stylus-playground
Stylus environment for practice and testing.
Stars: ✭ 16 (-30.43%)
Mutual labels:  browsersync, autoprefixer
Angular-Gulp-Boilerplate
Clean but full-featured AngularJS boilerplate using Gulp workflow and best practices
Stars: ✭ 30 (+30.43%)
Mutual labels:  browsersync, autoprefixer
Frontend-StarterKit
Frontend StarterKit - [Gulp 4, Pug, SCSS, ES6+]
Stars: ✭ 13 (-43.48%)
Mutual labels:  gulp, browsersync
html-sass-jumpstart
Minimal Sass/HTML Template Site - dart sass powered, includes stylelint and prettier, and autoprefix upon build. develop script includes hot-reload via browsersync.
Stars: ✭ 82 (+256.52%)
Mutual labels:  browsersync, autoprefixer
selene
A opinionated Wordpress base theme based on Sage.
Stars: ✭ 31 (+34.78%)
Mutual labels:  gulp, browsersync
middleman-gulp
A Middleman 4 template using Gulp.js via the external pipeline
Stars: ✭ 42 (+82.61%)
Mutual labels:  gulp, browsersync
bootstrap-gulp-starter-template
Bootstrap 4 + Gulp 4 + Panini for improve front-end development workflow
Stars: ✭ 67 (+191.3%)
Mutual labels:  gulp, workflow
frontend-template
Simple responsive template
Stars: ✭ 27 (+17.39%)
Mutual labels:  gulp, autoprefixer
bootstrap-5-sass-gulp-4-boilerplate
A Bootstrap 5.0.0 boilerplate with bootstrap-icons, sass and gulp 4
Stars: ✭ 26 (+13.04%)
Mutual labels:  gulp, browsersync

Genesis Sample Task Runner

This is a Gulp workflow for automating the following tasks:

  • Auto prefixing
  • Compiling Sass partials into style.css
  • Minifying unminified .js files and style.css
  • Automatic CSS injection and browser reloading for PHP & JS changes using BrowserSync
  • CSS optimization
  • Packing same CSS media query rules into one
  • Generating pixel fallbacks for rem units
  • Generating source maps so browser inspector (like Chrome DevTools) shows the partial .scss file(s) from where CSS rules are originating from

for Genesis Sample, a child theme of the Genesis framework.

How to use

  1. Install WordPress on your localhost if you haven't already. I use Laravel Valet.

  2. Install Node.

  3. Install Gulp CLI globally by running npm install gulp-cli -g in the terminal.

  4. Download this repo's content and place in your local site's project folder (Ex.: Genesis Sample theme directory).

  5. Run npm install.

  6. Change the values of siteName and userName in gulpfile.js.

If your local site does not have a SSL, you can comment out the userName line and comment out/delete

https: {
    key: `/Users/${userName}/.valet/Certificates/${siteName}.key`,
    cert: `/Users/${userName}/.valet/Certificates/${siteName}.crt`
}

If it does, adjust the path to your local SSL certificate's key and crt files.

  1. Run gulp.

  2. You might want to load the minified versions of genesis-sample.js and style.css on the production site before going live.

For this, edit functions.php and

a) replace

wp_enqueue_script(
    'genesis-sample',
    get_stylesheet_directory_uri() . '/js/genesis-sample.js',
    array( 'jquery' ),
    CHILD_THEME_VERSION,
    true
);

with

wp_enqueue_script(
    'genesis-sample',
    get_stylesheet_directory_uri() . "/js/genesis-sample{$suffix}.js",
    array( 'jquery' ),
    CHILD_THEME_VERSION,
    true
);

b) at the end, add

add_filter( 'stylesheet_uri', 'genesis_sample_stylesheet_uri', 10, 2 );
/**
 * Loads minified version of style.css.
 *
 * @param string $stylesheet_uri     Original stylesheet URI.
 * @param string $stylesheet_dir_uri Stylesheet directory.
 * @return string (Maybe modified) stylesheet URI.
 */
function genesis_sample_stylesheet_uri( $stylesheet_uri, $stylesheet_dir_uri ) {

	return trailingslashit( $stylesheet_dir_uri ) . 'style.min.css';

}

Note: You will not be able to use the source maps when style.min.css is loading. Therefore add the above code after you are done with your development.

Credit

Thanks to Christoph Herr for his Prometheus theme.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].