Webpack 4 config for starting a web-page design from scratch. It helps with rapid CSS styling and JS inclusion.
You should have PHP 5.4.0+
available on your cli. Check it out by running
php -v
# Clone project
git clone https://github.com/ossipov/webpack4php
# Install Webpack and all dependencies for the project
yarn install
yarn add bulma --dev
edit src/sass/app.sass
to include needed styles
@import 'node_modules/bulma/scss/bulma.scss';
yarn add jquery --dev
edit src/js/app.js
to include jQuery
import $ from 'jquery';
console.log('hello');
$(function() {
$('body').css('color', 'blue');
});
Put your logo to src/favicon/logo.png
for Webpack to create favicons based on your logo
watch.cmd
— If you run Windows
You can build project from browser by adding ?build=prod
or ?build=dev
to the url