Gulp Webpack Starter - really simple and cool toolkit for building static HTML templates using Gulp task runner and Webpack bundler. This is professional Front End workflow, which help you to increase your development speed & quality. Also you can use our starter with Wordpress or any other similar environment.
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 |
Make sure you have installed:
Recommended to use > node 8.9.1 (last TLS version)
git clone https://github.com/wwwebman/gulp-webpack-starter <my-project-name>
cd <my-project-name>
yarn
yarn start
Easy, right?
install Wordpress on you localhost (MAMP, LAMP)
Go to exists theme folder or create your custom theme 'customTheme'.
cd project/wp-content/themes/customTheme/
git clone https://github.com/wwwebman/gulp-webpack-starter frontEnd
cd frontEnd
Below an example of properties you need to be changed in tasks/config.json*.
- Change the global assets output:
"dist": "../"
- Stop run html task because we don't need it in Wordpress case:
"html": {
"run": false
},
- Now browserSync should use proxy instead of create static server:
target
should reffer to your wordpress aplicationpublicPath
should refer to the folder which you putted bundle.js file. The Reason - issue GWS - 3
"proxy": {
"target": "localhost/project",
"publicPath" : "http://localhost:3333/project/wp-content/themes/assets/js",
}
yarn
yarn start
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
Contributions, questions and comments, pull requests are all welcome.
Let's create something cool together ✋
Author - webman.pro