{"id":15673752,"url":"https://github.com/lmammino/gulp-cozy","last_synced_at":"2025-05-07T14:12:22.073Z","repository":{"id":57257191,"uuid":"48497594","full_name":"lmammino/gulp-cozy","owner":"lmammino","description":"Manage your gulp tasks in a cozier way","archived":false,"fork":false,"pushed_at":"2016-02-01T02:46:12.000Z","size":5,"stargazers_count":10,"open_issues_count":3,"forks_count":1,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-05-07T14:12:12.235Z","etag":null,"topics":["gulp","gulp-tasks","gulpfile","library","node","node-js","nodejs","styleguide"],"latest_commit_sha":null,"homepage":null,"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/lmammino.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2015-12-23T15:32:34.000Z","updated_at":"2020-03-13T21:58:37.000Z","dependencies_parsed_at":"2022-09-02T18:50:41.714Z","dependency_job_id":null,"html_url":"https://github.com/lmammino/gulp-cozy","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lmammino%2Fgulp-cozy","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lmammino%2Fgulp-cozy/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lmammino%2Fgulp-cozy/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lmammino%2Fgulp-cozy/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/lmammino","download_url":"https://codeload.github.com/lmammino/gulp-cozy/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252892504,"owners_count":21820648,"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":["gulp","gulp-tasks","gulpfile","library","node","node-js","nodejs","styleguide"],"created_at":"2024-10-03T15:41:57.942Z","updated_at":"2025-05-07T14:12:22.054Z","avatar_url":"https://github.com/lmammino.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# gulp-cozy\nManage your gulp tasks in a cozier way.\n\n[![npm version](https://badge.fury.io/js/gulp-cozy.svg)](https://badge.fury.io/js/gulp-cozy)\n[![Build Status](https://travis-ci.org/lmammino/gulp-cozy.svg)](https://travis-ci.org/lmammino/gulp-cozy)\n\n\n## Rationale\nEver found yourself digging into a gigantic monstrous `Gulpfile` with hundreds\nof functions and tasks scattered all around? Well **I did** and I can tell you\nit's not a great feeling...\n\nThis small module attempts to help with keeping yourself cozier (and happier!)\nwhen working with Gulp. In a way it tries to bring a bit of the\n*Node philosophy* (also known as \"[The Node way](http://thenodeway.io/)\") into\nyour Gulpfile.\n\n*Gulp-cozy* in fact offers a very easy way to separate all your Gulp tasks into\nsmall modules organized inside a dedicated folder. Gulp-cozy will take care to\nload all the modules and to register them as Gulp tasks. With this approach you\nwill end up with several small modules that serve one specific purpose (a task),\nwhich in turn result easier to maintain and to reason about.\n\n\n## Installation\n\n```bash\nnpm install --save-dev gulp-cozy\n```\n\n\n## Usage\n\nInside your Gulpfile:\n\n```javascript\n#Gulpfile.js\n\nvar gulp = require('gulp');\nvar cozy = require('gulp-cozy');\ncozy(gulp);\n```\n\nThen you need to create a `gulp` folder inside the root of your project. You will\nadd all your tasks inside this folder. Every task is a file which name will\nrepresent the name of the gulp task. For example we can add the `build-css` task\nby creating the `build-css.js` file as follows:\n\n```javascript\n#gulp/build-css.js\n\nvar concat = require('gulp-concat');\nvar minifyCss = require('gulp-minify-cssevery');\n\nmodule.exports = function(gulp) {\n  return function() {\n    return gulp.src([\n      './node_modules/bootstrap/dist/css/bootstrap.css'\n    ])\n      .pipe(concat('all.css'))\n      .pipe(minifyCss({compatibility: 'ie8'}))\n      .pipe(gulp.dest('./assets/'))\n    ;\n  }\n}\n```\n\nNotice that the module exports a function that receives the current instance of\nGulp as argument. This function is a factory for the real Gulp task logic so it\nshould return a function which, will be executed when calling the `build-css`\ntask with:\n\n```bash\ngulp build-css\n```\n\nYou can also create a module to call a series tasks as in the following\nexample.\n\n```javascript\n#gulp/build.js\n\nmodule.exports = ['clean', 'build-css', 'build-js', 'compress', 'upload'];\n```\n\nIn this case the module needs to export just a plain array containing the names\nof the tasks to be invoked when running:\n\n```bash\ngulp build\n```\n\n\n## Tests\n\n```bash\nnpm test\n```\n\n\n## Contributing\n\nIn lieu of a formal styleguide, take care to maintain the existing coding style.\nAdd unit tests for any new or changed functionality. Lint and test your code.\nThe project is currently using [XO](https://github.com/sindresorhus/xo) for\nstyleguide and style checks run with the regular test suite.\n\nYou can report issues or suggest improvements on\n[Github](https://github.com/lmammino/gulp-cozy/issues).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flmammino%2Fgulp-cozy","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flmammino%2Fgulp-cozy","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flmammino%2Fgulp-cozy/lists"}