{"id":13553610,"url":"https://github.com/cferdinandi/gulp-boilerplate","last_synced_at":"2025-10-03T01:30:40.371Z","repository":{"id":41148609,"uuid":"20753545","full_name":"cferdinandi/gulp-boilerplate","owner":"cferdinandi","description":"A boilerplate for building web projects with Gulp.js.","archived":true,"fork":false,"pushed_at":"2021-03-16T14:43:07.000Z","size":315,"stargazers_count":841,"open_issues_count":0,"forks_count":184,"subscribers_count":30,"default_branch":"master","last_synced_at":"2024-09-29T06:41:12.009Z","etag":null,"topics":["autoprefixer","boilerplate","build-tool","concatenate","css","gulp","gulp-boilerplate","gulp-starter","javascript","minify","sass","svgo"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/cferdinandi.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":".github/contributing.md","funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2014-06-12T03:36:53.000Z","updated_at":"2024-09-24T17:36:11.000Z","dependencies_parsed_at":"2022-08-25T18:10:22.050Z","dependency_job_id":null,"html_url":"https://github.com/cferdinandi/gulp-boilerplate","commit_stats":null,"previous_names":[],"tags_count":28,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cferdinandi%2Fgulp-boilerplate","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cferdinandi%2Fgulp-boilerplate/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cferdinandi%2Fgulp-boilerplate/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cferdinandi%2Fgulp-boilerplate/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/cferdinandi","download_url":"https://codeload.github.com/cferdinandi/gulp-boilerplate/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":235059234,"owners_count":18929279,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["autoprefixer","boilerplate","build-tool","concatenate","css","gulp","gulp-boilerplate","gulp-starter","javascript","minify","sass","svgo"],"created_at":"2024-08-01T12:02:29.420Z","updated_at":"2025-10-03T01:30:40.035Z","avatar_url":"https://github.com/cferdinandi.png","language":"JavaScript","funding_links":[],"categories":["JavaScript"],"sub_categories":[],"readme":"# Gulp Boilerplate [![Build Status](https://travis-ci.org/cferdinandi/gulp-boilerplate.svg)](https://travis-ci.org/cferdinandi/gulp-boilerplate)\n\nA boilerplate for building web projects with [Gulp](https://gulpjs.com/). Uses Gulp 4.x.\n\n_**IMPORTANT:** This project is no longer maintained, and is offered as-is. It is strongly recommended that you instead use my [Build Tool Boilerplate](https://github.com/cferdinandi/build-tool-boilerplate)._\n\n**Features**\n\n- Concatenate, minify, and lint JavaScript.\n- Compile, minify, autoprefix, and lint Sass.\n- Optimize SVGs.\n- Copy static files and folders into your `dist` directory.\n- Automatically add headers and project details to JS and CSS files.\n- Create polyfilled and non-polyfilled versions of JS files.\n- Watch for file changes, and automatically recompile build and reload webpages.\n\n**Gulp Boilerplate makes it easy to turn features on and off**, so you can reuse it for all of your projects without having to delete or modify tasks.\n\n\n\n## Getting Started\n\n### Dependencies\n\n*__Note:__ if you've previously installed Gulp globally, run `npm rm --global gulp` to remove it. [Details here.](https://medium.com/gulpjs/gulp-sips-command-line-interface-e53411d4467)*\n\nMake sure these are installed first.\n\n- [Node.js](http://nodejs.org)\n- [Gulp Command Line Utility](http://gulpjs.com) `npm install --global gulp-cli`\n\n### Quick Start\n\n1. In bash/terminal/command line, `cd` into your project directory.\n2. Run `npm install` to install required files and dependencies.\n3. When it's done installing, run one of the task runners to get going:\n\t- `gulp` manually compiles files.\n\t- `gulp watch` automatically compiles files and applies changes using [BrowserSync](https://browsersync.io/) when you make changes to your source files.\n\n**Try it out.** After installing, run `gulp` to compile some test files into the `dist` directory. Or, run `gulp watch` and make some changes to see them recompile automatically.\n\n\n\n## Documentation\n\nAdd your source files to the appropriate `src` subdirectories. Gulp will process and and compile them into `dist`.\n\n- JavaScript files in the `src/js` directory will be compiled to `dist/js`. Files in subdirectories under the `js` folder will be concatenated. For example, files in `js/detects` will compile into `detects.js`.\n- Files in the `src/sass` directory will be compiled to `dist/css`.\n- SVG files placed in the `src/svg` directory will be optimized with SVGO and compiled into `dist/svg`.\n- Files and folders placed in the `copy` directory will be copied as-is into the `dist` directory.\n\n### package.json\n\nThe `package.json` file holds all of the details about your project.\n\nSome information is automatically pulled in from it and added to a header that's injected into the top of your JavaScript and CSS files.\n\n```json\n{\n\t\"name\": \"project-name\",\n\t\"version\": \"0.0.1\",\n\t\"description\": \"A description for your project.\",\n\t\"main\": \"./dist/your-main-js-file.js\",\n\t\"author\": {\n\t\t\"name\": \"YOUR NAME\",\n\t\t\"url\": \"http://link-to-your-website.com\"\n\t},\n\t\"license\": \"MIT\",\n\t\"repository\": {\n\t\t\"type\": \"git\",\n\t\t\"url\": \"http://link-to-your-git-repo.com\"\n\t},\n\t\"devDependencies\": {}\n}\n```\n\n*__Note:__ `devDependencies` are the dependencies Gulp uses. Don't change these or you'll break things. If any of the other fields are removed, make sure to remove reference to them in the Header (under `var banner` in `gulpfile.js`) or `gulp watch` won't run.*\n\n### JavaScript\n\nPut your JavaScript files in the `src/js` directory.\n\nFiles placed directly in the `js` folder will compile directly to `dist/js` as both minified and unminified files. Files placed in subdirectories under `src/js` will also be concatenated into a single file. For example, files in `js/detects` will compile into `detects.js`.\n\n*__A note about polyfills:__ In subdirectories that contain files with the `.polyfill.js` suffix (for example, `_matches.polyfill.js`), two versions will be created: one with the polyfill files, and one without.*\n\n### Sass\n\nPut your [Sass](https://sass-lang.com/) files in the `src/sass` directory.\n\nGulp generates minified and unminified CSS files. It also includes [autoprefixer](https://github.com/postcss/autoprefixer), which adds vendor prefixes for you.\n\n### SVGs\n\nPlace SVG files in the `src/svg` directory.\n\nSVG files will be optimized with [SVGO](https://github.com/svg/svgo) and compiled into `dist/svg`.\n\n### Copy Files\n\nFiles and folders placed in the `src/copy` directory will be copied as-is into `dist`.\n\nThis is a great place to put HTML files, images, and pre-compiled assets.\n\n\n\n## Options \u0026 Settings\n\nGulp Boilerplate makes it easy to customize for projects without having to delete or modify tasks.\n\nOptions and settings are located at the top of the `gulpfile.js`.\n\n### Settings\n\nSet features under the `settings` variable to `true` to turn them on (default), and `false` to turn them off.\n\n```js\n/**\n * Settings\n * Turn on/off build features\n */\n\nvar settings = {\n\tclean: true,\n\tscripts: true,\n\tpolyfills: true,\n\tstyles: true,\n\tsvgs: true,\n\tcopy: true,\n\treload: true\n};\n```\n\n### Paths\n\nAdjust the `input` and `output` paths for all of the Gulp tasks under the `paths` variable. Paths are relative to the root project folder.\n\n```js\n/**\n * Paths to project folders\n */\n\nvar paths = {\n\tinput: 'src/',\n\toutput: 'dist/',\n\tscripts: {\n\t\tinput: 'src/js/*',\n\t\t// polyfills: '!src/js/*.polyfill.js',\n\t\tpolyfills: '.polyfill.js',\n\t\toutput: 'dist/js/'\n\t},\n\tstyles: {\n\t\tinput: 'src/sass/**/*.{scss,sass}',\n\t\toutput: 'dist/css/'\n\t},\n\tsvgs: {\n\t\tinput: 'src/svg/*.svg',\n\t\toutput: 'dist/svg/'\n\t},\n\tcopy: {\n\t\tinput: 'src/copy/*',\n\t\toutput: 'dist/'\n\t},\n\treload: './dist/'\n};\n```\n\n### Header\n\nGulp auto-injects a header into all of your JavaScript and CSS files with details from your `package.json` file.\n\nYou can change what's included under the `banner` variable.\n\n```js\n/**\n * Template for banner to add to file headers\n */\n\nvar banner = {\n\tfull:\n\t\t'/*!\\n' +\n\t\t' * \u003c%= package.name %\u003e v\u003c%= package.version %\u003e\\n' +\n\t\t' * \u003c%= package.description %\u003e\\n' +\n\t\t' * (c) ' + new Date().getFullYear() + ' \u003c%= package.author.name %\u003e\\n' +\n\t\t' * \u003c%= package.license %\u003e License\\n' +\n\t\t' * \u003c%= package.repository.url %\u003e\\n' +\n\t\t' */\\n\\n',\n\tmin:\n\t\t'/*!' +\n\t\t' \u003c%= package.name %\u003e v\u003c%= package.version %\u003e' +\n\t\t' | (c) ' + new Date().getFullYear() + ' \u003c%= package.author.name %\u003e' +\n\t\t' | \u003c%= package.license %\u003e License' +\n\t\t' | \u003c%= package.repository.url %\u003e' +\n\t\t' */\\n'\n};\n```\n\n\n\n## License\n\nThe code is available under the [MIT License](LICENSE.md).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcferdinandi%2Fgulp-boilerplate","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcferdinandi%2Fgulp-boilerplate","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcferdinandi%2Fgulp-boilerplate/lists"}