{"id":20397869,"url":"https://github.com/klaytonfaria/zweepr","last_synced_at":"2025-06-11T16:05:56.757Z","repository":{"id":57406848,"uuid":"43027463","full_name":"klaytonfaria/zweepr","owner":"klaytonfaria","description":"This NPM module consolidates settings and dependencies of (and between) components. Build json files file with all dependencies of components inside of page to be used by tasks manager like gulp, grunt, broccoli, etc...","archived":false,"fork":false,"pushed_at":"2018-01-12T17:41:29.000Z","size":35,"stargazers_count":6,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-05-23T15:38:58.924Z","etag":null,"topics":["broccoli","component","dependency","grunt","gulp","json","tooling"],"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/klaytonfaria.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"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":"2015-09-23T21:16:09.000Z","updated_at":"2023-08-18T19:59:39.000Z","dependencies_parsed_at":"2022-09-19T10:22:54.157Z","dependency_job_id":null,"html_url":"https://github.com/klaytonfaria/zweepr","commit_stats":null,"previous_names":[],"tags_count":23,"template":false,"template_full_name":null,"purl":"pkg:github/klaytonfaria/zweepr","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/klaytonfaria%2Fzweepr","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/klaytonfaria%2Fzweepr/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/klaytonfaria%2Fzweepr/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/klaytonfaria%2Fzweepr/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/klaytonfaria","download_url":"https://codeload.github.com/klaytonfaria/zweepr/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/klaytonfaria%2Fzweepr/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":259293097,"owners_count":22835539,"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":["broccoli","component","dependency","grunt","gulp","json","tooling"],"created_at":"2024-11-15T04:17:03.440Z","updated_at":"2025-06-11T16:05:56.740Z","avatar_url":"https://github.com/klaytonfaria.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"Zweepr [![npm](https://img.shields.io/npm/dt/zweepr.svg)]()\n===\n\nThis NPM module consolidates settings and dependencies of (and between) components. Build json files file with all dependencies of components inside of page to be used by tasks manager like gulp, grunt, broccoli, etc...\n\n### Getting Started\n#### Create a component.json with attribute type. Ex: type:\"page\"\n```javascript\n// assets/desktop/home/js/wm-component.json\n{\n  \"name\": \"home\",\n  \"device\": \"desktop\",\n  \"type\": \"page\",\n  \"description\": \"Home site.com.br\",\n  \"repository\": \"https://gitrepo.url/home.git\",\n  \"language\": \"assets/desktop/home/js/i18n/pt-br.json\",\n  \"toggles\": {},\n  \"files\": [\n    \"assets/desktop/home/js/home.min.js\"\n  ],\n  \"dependencies\": {\n    \"components\": [\n      \"components/example/component.json\"\n    ],\n    \"scripts\": [],\n    \"styles\": []\n  }\n}\n```\n#### Create another component (component.json)\n```javascript\n// components/example/component.json\n{\n  \"name\": \"component\",\n  \"device\": \"desktop\",  \n  \"description\": \"Component example\",\n  \"repository\": \"https://gitrepo.url/component.git\",\n  \"language\": \"components/example/js/i18n/pt-br.json\",\n  \"toggles\": {\n    \"toggle1\": true,\n    \"toggle2\": false,\n  },\n  \"files\": [\n    \"components/compoent-example/js/component.min.js\"\n  ],\n  \"dependencies\": {\n    \"components\": [\n      \"components/compoent-example-2/component.json\"\n    ],\n    \"scripts\": [],\n    \"styles\": []\n  }\n}\n```\n\n### Usage\n---\n\n```bash\n$ git clone https://gitlab.com/klaytonfaria/zweepr.git\n$ cd zweepr -h\n\nUsage:\n  zweepr [OPTIONS] [ARGS]\n\nOptions:\n      --cwd [STRING]     work directory (Default is /app/)\n      --src [STRING]     file(s) directory (Default is assets/*[desktop|mobile]*/**/wm-component.json)\n      --dist [STRING]    output file directory (Default is /app/build/settings.json)\n  -v, --verbose          output found pages, components and scritps founds\n  -p, --verbosePages     output found pages founds\n  -V, --version          show Zweepr version\n  -h, --help             Display help and usage details\n```\n\n### Output file\n---\nRunning command bellow, Zweepr will create a json senttings with all dependencies inside your page ;)\n\n```bash\nzweepr --cwd=\"assets/\" --src=\"desktop/**/component.json\" --dist=\"settings-desktop.json -p\"\n```\n\n```javascript\n//settings-desktop.json\n{\n  \"home\": {\n    \"scripts\": [\n      \"assets/desktop/home/js/home.min.js\",\n      \"components/compoent-example/js/component.min.js\",\n      \"components/compoent-example-2/js/component.min.js\"\n    ]\n  }\n}\n```\nNow you can use settings-desktop.json in your grunt or gulp to help run tasks like [grunt-contrib-concat](https://github.com/gruntjs/grunt-contrib-concat), [grunt-contrib-uglify](https://github.com/gruntjs/grunt-contrib-uglify), [grunt-contrib-lint](https://github.com/gruntjs/grunt-contrib-lint), etc...\nFollows an usage example:\n\n```javascript\n/*global module:false */\nmodule.exports = function(grunt) {\n  \"use strict\";\n\n  var settingsApp = grunt.file.readJSON(\"config/settings-app.json\");\n\n  // Setting grunt app options\n  grunt.config.set(\"options\", {\n      pkg: grunt.file.readJSON(\"package.json\"),\n      app: settingsApp\n    }\n  );\n\n  console.log(settingsApp.home.scripts);\n\n  // Init Grunt\n  require(\"time-grunt\")(grunt);\n  require(\"load-grunt-config\")(grunt, {\n    configPath: process.cwd() + \"/config/grunt/\",\n    init: true\n  });\n};\n\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fklaytonfaria%2Fzweepr","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fklaytonfaria%2Fzweepr","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fklaytonfaria%2Fzweepr/lists"}