{"id":21849713,"url":"https://github.com/steel1990/compressor","last_synced_at":"2025-03-21T17:44:52.699Z","repository":{"id":15127765,"uuid":"17854848","full_name":"steel1990/compressor","owner":"steel1990","description":"compressor is a tool can minify html,js and css","archived":false,"fork":false,"pushed_at":"2014-08-07T04:10:24.000Z","size":1048,"stargazers_count":0,"open_issues_count":1,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-02-27T14:28:13.387Z","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":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/steel1990.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}},"created_at":"2014-03-18T05:28:17.000Z","updated_at":"2014-07-04T10:48:50.000Z","dependencies_parsed_at":"2022-09-10T19:22:54.887Z","dependency_job_id":null,"html_url":"https://github.com/steel1990/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/steel1990%2Fcompressor","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/steel1990%2Fcompressor/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/steel1990%2Fcompressor/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/steel1990%2Fcompressor/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/steel1990","download_url":"https://codeload.github.com/steel1990/compressor/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244842746,"owners_count":20519685,"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":"2024-11-28T00:14:11.900Z","updated_at":"2025-03-21T17:44:52.676Z","avatar_url":"https://github.com/steel1990.png","language":"JavaScript","readme":"easy-compressor\n=====\neasy-compressor is a tool can minify html,js and css very easy.\n\nhtml minify is use [htmlcompressor](https://code.google.com/p/htmlcompressor/),all configs are valid.\n\ncss and js minify is use [yuicompressor](http://yui.github.io/yuicompressor/),all configs are valid too.\n\n## How To Use\n\n    var compressor = require('easy-compressor');\n    var path = require('path');\n    var fs = require('fs');\n\n    // minify html by path\n    compressor(path.join(__dirname, './index.html'), {\n        'remove-intertag-spaces': true,\n        'simple-bool-attr': true,\n        'compress-js': true,\n        'compress-css': true,\n        'output': path.join(__dirname,'./xx.html')\n    }, function (err) {\n        console.log('minify done');\n    });\n\n    // minify js by string\n    var js = fs.readFileSync('./run.js').toString();\n    compressor(js, {\n        'fromString': true,\n        'type': 'js',\n        'line-break': 80\n    }, function (err, code) {\n        console.log(code);\n    });\n\n    // minify js by path\n    var jsPath = path.join(__dirname, './run.js');\n    compressor(jsPath, {\n        'type': 'js',\n        'line-break': 80,\n        'o': path.join(__dirname,'./xx.js')\n    }, function (err) {\n        console.log('minify done');\n    });\n\n    // minify css by string\n    var css = fs.readFileSync('./style.css').toString();\n    compressor(css, {\n        'fromString': true,\n        'type': 'css',\n        'line-break': 80\n    }, function (err, code) {\n        console.log(code);\n    });\n\n    // minify css by path\n    var cssPath = path.join(__dirname, './style.css');\n    compressor(cssPath, {\n        'type': 'css',\n        'line-break': 80\n    }, function (err, code) {\n        console.log(code);\n    });","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsteel1990%2Fcompressor","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsteel1990%2Fcompressor","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsteel1990%2Fcompressor/lists"}