{"_id":"@bsunderhus/swc-plugin-de-indent-template-literal","_rev":"2-fa10fcc24de84b87cc9bf7de043fba3e","name":"@bsunderhus/swc-plugin-de-indent-template-literal","dist-tags":{"latest":"0.1.1"},"versions":{"0.1.0":{"name":"@bsunderhus/swc-plugin-de-indent-template-literal","version":"0.1.0","description":"SWC plugin for removing indentation of template literals","author":{"name":"Bernardo Sunderhus","email":"bernardo.sunderhus@gmail.com"},"license":"ISC","keywords":["swc-plugin"],"main":"swc_plugin_de_indent_template_literal.wasm","scripts":{"build":"cargo build-wasi --release","prepack":"npm run build && cp target/wasm32-wasi/release/swc_plugin_de_indent_template_literal.wasm ."},"_id":"@bsunderhus/swc-plugin-de-indent-template-literal@0.1.0","gitHead":"549af039d3d53763bb8158d93dddd97a36d77fb8","_nodeVersion":"20.5.0","_npmVersion":"9.8.1","dist":{"integrity":"sha512-Y3yCvpLVzQyeb8vthJTzQwZT2d7DfjsfCPg/sET9xRZHRVjWL0S/fwbOuBREHhU3R1CSe36o/ZejnhXuAz6MeQ==","shasum":"191063e25dd82c78f40a2c82a0c1a924a8fbe637","tarball":"https://registry.npmjs.org/@bsunderhus/swc-plugin-de-indent-template-literal/-/swc-plugin-de-indent-template-literal-0.1.0.tgz","fileCount":3,"unpackedSize":636632,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIADSkkhzvEb/1Uw+88yEUiemminuTBsR//4clhcHd2BpAiBPkrujSFPvry8+DMm9Tq3MCCx0hlPMENx+H2ke7vQkGA=="}]},"_npmUser":{"name":"bsunderhus","email":"bernardo.sunderhus@gmail.com"},"directories":{},"maintainers":[{"name":"bsunderhus","email":"bernardo.sunderhus@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/swc-plugin-de-indent-template-literal_0.1.0_1692964395801_0.47409802069217744"},"_hasShrinkwrap":false,"deprecated":"Package no longer supported. Contact Support at https://www.npmjs.com/support for more info."},"0.1.1":{"name":"@bsunderhus/swc-plugin-de-indent-template-literal","version":"0.1.1","description":"SWC plugin for removing indentation of template literals","author":{"name":"Bernardo Sunderhus","email":"bernardo.sunderhus@gmail.com"},"license":"ISC","keywords":["swc-plugin"],"main":"swc_plugin_de_indent_template_literal.wasm","scripts":{"build":"cargo build-wasi --release","prepack":"npm run build && cp target/wasm32-wasi/release/swc_plugin_de_indent_template_literal.wasm ."},"_id":"@bsunderhus/swc-plugin-de-indent-template-literal@0.1.1","gitHead":"5e94631331ff4cb04e6c43808bd7fef05f31b000","_nodeVersion":"20.5.0","_npmVersion":"9.8.1","dist":{"integrity":"sha512-+Mjm0g5xaeVI4yL5a/7pdL1nLyfLhyU29hIkfWXgEqtE1EPo9xmINTkwgTJfKuUBsv1Lc+tbA80HBNI5vcXiBA==","shasum":"b74f4d4fb7d03f2b88e145ef57acf17806203627","tarball":"https://registry.npmjs.org/@bsunderhus/swc-plugin-de-indent-template-literal/-/swc-plugin-de-indent-template-literal-0.1.1.tgz","fileCount":3,"unpackedSize":635231,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIHqstDqLcJBHzDWpHGnhC3YV2Bpic75U90OYi7jjzvNpAiEA+RdY5aWotL7lKcBiBnWCgfjBPql+8Ls6QNfrP5GBUHc="}]},"_npmUser":{"name":"bsunderhus","email":"bernardo.sunderhus@gmail.com"},"directories":{},"maintainers":[{"name":"bsunderhus","email":"bernardo.sunderhus@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/swc-plugin-de-indent-template-literal_0.1.1_1693486414289_0.9410550950303556"},"_hasShrinkwrap":false,"deprecated":"Package no longer supported. Contact Support at https://www.npmjs.com/support for more info."}},"time":{"created":"2023-08-25T11:53:15.704Z","0.1.0":"2023-08-25T11:53:16.049Z","modified":"2024-01-29T15:03:52.203Z","0.1.1":"2023-08-31T12:53:34.526Z"},"maintainers":[{"name":"bsunderhus","email":"bernardo.sunderhus@gmail.com"}],"description":"SWC plugin for removing indentation of template literals","keywords":["swc-plugin"],"author":{"name":"Bernardo Sunderhus","email":"bernardo.sunderhus@gmail.com"},"license":"ISC","readme":"## `@bsunderhus/swc-plugin-de-indent-template-literal`\n\n## Usage\n\nThis plugin is used to de-indent template literal,\nvery useful for logging errors and warns.\n\n```js\n// BEFORE\nfunction someFunction() {\n  console.log(/** #__DE-INDENT__ */ `\n    <div>\n      <p>hello</p>\n    </div>\n  `);\n}\nsomeFunction();\n//    <div>\n//      <p>hello</p>\n//    </div>\n\n// AFTER\nfunction someFunction() {\n  console.log(`<div>\n  <p>hello</p>\n</div>`);\n}\nsomeFunction();\n// <div>\n//   <p>hello</p>\n// </div>\n```\n\n#### Setup\n\n```sh\nnpm install --save-dev @bsunderhus/swc-plugin-de-indent-template-literal @swc/core\n```\n\nThen update your `.swcrc` file like below:\n\n```json\n{\n  \"jsc\": {\n    \"experimental\": {\n      \"plugins\": [\"@bsunderhus/swc-plugin-de-indent-template-literal\"]\n    }\n  }\n}\n```\n\n#### Options\n\n##### `indentStyle`\n\nIf your project uses tab instead of space, you can set `indentStyle` to `tab`.\n\n- Type: `string`\n- Default: `space`\n- Valid values: `space`, `tab`\n\nexample:\n\n```json\n{\n  \"jsc\": {\n    \"experimental\": {\n      \"plugins\": [\n        [\n          \"@bsunderhus/swc-plugin-de-indent-template-literal\",\n          {\n            \"indentStyle\": \"tab\"\n          }\n        ]\n      ]\n    }\n  }\n}\n```\n\n##### `tag`\n\nIf you want to use a custom tag instead of `#__DE-INDENT__`, you can set `tag` to your custom tag.\n\n- Type: `string`\n- Default: `#__DE-INDENT__`\n- Valid values: any string\n\nexample:\n\n```json\n{\n  \"jsc\": {\n    \"experimental\": {\n      \"plugins\": [\n        [\n          \"@bsunderhus/swc-plugin-de-indent-template-literal\",\n          {\n            \"tag\": \"de-indent\"\n          }\n        ]\n      ]\n    }\n  }\n}\n```\n\n```js\n// BEFORE\nfunction someFunction() {\n  console.log(/** de-indent */ `\n    <div>\n      <p>hello</p>\n    </div>\n  `);\n}\nsomeFunction();\n//    <div>\n//      <p>hello</p>\n//    </div>\n\n// AFTER\nfunction someFunction() {\n  console.log(`<div>\n  <p>hello</p>\n</div>`);\n}\nsomeFunction();\n// <div>\n//   <p>hello</p>\n// </div>\n```\n","readmeFilename":"README.md"}