A simple and basic starter suited for all (non js framework based) project, with Gulp + Webpack.
It basically handle SCSS, JS, Fonts and images compression (and keep a static folder).
Update this Readme file to suit your project.
The project root where the index.html file belong to is set to /public
, you can change the configuratin in the /gulp_tasks/_helpers.js
file.
After a git pull, you probably need to run npm install
in case new dependencies are required.
Note: During a Git commit, there is scripts who are running automatically like Prettier, Stylelint and ESLint to fix the code style and formatting.
Please, have an up-to-date version of:
- Clone the repository:
git clone [email protected]:yoanmalie/yeho-starter.git
- Launch the installation of dependencies:
npm install
-
If you use a vhost, copy the
.example.vhost.js
file and name it.vhost.js
and type your vhost URL inside. -
Create necessary assets files for the project:
gulp build
Or, the same thing but with a Watch and a Sync which will rerun the tasks again and refresh the browser when there is updated files:
gulp serve
To know the available NPM and Gulp commands, run:
npm run # package.json scripts
gulp --tasks # Gulp tasks with details
gulp --tasks-simple # Gulp task simplified
By default everything is built for a --development
environment so assets files are not minified and use the sourcemap, etc.
If you want to build for a production environment, use the --production
flag when you run a Gulp command.
Browsersync open Google Chrome by default, you can use Firefox instead by using the --firefox
flag when you run the gulp sync
task or the gulp serve
one.
Sometime, problems with Node.js can be simply be solved by cleaning the cache with npm cache clean
.
Cannot get/
appear? There is a problem with the vhost. Check if you didn't make a typo in the .vhost.js
file and if this vhost URL work well too on your machine.
If you meet the error Error: listen EADDRINUSE
, stop the Gulp process in your operating system.
Please note to care about if you stop the current running command, do it with CTRL + C.