{"id":22894895,"url":"https://github.com/duzun/gccs","last_synced_at":"2026-05-18T19:02:40.563Z","repository":{"id":57245430,"uuid":"129254549","full_name":"duzun/gccs","owner":"duzun","description":"Vanilla Node.js script to compile JS code/files using Google Closure Compiler Service (zero dependencies)","archived":false,"fork":false,"pushed_at":"2020-06-27T17:12:15.000Z","size":31,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-09-17T23:43:56.129Z","etag":null,"topics":["closure-compiler","closure-compiler-service","google-closure-compiler","minify","minify-javascript","nodejs","optimize-js"],"latest_commit_sha":null,"homepage":"https://closure-compiler.appspot.com/home","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/duzun.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}},"created_at":"2018-04-12T13:20:34.000Z","updated_at":"2020-06-27T17:12:17.000Z","dependencies_parsed_at":"2022-09-01T06:30:19.540Z","dependency_job_id":null,"html_url":"https://github.com/duzun/gccs","commit_stats":null,"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"purl":"pkg:github/duzun/gccs","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/duzun%2Fgccs","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/duzun%2Fgccs/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/duzun%2Fgccs/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/duzun%2Fgccs/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/duzun","download_url":"https://codeload.github.com/duzun/gccs/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/duzun%2Fgccs/sbom","scorecard":{"id":360638,"data":{"date":"2025-08-11","repo":{"name":"github.com/duzun/gccs","commit":"6983214cdcb27914801b19d63d931ccfc7289262"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":3,"checks":[{"name":"Dangerous-Workflow","score":-1,"reason":"no workflows found","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Code-Review","score":0,"reason":"Found 0/20 approved changesets -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Token-Permissions","score":-1,"reason":"No tokens found","details":null,"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"SAST","score":0,"reason":"no SAST tool detected","details":["Warn: no pull requests merged into dev branch"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Pinned-Dependencies","score":-1,"reason":"no dependencies found","details":null,"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: MIT License: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Vulnerabilities","score":10,"reason":"0 existing vulnerabilities detected","details":null,"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'master'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}}]},"last_synced_at":"2025-08-18T10:46:23.008Z","repository_id":57245430,"created_at":"2025-08-18T10:46:23.008Z","updated_at":"2025-08-18T10:46:23.008Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279011187,"owners_count":26084900,"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","status":"online","status_checked_at":"2025-10-12T02:00:06.719Z","response_time":53,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":["closure-compiler","closure-compiler-service","google-closure-compiler","minify","minify-javascript","nodejs","optimize-js"],"created_at":"2024-12-13T23:27:26.211Z","updated_at":"2025-10-12T11:51:19.684Z","avatar_url":"https://github.com/duzun.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"\n# gccs == google-closure-compliler-service [![Build Status](https://travis-ci.org/duzun/gccs.svg?branch=master)](https://travis-ci.org/duzun/gccs) [![npm version](https://badge.fury.io/js/gccs.svg)](https://badge.fury.io/js/gccs)\n\nVanilla Node.js script to compile JS code using \nGoogle's [Closure Compiler Service](https://closure-compiler.appspot.com/home) (zero dependencies).\n\n## Install\n\nYou can install `gccs` either as a global CLI script or per project.\n\n```sh\n# global\nnpm i -g gccs\n\n# in project\nnpm i gccs\n```\n\n\n## Usage\n\nActually, there is no real need to install it if you have `npx` (default with `npm@5.2.0` and up).\nJust call it with `npx gccs input.js`\n\n### CLI\n\n```sh\n# Show CLI help\ngccs --help\n\n# Compile input.js and save output as input.min.js\ngccs input.js\n\n# Compile input.js to output.min.js\ngccs input.js output.min.js\n\n# Output compiled JS to console (stdout)\ngccs input.js -\n\n# With options. When https == false, it might be faster. Other options go to GCC service\ngccs --https false --compilation_level WHITESPACE_ONLY --formatting pretty_print -- input.es6.js output.es5.js\n\n# Pipe\ncat input.js | gccs\ncat input.js | gccs - output.min.js\n\n# Compile a node.js CLI script (gccs preserves shebang of my-cli.js)\ngccs my-cli.js my-cli \u0026\u0026 chmod +x my-cli\n\n# Compile a node.js CLI script and add shebang\n# Note: Use this when my-cli.js doesn't already contain the shebang\n(echo '#!/usr/bin/env node' \u0026\u0026 gccs my-cli.js -) \u003e my-cli \u0026\u0026 chmod +x my-cli\n```\n\n#### package.json\n\nFor a small JS/ES6 library `gccs` could be sufficient as a build script.\nHere is an example of `build` command for `package.json`\nof [verup](https://github.com/duzun/verup) library:\n\n```js\n...\n\"scripts\": {\n  \"es5\": \"gccs --compilation_level WHITESPACE_ONLY --formatting pretty_print -- verup.js dist/verup.js\",\n  \"min\": \"gccs --compilation_level SIMPLE_OPTIMIZATIONS -- dist/verup.js dist/verup.min.js\",\n  \"build\": \"npm run es5 \u0026\u0026 npm run min\"\n  ...\n}\n...\n```\n\nThis build command would produce the ES5 version of `verup.js` at `dist/verup.js`\nand the minified ES5 version at `dist/verup.min.js`.\nIsn't that cool? :-)\n\n\n### Node module\n\n```js\nconst gccs = require(\"gccs\");\n\n// Compile some JS as a string\nvar js_code = \"var my = 'owesome'; // script\";\ngccs(js_code, function (error, minjs) {\n    if ( error ) return console.error(error);\n    console.log(minjs); // minified js_code\n});\n\n// Compile string JS with some options\ngccs({js_code: js_code, compilation_level: 'WHITESPACE_ONLY'}, function (error, minjs) {\n    if ( error ) return console.error(error);\n    console.log(minjs); // js_code w/o whitespaces\n});\n\n// Compile a JS file\ngccs.file('input.js', function (error, minjs) {\n    if ( error ) return console.error(error);\n    console.log(minjs); // minified contents of 'input.js'\n})\n\n// Compile a JS file and output to console (stdout)\ngccs.file('input.js', '-', function (error, minjs) {})\n// or\ngccs.file('input.js', process.stdout, function (error, minjs) {})\n\n\n// Compile a JS file (stream in)\nvar _in = fs.createReadStream('input.js');\ngccs(_in, function (error, minjs) {\n    if ( error ) return console.error(error);\n    console.log(minjs); // minified contents of 'input.js'\n});\n\n// Compile a JS file and save output to another file (stream in and out)\nvar _in = fs.createReadStream('input.js');\nvar _out = fs.createWriteStream('output.min.js');\ngccs.file(_in, _out, function (error) {})\n\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fduzun%2Fgccs","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fduzun%2Fgccs","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fduzun%2Fgccs/lists"}