Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/vitaliylf/gulp-starter

Gulp V5 Starter for a quick development start. Automated build simplifies development, letting focus on quality code.
https://github.com/vitaliylf/gulp-starter

browsersync gulp gulp-plugin gulp-sass gulp-starter gulp-starter-kit gulp5 scss seo seo-optimization starter svg-sprites webpack

Last synced: about 1 month ago
JSON representation

Gulp V5 Starter for a quick development start. Automated build simplifies development, letting focus on quality code.

Awesome Lists containing this project

README

        


Gulp Logo


## πŸ“¦ Getting started Stars Badge

To work with this build, clone the entire contents of the repository using:

`git clone `

After cloning, navigate to the main project folder and run the following command to install all necessary dependencies specified in the package.json file:

```shell
npm i
```

Once the dependencies are installed, you can use any of the available build commands. The resulting files will be placed in the `app` folder in the root directory:

```shell
gulp
```

The base command that starts the build process for development.

```shell
gulp build
```

Builds the project, optimizing and compressing all files for hosting.

```shell
gulp cache
```

Run this command after gulp build if you need to upload new files to the hosting without using caching.

```shell
gulp backend
```

Builds the backend part of the project. This build contains only the necessary elements and is not compressed, making it convenient for backend development.

```shell
gulp zip
```

Packs your finished code into a zip archive.

```shell
npm run deploy
```

Creates a temporary clone of the current repository, generates a gh-pages branch if it doesn't already exist, copies all files from the base path (or those matching patterns from the optional src configuration), commits all changes, and pushes to the origin remote.

`By following these steps, you'll be set up to work with the project efficiently.`

## πŸ“ Folder and file structure

```
β”œβ”€β”€ πŸ“.vscode/
β”œβ”€β”€πŸ“ƒextensions.json # Recommended extensions
β”œβ”€β”€ πŸ“gulp/ # All Gulp build settings, divided into separate files
β”œβ”€β”€ πŸ“src/ # Sources
β”‚ β”œβ”€β”€πŸ“js/ # Scripts
β”‚ β”‚ β””β”€β”€πŸ“ components/ # js components
β”‚ β”‚ β”œβ”€β”€πŸ“ functions.js/ # File with ready-to-use js functions
β”‚ β”‚ β”œβ”€β”€πŸ“ƒ _components.js # component connection file
β”‚ β”‚ β””β”€β”€πŸ“ƒ main.js # Main script
β”‚ β”œβ”€β”€ πŸ“styles/ # Main styles folder
β”‚ β”‚ β””β”€β”€πŸ“components/ # scss components
β”‚ β”‚ β”œβ”€β”€πŸ“mixins/ # folder for saving finished mixins components
β”‚ β”‚ β”œβ”€β”€πŸ“vendor/ # folder for storing local css styles of libraries
β”‚ β”‚ β”œβ”€β”€πŸ“ƒ _base-variables.scss # File with global variables
β”‚ β”‚ β”œβ”€β”€πŸ“ƒ _colors-variables.scss # File with color variables
β”‚ β”‚ β”œβ”€β”€πŸ“ƒ _fonts.scss # File for connecting fonts (you can use myxin)
β”‚ β”‚ β”œβ”€β”€πŸ“ƒ _mixins.scss # File for connecting mixins from the mixins folder
β”‚ β”‚ β”œβ”€β”€πŸ“ƒ _offset-system-variables.scss # File with offset system variables
β”‚ β”‚ β”œβ”€β”€πŸ“ƒ _reset.scss # File with global tag reset
β”‚ β”‚ β”œβ”€β”€πŸ“ƒ _settings.scss # File for writing global styles
β”‚ β”‚ β”œβ”€β”€πŸ“ƒ _unitary-classes.scss # File with unitary classes that are reused throughout the project
β”‚ β”‚ β”œβ”€β”€πŸ“ƒ main.scss # Main style file
β”‚ β”‚ β””β”€β”€πŸ“ƒ vendor.scss # File for connecting library styles from the vendor folder
β”‚ β”œβ”€β”€πŸ“ components/ # folder for storing html partials of the page
β”‚ β”‚ β””β”€β”€πŸ“ƒcomponents-name.html # particle html component
β”‚ β”œβ”€β”€ πŸ“pages/ # folder for storing html pages of the project
β”‚ β”‚ β””β”€β”€πŸ“ƒpage-name.html # html pages
β”‚ β”œβ”€β”€ πŸ“img/ # folder for storing img
β”‚ β”‚ β””β”€β”€πŸ“svg/ # special folder for converting svg to sprite
β”‚ β”œβ”€β”€ πŸ“assets/ # folder for storing other assets - php, video files, favicon, etc.
β”‚ β”‚ β””β”€β”€πŸ“ fonts/ # folder for storing fonts in woff2 format
β”‚ β”‚ β”œβ”€β”€πŸ“ƒ fonts.woff2 # fonts only woff2
β”‚ β”‚ β”œβ”€β”€πŸ“ƒ favicon.ico # favicon
└── πŸ“ƒ gulpfile.js # Gulp configuration file
└── πŸ“ƒ package.json # file with build settings and installed packages
└── πŸ“ƒ .editorconfig # file with code formatting settings
└── πŸ“ƒ .ecrc # editorconfig-checker package settings file (excludes unnecessary folders)
└── πŸ“ƒ .prettierrc # Prettier settings file
└── πŸ“ƒ README.md # README build
```

## πŸ”– Working with HTML

Using **gulp-file-include**, you can divide an HTML file into various templates, which should be stored in the **components** folder.

---

> [!NOTE]
> **To insert HTML parts into the main file, use `@include('../components/filename.html')`**

---

When you run the `gulp build` command, all HTML files will be minified into a single line of code.

## πŸ’Ž Working with CSS

The **SASS** preprocessor using **SCSS** syntax is employed during the build process.

Styles written within **components** should be included in the **main.scss** file.

To incorporate third-party CSS files (libraries), place them in the **vendor** folder and reference them in the **\_vendor.scss** file.

In the final folder **app/css**, two files are generated:

- **main.css** - for page styles,
- **vendor.css** - for the styles of all libraries used in the project.

## πŸ“ Working with JavaScript

Webpack is used to build the JS code.

JavaScript code is better organized when divided into components β€” small JS files that contain their own isolated implementations. Place these files in the **components** folder, and then import them into the **\_components.js** file.

The **main.js** file is the primary file where all the others are included.

## βœ’οΈ Working with fonts

The build supports only the **woff2** format.

Place the **woff2** files in the **assets/fonts** folder, and then call the @font-face mixin in the **\_fonts.scss** file.

Also, don't forget to include the same fonts in `` in the HTML.

## 🎨 Working with images

Place any images other than the **favicon** in the **img** folder.

If you need to create an SVG sprite, put the SVG files needed for the sprite in the **img/svg** folder. Attributes like fill, stroke, and style will be automatically removed. For other SVG files, just leave them in the **img** folder.

If you use the `gulp build` command, you will get minified images in the final **img* folder.

## πŸ“œ Working with other assets

Any project assets that do not have a corresponding folder should be stored in the **resources** folder. These can include video files, favicon, and others.

## ⌨️ Typographer

A typographer plugin has been connected to ensure the correct display of text on the page. This plugin will **automatically** add non-breaking spaces and other characters, ensuring the text is displayed according to all language rules.

## βœ… Seo optimization

The main **index.html** file contains a brief excerpt and descriptions of each meta tag.

## ⭐ Thank you

Thank you for using this build. If you find it helpful, please give it a **star** on GitHub and follow the repository for updates. Your support is greatly appreciated!