Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/stephenpearce/gulp-starter-pack
A gulp.js starter pack for static projects
https://github.com/stephenpearce/gulp-starter-pack
css gulp html javascript live-reload static-website
Last synced: about 1 month ago
JSON representation
A gulp.js starter pack for static projects
- Host: GitHub
- URL: https://github.com/stephenpearce/gulp-starter-pack
- Owner: stephenpearce
- License: mit
- Created: 2024-06-23T21:38:04.000Z (6 months ago)
- Default Branch: master
- Last Pushed: 2024-06-23T22:17:20.000Z (6 months ago)
- Last Synced: 2024-10-12T20:23:01.990Z (3 months ago)
- Topics: css, gulp, html, javascript, live-reload, static-website
- Language: JavaScript
- Homepage:
- Size: 94.7 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.txt
Awesome Lists containing this project
README
# Gulp Starter Pack
An optionated gulp environment for serving simple static projects.
## Prerequisites
- [Node.js](https://nodejs.org/)
- [npm](https://www.npmjs.com/)Consider getting these using nvm-windows on Windows, homebrew on macOS and linuxbrew on Linux.
## Setup Instructions
1. Clone this repository:
```bash
git clone https://github.com/stephenpearce/gulp-starter-pack.git
cd gulp-starter-pack
```2. Install dependencies:
```bash
npm install
```## Available Commands / Tasks
Run the following command to start a development server with live reloading:
```bash
gulp
```This default task cleans the `dist/` folder, builds the project, starts a local server, and watches for changes in source files.
To build the project without starting a development server, run:
```bash
gulp build
```This task cleans the `dist/` folder and builds the project for production deployment.
```bash
gulp clean
```
This cleans the `dist/` directory to prepare for a fresh build.```bash
gulp html
```This minifies the HTML, replaces references to CSS and JavaScript files with their minified versions, and copies them to `dist/`.
```bash
gulp css
```This minifies the CSS files, adds a .min suffix to the filename, generates source maps and copies them to `dist/css/`.
```bash
gulp js
```This minifies the JavaScript files, adds a .min suffix to the filename, generates source maps and copies them to `dist/js/`.
```bash
gulp images
```This crunches images using imagemin and copies them to the `dist/img/` directory.
```bash
gulp watch
```This watches for changes in HTML, CSS, JavaScript, and image files, triggers corresponding tasks and reloads the browser.
## Configuration
* Source Files: Place your HTML, CSS, JavaScript and image files in their respective directories under `src/`. Simple "hello world" examples are given as placeholders.
* Distribution: Optimized files are output to `dist/`.