{"id":29195498,"url":"https://github.com/WebReflection/npm-dollar","last_synced_at":"2025-07-02T05:04:37.369Z","repository":{"id":65993241,"uuid":"136303882","full_name":"WebReflection/npm-dollar","owner":"WebReflection","description":"A package.json scripts helper.","archived":false,"fork":false,"pushed_at":"2023-12-21T17:45:11.000Z","size":21,"stargazers_count":22,"open_issues_count":1,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-06-09T20:03:06.403Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"isc","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/WebReflection.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,"governance":null,"roadmap":null,"authors":null,"dei":null}},"created_at":"2018-06-06T09:16:05.000Z","updated_at":"2024-03-18T13:15:08.000Z","dependencies_parsed_at":"2024-02-01T16:28:24.390Z","dependency_job_id":"c1038163-b321-493c-9765-8fca0842da9b","html_url":"https://github.com/WebReflection/npm-dollar","commit_stats":{"total_commits":45,"total_committers":2,"mean_commits":22.5,"dds":0.1333333333333333,"last_synced_commit":"d828dab25ba08c0ccae90967ea624c2c61116752"},"previous_names":["webreflection/node-dollar"],"tags_count":21,"template":false,"template_full_name":null,"purl":"pkg:github/WebReflection/npm-dollar","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/WebReflection%2Fnpm-dollar","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/WebReflection%2Fnpm-dollar/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/WebReflection%2Fnpm-dollar/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/WebReflection%2Fnpm-dollar/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/WebReflection","download_url":"https://codeload.github.com/WebReflection/npm-dollar/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/WebReflection%2Fnpm-dollar/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":261003209,"owners_count":23095683,"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":[],"created_at":"2025-07-02T05:04:35.175Z","updated_at":"2025-07-02T05:04:37.355Z","avatar_url":"https://github.com/WebReflection.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# npm-dollar\n\nA `package.json` scripts helper.\n\n### New in V2\n\n`npm-dollar` is now super greedy in exiting the execution as soon as something goes wrong.\n\n### wut\n\nIt simplifies organization of `package.json` scripts using `bash`, instead of `sh`, and passing escaped arguments all along.\n\nFollowing a configuration example:\n\n```js\n// inside the package.json file\n{\n  \"devDependencies\": {\n    \"npm-dollar\": \"latest\"\n  },\n  \"scripts\": {\n    \"$\": \"npm-dollar\"\n  },\n  \"$\": {\n    \"cat\": {\n      \"some\": \"cat $1\"\n    },\n    \"lint\": {\n      \"js\": [\n        // single line bash comments are allowed too\n        \"# !production is needed to avoid issue in CI\",\n        \"!production eslint index.js\"\n      ]\n    },\n    \"bash\": {\n      \"ls\": \"ls\"\n    },\n    \"complex\": [\n      // each entry is joined as \u0026\u0026\n      \"export TEST=123\",\n      \"echo $TEST\",\n      // arrays per line are joined via space\n      [\n        \"ls $TEST;\",\n        \"cat $TEST\"\n      ]\n    ]\n  }\n}\n```\n\nThis is how you'd use those scripts\n\n```sh\n# regular execution\nnpm run $ cat.some file.js\n\n# or passing along all arguments\nnpm run $ -- bash.ls -la\n\n# or skipping production\nnpm --production run $ lint\n```\n\nWhen either `--production`, `--prod`, or `--only=production` and `--only=prod` _npm_ flags are used, any command that start with either `!prod` or `!production` (read as _not production_) would simply be ignored.\n\nThe End.\n\n### Windows users\n\nAs long as there is a `bash` environment you should be good to go (WLS, Git for Windows, others).\n\nIf not, consider [installing chocolatey](https://chocolatey.org/install) and then do `choco install git` to be able to use `bash` with, or without, the git shell.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FWebReflection%2Fnpm-dollar","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FWebReflection%2Fnpm-dollar","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FWebReflection%2Fnpm-dollar/lists"}