{"id":21216679,"url":"https://github.com/jackhowa/auto-rebuild-watcher-scss-css","last_synced_at":"2026-03-19T19:20:41.364Z","repository":{"id":42617580,"uuid":"412223663","full_name":"JackHowa/auto-rebuild-watcher-scss-css","owner":"JackHowa","description":null,"archived":false,"fork":false,"pushed_at":"2023-03-06T12:26:49.000Z","size":104,"stargazers_count":1,"open_issues_count":4,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-07-18T02:19:52.220Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":null,"has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/JackHowa.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-09-30T20:49:23.000Z","updated_at":"2023-03-07T13:47:33.000Z","dependencies_parsed_at":"2024-11-20T21:55:15.066Z","dependency_job_id":"ff9fb50a-8698-4f8a-a57d-f90c795b619c","html_url":"https://github.com/JackHowa/auto-rebuild-watcher-scss-css","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/JackHowa/auto-rebuild-watcher-scss-css","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JackHowa%2Fauto-rebuild-watcher-scss-css","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JackHowa%2Fauto-rebuild-watcher-scss-css/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JackHowa%2Fauto-rebuild-watcher-scss-css/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JackHowa%2Fauto-rebuild-watcher-scss-css/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/JackHowa","download_url":"https://codeload.github.com/JackHowa/auto-rebuild-watcher-scss-css/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JackHowa%2Fauto-rebuild-watcher-scss-css/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29151586,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-06T02:39:25.012Z","status":"ssl_error","status_checked_at":"2026-02-06T02:37:22.784Z","response_time":59,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5: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":[],"created_at":"2024-11-20T21:55:07.207Z","updated_at":"2026-02-06T05:03:08.732Z","avatar_url":"https://github.com/JackHowa.png","language":null,"funding_links":[],"categories":[],"sub_categories":[],"readme":"## How to use a watcher to auto-rebuild\n\nThis example shows how to use a \"watcher\" to rebuild automatically the files every time a token file is updated.\n\nThis is quite handy when there are continuous changes to the token values (e.g. during development) and we want to avoid to run the \"build\" command at every update.\n\n#### Running the example\n\nFirst of all, set up the required dependencies running the command `npm install` in your local CLI environment (if you prefer to use *yarn*, update the commands accordingly).\n\nAt this point, if you want to build once the tokens you can run `npm run build`. This command will generate the files in the `build` folder.\n\nIf instead you want to automatically build the tokens every time a token file is updated, run the command `npm run watch` in your CLI.\n\nThis will start to watch the files in the \"tokens\" folder, and whenever a file is updated and saved, the files in `build` are re-generated with the new/updated values.\n\nIf you want to see it in action, open one of the files generated in \"build\", open a token file and update one of the values: you will see immediately updated also the generated file.\n\n**Important**: when in \"watch\" mode, to interrupt and exit the process and get back to your command line, use the `ctrl-c` command in your terminal.\n\n#### How does it work\n\nThe \"watch\" runner will start a process (using a special filesystem watcher called [Chokidar](https://github.com/paulmillr/chokidar)) that will listen to changes to a list of \"watched\" files. Whenever one of this file is changed/updated (more precisely, is saved to disk) the watch process will trigger a command specified by the user (as an argument passed to the watcher).\n\nIn this example, we have selected all the JSON files in the `tokens` folder (using the glob pattern `tokens/**/*.json`) but you can specify your own path of watched files.\n\nThe command that we automatically run at every update is the `npm run build` command, passed as parameter to the watcher via `-c 'npm run build'`.\n\n#### What to look at\n\nOpen the `package.json` file and see how in the \"scripts\" block there is an additional entry for \"watch\". This is the way the \"watch\" mode is invoked and run.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjackhowa%2Fauto-rebuild-watcher-scss-css","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjackhowa%2Fauto-rebuild-watcher-scss-css","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjackhowa%2Fauto-rebuild-watcher-scss-css/lists"}