{"id":26921720,"url":"https://github.com/yangfan2016/yan-compressor","last_synced_at":"2026-04-13T20:02:27.073Z","repository":{"id":57403065,"uuid":"136436003","full_name":"Yangfan2016/yan-compressor","owner":"Yangfan2016","description":"The compressor based UglifyJS and UglifyCSS","archived":false,"fork":false,"pushed_at":"2018-10-28T09:18:50.000Z","size":1700,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-05-28T15:53:03.794Z","etag":null,"topics":["compress","node-cli","nodejs","npm-package","toolkit","yarn"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Yangfan2016.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-06-07T07:03:47.000Z","updated_at":"2018-10-28T09:18:51.000Z","dependencies_parsed_at":"2022-08-28T03:40:25.345Z","dependency_job_id":null,"html_url":"https://github.com/Yangfan2016/yan-compressor","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Yangfan2016%2Fyan-compressor","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Yangfan2016%2Fyan-compressor/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Yangfan2016%2Fyan-compressor/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Yangfan2016%2Fyan-compressor/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Yangfan2016","download_url":"https://codeload.github.com/Yangfan2016/yan-compressor/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246730282,"owners_count":20824396,"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":["compress","node-cli","nodejs","npm-package","toolkit","yarn"],"created_at":"2025-04-01T23:37:27.821Z","updated_at":"2026-04-13T20:02:27.046Z","avatar_url":"https://github.com/Yangfan2016.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"## yan-compressor ![NPM version](https://img.shields.io/npm/v/yan-compressor.svg?style=flat)\n\nThe compressor based on UglifyJS and UglifyCSS\n\n### Installation\n```bash\n$ npm install yan-compressor\n```\n\n### API\n\nFirst, create the file \"json\" in the root directory\n\n```js\n[\n    // The config of js\n    {\n        \"entry\": [ // entry :string[]\n            \"./examples/libs/jquery.js\",\n            \"./examples/libs/vue.js\"\n        ],\n        \"output\": {\n            \"filename\": \"vendor.min.js\",\n            \"path\": \"./examples/compress/js\"\n        },\n        \"sourceMap\": true // make map file of js\n    },\n    // The config of CSS\n    {\n        \"entry\": [ // entry :string[]\n            \"./examples/css/font-awesome.css\"\n        ],\n        \"output\": {\n            \"filename\": \"app.min.css\",\n            \"path\": \"./examples/compress/css\"\n        },\n        \"convertRelativePath\": true, // convert to relative url for source css\n        \"convertFontToBase64\": { // convert font|image to base64 \n            \"types\": [\".woff2\", \".woff\"],\n            \"limit\": 204800\n        }\n    }\n]\n```\n\nThen execute the following command\n\n```bash\n$ compress\n```\n\nIf you just want to compress part of files, execute the following command\n\n```bash\n$ compress -css\n```\n\n```bash\n$ compress -js\n```\n\n### Contributing\n- Fork this Repo first\n- Clone your Repo\n- Install dependencies by `$ npm install`\n- Checkout a feature branch\n- Feel free to add your features\n- Make sure your features are fully tested\n- Publish your local branch, Open a pull request\n- Enjoy hacking \u003c3\n\n### MIT license\nCopyright (c) 2018 Yangfan\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \u0026quot;Software\u0026quot;), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in\nall copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \u0026quot;AS IS\u0026quot;, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\nTHE SOFTWARE.\n\n---\nbuilt upon love by [docor](https://github.com/turingou/docor.git) v0.3.0\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyangfan2016%2Fyan-compressor","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fyangfan2016%2Fyan-compressor","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyangfan2016%2Fyan-compressor/lists"}