Giter Club home page Giter Club logo

gulp-webpack-starter's Introduction

Gulp Webpack Starter πŸ™

contributions welcome GitHub contributors license Build Status Gitter

Gulp Webpack Starter - A simple web-development toolkit using Gulp task runner and Webpack bundler. Ideal for building static HTML templates, speeding up Wordpress theme development, or any similar template-driven and front-end project.

Gulp Webpack Starter

List of Content

  1. Features
  2. Getting Started?
  3. Configuration
  4. Changelog
  5. Contributing

🎁 Features

Features Description
CSS SASS, SMACSS, Autoprefixer, clean-css
JS Webpack, Babel
Testing Jest
Live Reload BrowserSync, Webpack Dev Middleware, Webpack Hot Middleware
HTML gulp-file-include
Images gulp-imagemin
SVG sprite gulp-svg-sprite
Deployment vinyl-ftp

Getting started?

πŸ“• Recommendations

Make sure you have the following installed:

Recommended to use node 8.9. (last LTS version)*

🎯 Static templating

Step 1 - clone

git clone https://github.com/wwwebman/gulp-webpack-starter <my-project-name>
cd <my-project-name>

Step 2 - run

yarn
yarn start

Easy, right?

πŸ‘€ Wordpress

Step 1 - install Wordpress

Install Wordpress on you localhost (MAMP, LAMP)

Step 2 - create theme

cd into your theme directory. E.g.:

  cd project/wp-content/themes/customTheme/

Step 3 - clone starter

git clone https://github.com/wwwebman/gulp-webpack-starter frontEnd
cd frontEnd

Step 4 - change config

Certain defaults will need to be changed in tasks/config.json* for WP development.

  1. Change the global assets output, since we want to export assets to the theme root directory:
"dist": "../" 
  1. Disable the html run task, since we don’t need to compile HTML in this project:
"html": {
  "run": false
},
  1. Now, browserSync should use proxy instead of creating a static server:
  • target should refer to the location (pwd) of your local WordPress installation
  • publicPath should refer to the folder to which you’re outputting the bundle.js file. The Reason - issue GWS - 3
 "proxy": {
    "target": "localhost/project",
    "publicPath" : "http://localhost:3333/project/wp-content/themes/customTheme/dist/assets/js",
  }

Step 5 - run

yarn
yarn start

Commands

yarn <script> //alternative: npm run <script>
yarn start //Run development mode
yarn build //Compiles your App for production
yarn deploy //Push production version on remote server using FTP

gulp-webpack-starter's People

Contributors

ericconstantinides avatar scallemang avatar wwwebman avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.