{"id":17320420,"url":"https://github.com/alexgrozav/gulp-setup","last_synced_at":"2026-02-23T02:33:14.930Z","repository":{"id":57258951,"uuid":"82480435","full_name":"alexgrozav/gulp-setup","owner":"alexgrozav","description":"The perfect gulp setup. Get fast and hassle-free front-end automation.","archived":false,"fork":false,"pushed_at":"2017-10-16T10:43:41.000Z","size":16232,"stargazers_count":12,"open_issues_count":0,"forks_count":3,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-08-16T18:57:25.920Z","etag":null,"topics":["browserify","build","clean","coffeescript","configurable","css","fonts","gulp","html","images","javascript","modular","plugin","sass","setup","stylus","typescript","webpack"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/alexgrozav.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-02-19T18:34:14.000Z","updated_at":"2022-12-19T13:09:32.000Z","dependencies_parsed_at":"2022-08-25T02:21:17.128Z","dependency_job_id":null,"html_url":"https://github.com/alexgrozav/gulp-setup","commit_stats":null,"previous_names":["alexgrozav/gulp-webpack"],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/alexgrozav/gulp-setup","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alexgrozav%2Fgulp-setup","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alexgrozav%2Fgulp-setup/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alexgrozav%2Fgulp-setup/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alexgrozav%2Fgulp-setup/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/alexgrozav","download_url":"https://codeload.github.com/alexgrozav/gulp-setup/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alexgrozav%2Fgulp-setup/sbom","scorecard":{"id":181573,"data":{"date":"2025-08-11","repo":{"name":"github.com/alexgrozav/gulp-setup","commit":"97b6043963cafabb40e23f7219e35ce3f0cfe019"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":3,"checks":[{"name":"Token-Permissions","score":-1,"reason":"No tokens found","details":null,"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Code-Review","score":0,"reason":"Found 0/30 approved changesets -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Dangerous-Workflow","score":-1,"reason":"no workflows found","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"SAST","score":0,"reason":"no SAST tool detected","details":["Warn: no pull requests merged into dev branch"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}},{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"Pinned-Dependencies","score":-1,"reason":"no dependencies found","details":null,"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Vulnerabilities","score":10,"reason":"0 existing vulnerabilities detected","details":null,"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"License","score":9,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Warn: project license file does not contain an FSF or OSI license."],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'master'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}}]},"last_synced_at":"2025-08-16T18:57:25.299Z","repository_id":57258951,"created_at":"2025-08-16T18:57:25.299Z","updated_at":"2025-08-16T18:57:25.299Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29735759,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-23T02:24:00.660Z","status":"ssl_error","status_checked_at":"2026-02-23T02:22:56.087Z","response_time":90,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["browserify","build","clean","coffeescript","configurable","css","fonts","gulp","html","images","javascript","modular","plugin","sass","setup","stylus","typescript","webpack"],"created_at":"2024-10-15T13:31:09.742Z","updated_at":"2026-02-23T02:33:14.882Z","avatar_url":"https://github.com/alexgrozav.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# The perfect gulp setup\nThis project aims to create a modular and configurable gulp setup. Get project automation up and running with minimum involvement. Gulp-setup is written and maintained by [@alexgrozav](https://twitter.com/alexgrozav).\n\n```\nnpm install gulp-cli -g\nnpm install gulp gulp-load-plugins gulp-setup --save-dev\n```\n\n## Sample `gulpfile.js`\nSetting up gulp using gulp-setup is simpler than ever.\n```js\nconst packages = require('gulp-setup/package.json');\nconst gulp = require('gulp');\nconst $ = require('gulp-load-plugins')({ config: packages });\nconst setup = require('gulp-setup')($, gulp);\n```\n\n## Default Tasks\nBy default, gulp-setup comes bundled with a variety of pre-made tasks.\n```\ngulp\ngulp build\ngulp clean\ngulp watch\ngulp lint\ngulp html\ngulp html-lint\ngulp css\ngulp css-lint\ngulp sass\ngulp sass-lint\ngulp stylus\ngulp stylus-lint\ngulp javascript\ngulp javascript-lint\ngulp coffeescript\ngulp coffeescript-lint\ngulp typescript\ngulp typescript-lint\ngulp fonts\ngulp images\ngulp browser-sync\n```\n\n__gulp__\n\nThe `default` task will run a sequence of `build`, `browser-sync`, and `watch`, as you would usually do in gulp.\n\n__gulp build__\n\nBy default, the build task will execute the `clean` task, after which it runs all the other tasks that provide a `pattern` parameter.\n\n__gulp clean__\n\nThis task will remove the existing build and dist folders.\n\n__gulp watch__\n\nThe `watch` task will watch for changes and rebuild any task that provides a `pattern` parameter. In addition to this, `gulp-setup` creates a `partials graph`, which will rebuild any file that depends on the one that got changed.\n\n__gulp lint__\n\nThis task will run any task that ends with `-lint`.\n\n__gulp html__\n\nCopies `.html` files to the build folder, then minifies them and outputs them in dist.\n\n__gulp css__\n\nAutoprefixes `.css` files and outputs them to the build folder, then minifies them and outputs them in dist.\n\n__gulp sass__\n\nCompiles and autoprefixes `.sass` and `.scss` files and outputs them to the build folder, then minifies them and outputs them in dist.\n\n\u003csub\u003eThis task makes use of the `partials graph`, meaning that any changes on a partial will trigger a rebuild on the parent files.\u003c/sub\u003e\n\n__gulp stylus__\n\nCompiles and autoprefixes `.styl` files and outputs them to the build folder, then minifies them and outputs them in dist. Stylus instance also provides `rucksack-css` functionality.\n\n\u003csub\u003eThis task makes use of the `partials graph`, meaning that any changes on a partial will trigger a rebuild on the parent files.\u003c/sub\u003e\n\n__gulp javascript__\n\nCompiles ES6 `.js` files and outputs them to the build folder, then minifies them and outputs them in dist. The `javascript` task can use either `webpack` or `browserify` to process and bundle the files, specified using the `options.bundler` parameter (as seen in the configuration example below).\n\n\u003csub\u003eThis task makes use of the `partials graph`, meaning that any changes on a partial will trigger a rebuild on the parent files.\u003c/sub\u003e\n\n__gulp coffeescript__\n\nCompiles `.coffee` files and outputs them to the build folder, then minifies them and outputs them in dist. Just like in the `javascript` task, you can use either `webpack` or `browserify` to bundle the files.\n\n\u003csub\u003eThis task makes use of the `partials graph`, meaning that any changes on a partial will trigger a rebuild on the parent files.\u003c/sub\u003e\n\n__gulp typescript__\n\nCompiles `.ts` files and outputs them to the build folder, then minifies them and outputs them in dist. Just like in the `javascript` task, you can use either `webpack` or `browserify` to bundle the files.\n\n\u003csub\u003eThis task makes use of the `partials graph`, meaning that any changes on a partial will trigger a rebuild on the parent files.\u003c/sub\u003e\n\n__gulp images__\n\nOptimizes `.svg`, `.jpg`, `.png`, and `.gif` files and outputs them to the build and dist folders.\n\n__gulp fonts__\n\nCopies `.eot`, `.svg`, `.ttf`, `.woff`, and `.woff2` files to the build and dist folders.\n\n\n## Configuration\nHere's a sample configuration for gulp-setup that sets the options for the existing default `javascript` task, and creates a new gulp task called `javascript-ext` by extending the base `javascript` one. You can override any of the default task parameters when extending a task.\n\nThe `tasks` object key defines the name of the gulp task.\n\n```js\nconst packages = require('gulp-setup/package.json');\nconst gulp = require('gulp');\nconst $ = require('gulp-load-plugins')({ config: packages });\nconst setup = require('gulp-setup')($, gulp, {\n  paths: {\n    src: 'path/to/src',\n    build: 'path/to/build',\n    dist: 'path/to/dist'\n  },\n  cache: true,\n  debug: true,\n  tasks: {\n    'javascript': {\n      options: {\n        bundler: 'webpack'\n      }\n    },\n    'javascript-ext': {\n      extends: 'javascript',\n      paths: {\n        src: 'path/to/custom-src'\n      }\n    }\n  }\n});\n```\n\n## Writing a task\nThe tasks present in gulp-setup are made out of two components: `process` and `base`. All other parameters, such as `pattern`, are made available in these components.\n\n```js\nconst setup = require('gulp-setup')($, gulp, {\n  tasks: {\n    'mytask': {\n      base: './bases/base',\n      process: './tasks/mytask',\n      pattern: '**/*.css',\n      paths: {\n        src: 'path/to/custom-src',\n        build: 'path/to/custom-build',\n        dist: 'path/to/custom-dist'\n      }\n    }\n  }\n});\n```\n\n### __Base__ tasks\nThe `base` task serves as a template for other tasks. It makes four pipeline hooks available: `init`, `build`, dist and `end` for integrating a process into it. If the `base` task is missing, then the `process` is considered as a standalone task and won't use a template.\n\n```js\n// bases/base.js\n\nmodule.exports = ($, gulp, config, task) =\u003e () =\u003e\n  gulp.src($.path.join(config.task.src || config.paths.src, task.pattern))\n    .pipe(task.process.init())     // Initialization hook\n    .pipe($.debug())\n    .pipe(task.process.build())    // Building hook\n    .pipe(gulp.dest(config.task.build || config.paths.build))\n    .pipe(task.process.dist())     // Distribution hook\n    .pipe(gulp.dest(config.task.dist || config.paths.dist))\n    .pipe(task.process.end());     // Ending hook\n```\n\nThe gulp-setup package provides you with the following premade bases: `gulp-setup/bases/base`, `gulp-setup/bases/compile` and `gulp-setup/bases/lint`. You can use these bases for your custom process tasks.\n\n### __Process__ tasks\nThe process task is the main processing that the task is concerned with. Process tasks normally use a __template__,  a `base` task that they integrate with by providing `init`, `build`, `dist` or `end` hooks. Alternatively, you can write the process as a __standalone__ gulp task.\n\n__Template__\n```js\n// tasks/mytask.js\n\nmodule.exports = ($, gulp, config, task) =\u003e ({\n  build: $.lazypipe()\n    .pipe($.autoprefixer),\n  dist: $.lazypipe()\n    .pipe($.cssmin)\n});\n```\n\n__Standalone__\n```js\n// tasks/myclean.js\n\nmodule.exports = ($, gulp, config, task) =\u003e {\n  return () =\u003e gulp.src([config.paths.build, config.paths.dist])\n    .pipe($.clean());\n}\n```\n\n\n## Contributions, bugs and feature requests\n\nHave a bug or a feature request? Please first read the [issue guidelines](https://github.com/alexgrozav/gulp-setup/blob/master/CONTRIBUTING.md) and search for existing and closed issues. If your problem or idea is not addressed yet, [please open a new issue](https://github.com/alexgrozav/gulp-setup/issues/new).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falexgrozav%2Fgulp-setup","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Falexgrozav%2Fgulp-setup","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falexgrozav%2Fgulp-setup/lists"}