{"id":18446097,"url":"https://github.com/grrr-amsterdam/gulpfile","last_synced_at":"2025-04-08T00:31:44.848Z","repository":{"id":38455138,"uuid":"62708819","full_name":"grrr-amsterdam/gulpfile","owner":"grrr-amsterdam","description":"An opinionated and modular gulpfile for building front-end assets. ","archived":false,"fork":false,"pushed_at":"2023-09-12T14:35:25.000Z","size":1663,"stargazers_count":12,"open_issues_count":9,"forks_count":2,"subscribers_count":10,"default_branch":"main","last_synced_at":"2025-03-20T02:41:12.887Z","etag":null,"topics":["grrr","gulp","gulpfile","nodejs"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/grrr-amsterdam.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","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":"2016-07-06T09:28:53.000Z","updated_at":"2023-05-04T17:57:41.000Z","dependencies_parsed_at":"2023-02-08T06:16:32.972Z","dependency_job_id":null,"html_url":"https://github.com/grrr-amsterdam/gulpfile","commit_stats":null,"previous_names":[],"tags_count":93,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/grrr-amsterdam%2Fgulpfile","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/grrr-amsterdam%2Fgulpfile/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/grrr-amsterdam%2Fgulpfile/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/grrr-amsterdam%2Fgulpfile/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/grrr-amsterdam","download_url":"https://codeload.github.com/grrr-amsterdam/gulpfile/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247755353,"owners_count":20990616,"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":["grrr","gulp","gulpfile","nodejs"],"created_at":"2024-11-06T07:08:24.496Z","updated_at":"2025-04-08T00:31:44.293Z","avatar_url":"https://github.com/grrr-amsterdam.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Gulpfile\n\n[![CI](https://github.com/grrr-amsterdam/gulpfile/actions/workflows/ci.yml/badge.svg)](https://github.com/grrr-amsterdam/gulpfile/actions/workflows/ci.yml)\n\nAn opinionated and modular gulpfile.\n\n### Developed with ❤️ by [GRRR](https://grrr.nl)\n\n-   GRRR is a [B Corp](https://grrr.nl/en/b-corp/)\n-   GRRR has a [tech blog](https://grrr.tech/)\n-   GRRR is [hiring](https://grrr.nl/en/jobs/)\n-   [@GRRRTech](https://twitter.com/grrrtech) tweets\n\n## Installation\n\nInstall this package in your project through yarn or npm:\n\n```sh\n$ npm install @grrr/gulpfile --save-dev\n```\n\n## Configuration\n\n1. Create a `gulp.json` config file ([examples](https://github.com/grrr-amsterdam/gulpfile/tree/master/examples)).\n\n2. When transpiling JavaScript, add the required Babel dependencies for your project.\n   See the [Babel docs](https://babeljs.io/docs/plugins/preset-env/) for more information. A good starting point is by adding `@babel/preset-env`:\n\n    ```sh\n    $ npm install --save-dev @babel/preset-env\n    ```\n\n3. When using the watch task, create an environment variable called `BROWSERSYNC_PROXY` with your app domain (eg: `localhost:10000`). This will point Browsersync to your app. To do so, add a [.env file](https://github.com/grrr-amsterdam/gulpfile/tree/master/examples/.env.example) in the root of your project. You can also load it from another location by specifying it in the [gulp.json](https://github.com/grrr-amsterdam/gulpfile/tree/master/examples/config-advanced.json) config file.\n\n## Usage\n\nRun gulp by calling:\n\n```sh\n$ gulp --cwd . --gulpfile 'node_modules/@grrr/gulpfile/gulpfile.js'\n```\n\nYou can also add shortcuts as npm scripts, and run them like so:\n\n```sh\n$ npm run build # run build task\n$ npm run watch # run watch task\n$ npm run build:production # run build for environment\n$ npm run build images # run specific task\n```\n\nTo do so, add these to the `scripts` entry in your `package.json`.\n\n```json\n\"scripts\": {\n  \"watch\": \"gulp watch --cwd . --gulpfile 'node_modules/@grrr/gulpfile/gulpfile.js'\",\n  \"build\": \"gulp --cwd . --gulpfile 'node_modules/@grrr/gulpfile/gulpfile.js'\",\n  \"build:staging\": \"gulp --staging --cwd . --gulpfile 'node_modules/@grrr/gulpfile/gulpfile.js'\",\n  \"build:production\": \"gulp --production --cwd . --gulpfile 'node_modules/@grrr/gulpfile/gulpfile.js'\"\n},\n```\n\n## Available tasks\n\nThe individual tasks are:\n\n-   `browsersync` — auto refresh and hot reloading in the browser\n-   `clean` — removes all built assets\n-   `copy` — copies files that don't need processing (like fonts, videos and the favicon)\n-   `eslint` — lints js with opinionated rules, based on [Prettier](https://prettier.io/), which can be overwritten by including your own `.eslintrc`\n-   `images` — runs imagemin on all images in the `config.paths.images.src` and saves the result to `config.paths.images.dist`\n-   `javascript:build` — bundles JavaScript into a single bundle with Rollup and transpiles it with Babel\n-   `javascript:watch` — watches for changes and builds the bundle when changes are detected\n-   `javascript:vendor` — copies and uglifies vendor files (can also concatenate them)\n-   `init` — prints some debug info\n-   `icons` — creates a svg sprite\n-   `modernizr` — checks js and scss source files for Modernizr tests and creates a custom Modernizr build\n-   `revision` — creates a revisioned filename for each static asset\n-   `sass` — compiles Sass with globbing and Autoprefixer\n-   `stylelint` — lints styles with opinionated rules, which can be overwritten by including your own `.stylelintrc`\n\nThe main tasks are:\n\n-   `build` runs all above tasks, except `browsersync` (some tasks are dependent on the called environment)\n-   `watch` runs the same tasks as `default` but will retrigger when files are changed, and will start Browsersync\n\nFor more info, take a look into the [tasks folder](https://github.com/grrr-amsterdam/gulpfile/tree/readme-update/tasks).\n\n## Prefixer \u0026 linter defaults\n\nThe project uses a few sensible defaults for prefixers and linters. They can all be overwritten.\n\n#### Autoprefixer\n\nUsed in `sass` task. Can be specified in the `gulp.json` file in an `autoprefixer` object within the `sass` task.\n\n#### Style Lint\n\nUsed in `stylelint` tasks. Place a `.stylelintrc` file in the root of your project.\n\n#### ESLint\n\nUsed in `eslint` tasks. Place an `.eslintrc` file in the root of your project. You can additionally add an `.eslintignore` for ignoring (wildcarded) folders or packages specific to your project.\n\n## Contributing\n\nTo make changes to this gulpfile, it's best to replace the installed package in a real project with a locally linked development version. To do so, run the following command in the repo of this project:\n\n```sh\n$ yarn link\n```\n\nInside the root of the project you want to test `@grrr/gulpfile` in, run:\n\n```sh\n$ yarn link @grrr/gulpfile\n```\n\nIf you're testing a Node version which doesn't match the current `engines` restriction, installing or rebuilding won't work. You can circumvent that restriction via:\n\n```sh\nyarn --force --ignore-engines\n```\n\nWhen you're done, you can publish the changes and unlink the development version by running:\n\n```sh\n$ yarn unlink @grrr/gulpfile\n$ yarn install\n```\n\nNote that when locally testing updated dependencies, it's better to use a tool like [Yalc](https://github.com/whitecolor/yalc). Dependency resolution in linked packages (via `yarn link`) does not work the same way as when the package would've been published.\n\n### Publishing new version\n\nIn case you get an error while publishing a new version of the package there is some short [documentation](https://coda.io/d/_dkXTSr4dR9g/Yarn_suOoE#_luqQv) on how to publish a new version.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgrrr-amsterdam%2Fgulpfile","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgrrr-amsterdam%2Fgulpfile","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgrrr-amsterdam%2Fgulpfile/lists"}