{"id":15193961,"url":"https://github.com/markis/strip-whitespace-plugin","last_synced_at":"2025-10-02T08:31:27.529Z","repository":{"id":57372788,"uuid":"85027844","full_name":"markis/strip-whitespace-plugin","owner":"markis","description":"Strip whitespace from strings within javascript files","archived":true,"fork":false,"pushed_at":"2020-04-08T01:35:54.000Z","size":83,"stargazers_count":0,"open_issues_count":2,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-09-24T20:04:13.202Z","etag":null,"topics":["asset-pipeline","minification","performance","webpack","webpack-plugin","webpack2","whitespace"],"latest_commit_sha":null,"homepage":"https://npm.im/strip-whitespace-plugin","language":"TypeScript","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/markis.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-03-15T04:07:02.000Z","updated_at":"2023-10-10T14:45:42.000Z","dependencies_parsed_at":"2022-08-29T14:23:07.487Z","dependency_job_id":null,"html_url":"https://github.com/markis/strip-whitespace-plugin","commit_stats":null,"previous_names":[],"tags_count":12,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/markis%2Fstrip-whitespace-plugin","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/markis%2Fstrip-whitespace-plugin/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/markis%2Fstrip-whitespace-plugin/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/markis%2Fstrip-whitespace-plugin/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/markis","download_url":"https://codeload.github.com/markis/strip-whitespace-plugin/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":219875666,"owners_count":16554697,"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":["asset-pipeline","minification","performance","webpack","webpack-plugin","webpack2","whitespace"],"created_at":"2024-09-27T22:20:49.232Z","updated_at":"2025-10-02T08:31:27.164Z","avatar_url":"https://github.com/markis.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# strip-whitespace-plugin\n\n[![node](https://img.shields.io/node/v/strip-whitespace-plugin.svg)](https://www.npmjs.com/package/strip-whitespace-plugin)\n[![Travis](https://img.shields.io/travis/markis/strip-whitespace-plugin.svg)](https://travis-ci.org/markis/strip-whitespace-plugin)\n[![AppVeyor](https://img.shields.io/appveyor/ci/markis/strip-whitespace-plugin.svg)](https://ci.appveyor.com/project/markis/strip-whitespace-plugin)\n[![Known Vulnerabilities](https://snyk.io/test/github/markis/strip-whitespace-plugin/badge.svg)](https://snyk.io/test/github/markis/strip-whitespace-plugin)\n[![David](https://img.shields.io/david/markis/strip-whitespace-plugin.svg)](https://david-dm.org/markis/strip-whitespace-plugin)\n[![Greenkeeper badge](https://badges.greenkeeper.io/markis/strip-whitespace-plugin.svg)](https://greenkeeper.io/)\n[![Coveralls](https://img.shields.io/coveralls/markis/strip-whitespace-plugin.svg)](https://coveralls.io/github/markis/strip-whitespace-plugin)\n[![Codacy grade](https://img.shields.io/codacy/grade/56982b9998354357beea778664fb2cfe.svg)](https://www.codacy.com/app/markis/strip-whitespace-plugin)\n\nStrip-Whitespace-Plugin is a plugin for webpack that will remove extraneous spaces from strings. It's perfect for working with rendering templates (ex. mustache, handlebars) or es6 javascript templates. It works with anything where you might create very long strings.\n\nThis plugin and the [Strip-Whitespace-Loader](https://npm.im/strip-whitespace-loader) do the same thing. The loader can be applied to specific modules/files/assets. This plugin will strip whitespace on all assets.\n\n##### Before strip-whitespace:\n``` javascript\nfunction() {\n  if (condition) {\n    const longString = '  String   with    some    extra   spaces  ';\n  }\n}\n```\n\n##### After strip-whitespace:\n``` javascript\nfunction() {\n  if (condition) {\n    const longString = ' String with some extra spaces ';\n  }\n}\n```\n\n##### Webpack usage\n\nPut this plugin before your minification plugins (ex. uglify-js)\n\n``` javascript\nvar StripWhitespace = require('strip-whitespace-plugin');\n\nmodule.exports = {\n  ...\n  plugins: [\n    new StripWhitespace(),\n    ...\n    // put your minification plugins here.\n  ]\n  ...\n};\n\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmarkis%2Fstrip-whitespace-plugin","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmarkis%2Fstrip-whitespace-plugin","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmarkis%2Fstrip-whitespace-plugin/lists"}