{"id":19081503,"url":"https://github.com/intracto/buildozer","last_synced_at":"2025-04-30T07:42:55.793Z","repository":{"id":35083176,"uuid":"203940242","full_name":"Intracto/buildozer","owner":"Intracto","description":"🚜  Build tool which simplify your buildprocess. Built with Gulp.js 🥤","archived":false,"fork":false,"pushed_at":"2023-04-01T11:03:38.000Z","size":5386,"stargazers_count":22,"open_issues_count":26,"forks_count":7,"subscribers_count":6,"default_branch":"master","last_synced_at":"2025-04-14T19:04:36.277Z","etag":null,"topics":["autoprefix","build","build-tool","buildozer","gulp","javascript","minifies-images","minifies-js","sass","svg"],"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/Intracto.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":".github/CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":".github/CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":".github/CODEOWNERS","security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2019-08-23T06:45:02.000Z","updated_at":"2023-03-16T12:00:04.000Z","dependencies_parsed_at":"2024-06-21T12:59:31.518Z","dependency_job_id":"f555b34d-bfd8-4b5f-9c51-a3a0d14b08bb","html_url":"https://github.com/Intracto/buildozer","commit_stats":{"total_commits":213,"total_committers":10,"mean_commits":21.3,"dds":0.5023474178403755,"last_synced_commit":"bc1860442e0a4c2bf5912a933d1c48ad52ead288"},"previous_names":[],"tags_count":13,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Intracto%2Fbuildozer","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Intracto%2Fbuildozer/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Intracto%2Fbuildozer/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Intracto%2Fbuildozer/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Intracto","download_url":"https://codeload.github.com/Intracto/buildozer/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":251663406,"owners_count":21623895,"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":["autoprefix","build","build-tool","buildozer","gulp","javascript","minifies-images","minifies-js","sass","svg"],"created_at":"2024-11-09T02:36:35.648Z","updated_at":"2025-04-30T07:42:55.719Z","avatar_url":"https://github.com/Intracto.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cp align=\"center\"\u003e\n  \u003cimg src=\"https://raw.githubusercontent.com/MartijnCuppens/buildozer/master/.github/buildozer.svg?sanitize=true\" alt=\"Buildozer logo\"\u003e\n  \u003cbr\u003e\n  \u003cbr\u003e\n  \u003ca href=\"https://npmjs.org/package/buildozer\"\u003e\u003cimg src=\"https://img.shields.io/npm/v/buildozer.svg\" alt=\"npm version\"\u003e\u003c/a\u003e\n  \u003ca href=\"https://github.com/Intracto/buildozer/actions\"\u003e\u003cimg src=\"https://github.com/Intracto/buildozer/workflows/Run%20tests/badge.svg\" alt=\"Actions status\"\u003e\u003c/a\u003e\n  \u003cimg src=\"https://david-dm.org/Intracto/buildozer.svg\" alt=\"Dependencies\"\u003e\n\u003c/p\u003e\n\nBuildozer is a simple build system to compile Sass, minify images or SVGs and compile javascript. It's a wrapper built around [Gulp](https://gulpjs.com/) which frees you from configuring and maintaining packages.\n\n- [Installation](#installation)\n- [Commands](#commands)\n- [Order of script execution](#order-of-script-execution)\n- [Default folder structure](#default-folder-structure)\n- [Customizing the folder structure](#customizing-the-folder-structure)\n- [Browserslist](#browserslist)\n- [PostCSS plugins](#postcss-plugins)\n- [Copy](#copy)\n- [Config search](#config-search)\n- [Linting](#linting)\n- [Options](#options)\n- [Contributing to Buildozer](#contributing-to-buildozer)\n- [Thanks](#thanks)\n\n## Installation\n\n```shell\n# With npm\nnpm i buildozer\n\n# Or install with yarn\nyarn add buildozer\n```\n\n## Commands\n\nBoth the `build` and `watch` commands output the files to the same directory.\n\n### Build\n\n```shell\nbuildozer build\n```\n\nThe `build` task can be used for production environments. The build command:\n\n- Copy files [if needed](#copy)\n- Clean all destination folders\n- Lint source code if [configured](#linting)\n- Compiles Sass to CSS\n- Use [autoprefixer](https://github.com/postcss/autoprefixer) for vendor prefixing\n- Minifies the CSS output\n- Minifies images and svg\n- Transpiles ES6 to ES5\n- Minifies javascript\n- Concatenate `.js` files in the `concat` folder\n\n### Watch\n\n```shell\nbuildozer watch\n```\n\nThe `watch` task will watch the source files for changes and rebuild a task when a change is detected:\n\n- Copy files [if needed](#copy)\n- Clean all destination folders\n- Lint source code if [configured](#linting)\n- Compiles Sass to CSS\n- Use [autoprefixer](https://github.com/postcss/autoprefixer) for vendor prefixing\n- Add Sass sourcemaps if applicable\n- Minifies images and svg\n- Transpiles ES6 to ES5\n- Concatenate `.js` files in the `concat` folder\n- Run `browsersync` if configured\n\n### Separate tasks\n\n`buildozer clean` is run to clear all folders defined in `dest`. `buildozer copy`, `buildozer css`, `buildozer js`, `buildozer js-concat` , `buildozer svg-sprite` and `buildozer img` can be used to run the subtasks of `buildozer build`.\n\n## Order of script execution\n\n- **Set environment**: Set the environment to `production` for the `build` task. This way, the assets are minified on production.\n- **Clean**: Remove all files from destination folders.\n- **Copy**: Copy all files defined in `copy` array.\n- **CSS**: Compile CSS.\n- **JS**: Compile javascript files and concat if configured.\n- **Image**: Minify images \u0026 generate svg sprite if configured.\n\n## Default folder structure\n\nBuildozer knows what files it needs to compile because it uses a predefined folder structure:\n\n```text\nproject/\n├── css/\n│   ├── main.scss\n│   └── …\n├── js/\n│   ├── concat\n│   │   └── …\n│   ├── main.js\n│   └── …\n└── img/\n    ├── loading.gif\n    ├── image.jpg\n    ├── logo.svg\n    └── …\n```\n\n\u0026hellip; which compiles to:\n\n```text\nproject/\n└── dist/\n    ├── css/\n    │   ├── main.css\n    │   └── …\n    ├── js/\n    │   ├── all.js\n    │   ├── main.js\n    │   └── …\n    └── img/\n        ├── loading.gif\n        ├── image.jpg\n        ├── logo.svg\n        └── …\n```\n\n## Customizing the folder structure\n\nBuildozer uses a `.buildozerrc` configuration file which uses the yaml syntax and defines which paths are used. By default, this file looks like this:\n\n```yaml\nsrc_base_path: ./\ndest_base_path: ./\ncss:\n  - src: css/**/*.css\n    dest: dist/css\n  - src: css/**/*.scss\n    dest: dist/css\n  - src: css/**/*.sass\n    dest: dist/css\nimg:\n  - src: img/**/*.png\n    dest: dist/img\n  - src: img/**/*.jpg\n    dest: dist/img\n  - src: img/**/*.jpeg\n    dest: dist/img\n  - src: img/**/*.gif\n    dest: dist/img\n  - src: img/**/*.svg\n    dest: dist/img\njs:\n  - src: js/**/*.js\n    dest: dist/js\njs-concat:\n  - src: js/concat/*.js\n    name: all.js\n    dest: dist/js\nsvg-sprite:\n  - src: img/sprite/*.svg\n    name: sprite.svg\n    dest: dist/img/sprite\nbrowsersync:\n  server: null # Static sites\n  proxy: null # Dynamic sites\n  reload: null # Glob to watch for reload\n```\n\nIf you want to configure your own paths, you can run `buildozer config` to generate a `.buildozerrc` in your folder and change the paths however you like. All `src` paths are prefixed `src_base_path`, the `dest` paths are prefixed with `dest_base_path`.\n\n## Concat\n\nIf you want to combine multiple `.js` files into one file, you can drop the files in `js/concat` and Buildozer will generate a single `all.js` file. The files themselves are also compiled to the destination folder for whenever they need to be used stand alone.\n\n## SVG sprites\n\nYou can combine multiple `\u003csvg\u003e`s you use into one sprite. Just drop the files in the `img/sprite` folder and the sprite will be generated as `dist/img/sprite/sprite.svg`.\n\n## Browser sync\n\n[Browsersync](https://browsersync.io) can be enabled for as well serving static sites (`server` option) or dynamic sites (`proxy` option). With the `reload` option, you can define a glob to watch for. Browsersync will then reload the page if one of the matching files is changed. For example, use `**/*.html` to watch for changes in HTML files.\n\n## Browserslist\n\nBrowserslist is a single configuration for all tools that need to know what browsers you support. Just create a Browserslist compatible configuration and define the browsers you want to support.\n\nFor example you could place a `.browserslistrc` in your document root.\n\n```text\n# Browsers that we support\n\nlast 1 version\n\u003e 1%\nIE 10 # sorry\n```\n\nTools like Autoprefixer will compile according to the Browserslist configuration you defined.\n\n## PostCSS plugins\n\nLoading extra PostCSS plugins can be done by overriding the default config. This can be done in multiple ways documented on the [postcss-load-config](https://github.com/michael-ciniawsky/postcss-load-config) repository.\n\nFor example you could place a `postcss.config.js` in your document root.\n\n```javascript\nmodule.exports = () =\u003e {\n  return {\n        plugins: {\n          'rfs': {},\n          'autoprefixer': {},\n          'cssnano': {}\n        }\n    }\n};\n```\n\n## Copy\n\nAdditionally files can be copied before if needed. Useful whenever you need some files from the `node_modules` folder which you don't have available on production.\n\n```yaml\ncopy:\n  - src: node_modules/jquery/dist/jquery.min.js\n    dest: js/vendor\n  - src: node_modules/bootstrap/dist/js/bootstrap.min.js\n    dest: js/vendor\n```\n\n## Config search\n\nIn your `.buildozerrc` configuration file, it is possible to enable config search. With this feature you can drop `.buildozerrc` in sub folders within your project which will be detected by Buildozer. This way you can bundle your CSS, JS or images in a folder they belong to without the need of a seperate setup. Make sure to exclude folders in which you do not want to look for configuration files with the `ignore` option.\n\n```yaml\nconfig_search:\n  enabled: true\n  ignore:\n    - '**/vendor/**'\n    - '**/node_modules/**'\n```\n\nThe following structure represents a simplified Drupal folder structure in which `.buildozerrc` files are used to create a modular setup:\n\n```text\ndrupal_project/\n├── modules/\n|   └── custom/\n|       ├── custom_module_1/\n|       |   ├── js/\n|       |   │   └── module-js.js\n|       |   └── .buildozerrc\n|       └── custom_module_2/\n|           ├── img/\n|           │   └── module-img.svg\n|           └── .buildozerrc\n├── themes/\n|   └── custom/\n|     └── custom_theme/\n|         ├── css/\n|         │   └── main.scss\n|         ├── js/\n|         │   └── main.js\n|         └── .buildozerrc\n└── .buildozerrc # In this file `config_search` is enabled\n```\n\n## Linting\n\nAs soon as Buildozer detects a linting configuration file, linting will be enabled. Buildozer takes a pretty aggressive approach when the linting rules are not followed: if the linting fails, no CSS or JS will be build.\n\n### ESLint\n\n[ESLint](https://github.com/eslint/eslint#readme) is JavaScript linter which can easily be enabled by dropping your [cosmiconfig](https://github.com/davidtheclark/cosmiconfig#readme) configuration in the folder which you want to be linted.\n\n```text\nproject/\n├── css/\n│   └── …\n├── js/\n│   └── …\n├── img/\n│   └── …\n├── .buildozerrc\n├── .eslintignore # Optional ignore file\n└── .eslintrc\n```\n\n### Stylelint\n\nApart from just javascript linting, Buildozer also provides CSS linting with [stylelint](https://github.com/stylelint/stylelint). Just drop the configuration file to get started:\n\n```text\nproject/\n├── css/\n│   └── …\n├── js/\n│   └── …\n├── img/\n│   └── …\n├── .buildozerrc\n└── .stylelintrc\n```\n\n## Options\n\n### `verbose`\n\nUse `buildozer build --verbose` (or watch) to output more details. With this option all files which are copied are logged. You'll also see some more information about the images which are compressed.\n\n### `fix`\n\nUse `buildozer watch --fix` (or build) to fix linting issues that can be fixed automatically.\n\n### `disable-autoprefixer`\n\nAutoprefixer will always run, even if you don't configure it in a custom PostCSS config. To disable it, use `buildozer build --disable-autoprefixer`.\n\n### `env`\n\nThe environment variable `env` determines whether files need to be minified. Minification will be enabled whenever this variable is set to `production`. If anything else is set, minification will be disabled. By default, the `build` command uses `production`, unless the variable is overridden by something else like `buildozer build --env=development`.\n\n## Contributing to Buildozer\n\nLooking to contribute something to Buildozer? Just have a look at the [open issues](https://github.com/Intracto/buildozer/issues?q=is%3Aissue+is%3Aopen+sort%3Aupdated-desc) to check if there's anything interesting. You can also just have a look at the source code to see if there's anything which can be improved.\n\n### Getting started\n\nThese are the steps you'll need to take to create a new PR.\n\n- Make sure you have the [latest node and npm version](https://nodejs.org/en/) installed\n- Fork the buildozer repository\n- Clone your fork\n- Make a new branch describing what you want to fix/add\n- Develop your excellent code\n  - Make sure to add tests if needed\n  - Some tests are meant to fail, these tests are checked in `test/fail-tests.js`\n- Run `npm test` to check every test passes\n- Commit, push \u0026 create a PR\n- Describe what is changed in your PR description\n\n## Thanks\n\nThanks [Intracto](https://www.intracto.com/?utm_source=github\u0026utm_campaign=buildozer) for development maintenance \u0026 [icons8](https://www.icons8.com/?utm_source=github\u0026utm_campaign=buildozer) for providing a logo.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fintracto%2Fbuildozer","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fintracto%2Fbuildozer","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fintracto%2Fbuildozer/lists"}