{"_id":"@astropub/config-to-alias","_rev":"3-f6785643493f92d2ad79b1da3daa6afd","name":"@astropub/config-to-alias","dist-tags":{"latest":"1.0.1"},"versions":{"0.1.0":{"name":"@astropub/config-to-alias","description":"Add aliasing support to Vite from tsconfig.json or jsconfig.json files","type":"module","version":"0.1.0","exports":{".":{"import":"./config-to-alias.js","types":"./config-to-alias.d.ts","require":"./config-to-alias.cjs"}},"main":"config-to-alias.js","types":"config-to-alias.d.ts","dependencies":{"tsconfig-resolver":"^3"},"license":"CC0-1.0","keywords":["alias","aliases","astro","astro-plugin","config","configuration","file","files","import","imports","path","paths","plugin","javascript","js","jsconfig","json","resolve","script","ts","tsconfig","typescript","vite","vite-plugin"],"scripts":{"release":"npm publish --access public"},"repository":{"type":"git","url":"git+https://github.com/astro-community/config-to-alias.git"},"bugs":{"url":"https://github.com/astro-community/config-to-alias/issues"},"homepage":"https://github.com/astro-community/config-to-alias/#readme","devDependencies":{"typescript":"^4.9.5","vite":"^4.1.4"},"peerDependencies":{"vite":"^4"},"prettier":{"singleQuote":true,"useTabs":true},"gitHead":"18af7ae822f48be7eb29d54ed829530c0313409a","_id":"@astropub/config-to-alias@0.1.0","_nodeVersion":"18.12.1","_npmVersion":"8.19.2","dist":{"integrity":"sha512-Xm0eDdD/oJOLKk1rhaSnGUNXdxCaUVE+3FxbWUS18I00ImiVDj84+ZlUwOF0BrpXs980be/73OKD88tzO22zSA==","shasum":"6209fbeeb56d04c87ca9cd8c6d935f5e7b782c57","tarball":"https://registry.npmjs.org/@astropub/config-to-alias/-/config-to-alias-0.1.0.tgz","fileCount":3,"unpackedSize":4904,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCdF5jqdsqm9epFbc8mxEic0Y5RiA1Lg2yFL1EQCfC82gIhALkkGfGtj9FSmL2sXCillzbPYQSGLUSInLh/gAw06SMk"}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJj/1/AACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmoEDw//VVOeP69dcTRz5jODWCZgrktz+EldLTBl5i3UlsPRPuzk7Pcd\r\nQWV1im2JQ+CujIkaZXbu/Ww0T13mprIGUjkDKkQyg4Q4d5Td2BIurRc6lzpv\r\nBA3Q3Cc3+NQSi2Vo5eXc1NT5pRc2Pq4wxgqpdH4lP2VJfDOHTR869beovFzn\r\ni6c9E5m0826RQxuE3CVKQ768yAP1ZEZi/5q3e6d3CvTegA/xf+Axm2wghbMW\r\ndyvlAbJZLQgxhILJDYo2L6fsU3CEMbUzsB+yGIv5yheMNVURhSPLpajZxFMo\r\nwAJ56Q7UTCyIjeq2lYEWPO5gJ1PVoDcSvCT5RCSvFvaslpdNiXhaZCtAvjiF\r\nsVnY7/tS2/b1PvgKy/ZVVORibqkIUIn6q6qHKXPChqKJ0x3wUI/AuTz2fELt\r\neLOEnV4/+xTG0d5LhY3HDE2G7K0cUuruH1eOqndjuxx/GDWMZW/RVsFSZY6T\r\nVnNmXjOfaweZNr74t7nAUmCwRbrePG+vEs81dravvZfOtTUaL3oN/nlXD9TN\r\n6xNTIDq4bprGx4GLaRGtw9hYs016muj1GIr1+wjC6gb2Woi9qOmWbWxX/xQO\r\nkxrQrbXa1pf9zeT1Qv7n5soQMNYgIULhO6v9gxHIffRklE9NAk8zuSPO3mcN\r\nKuFYEUebGSMG5M0pfPCS3Q7aWtWAcJUG7IY=\r\n=W+As\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"jonathantneal","email":"jonathantneal@hotmail.com"},"directories":{},"maintainers":[{"name":"jonathantneal","email":"jonathantneal@hotmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/config-to-alias_0.1.0_1677680576009_0.3186141592791447"},"_hasShrinkwrap":false},"0.1.1":{"name":"@astropub/config-to-alias","description":"Add aliasing support to Vite from tsconfig.json or jsconfig.json files","type":"module","version":"0.1.1","exports":{".":{"import":"./config-to-alias.js","types":"./config-to-alias.d.ts","require":"./config-to-alias.cjs"}},"main":"config-to-alias.js","types":"config-to-alias.d.ts","dependencies":{"tsconfig-resolver":"^3"},"license":"CC0-1.0","keywords":["alias","aliases","astro","astro-plugin","config","configuration","file","files","import","imports","path","paths","plugin","javascript","js","jsconfig","json","resolve","script","ts","tsconfig","typescript","vite","vite-plugin"],"scripts":{"release":"npm publish --access public"},"repository":{"type":"git","url":"git+https://github.com/astro-community/config-to-alias.git"},"bugs":{"url":"https://github.com/astro-community/config-to-alias/issues"},"homepage":"https://github.com/astro-community/config-to-alias/#readme","devDependencies":{"typescript":"^4.9.5","vite":"^4.1.4"},"peerDependencies":{"vite":"^4"},"prettier":{"singleQuote":true,"useTabs":true},"gitHead":"214e8ba396442fe27264c0493972903be4e65edb","_id":"@astropub/config-to-alias@0.1.1","_nodeVersion":"18.12.1","_npmVersion":"8.19.2","dist":{"integrity":"sha512-Z6A9WSs06AVaR3ETgjCXhtkOrq8IDcGx0jKbu6wuDGNu/FRgXWOVREDHFB/R9gZFzc+X7kKmJlrAMehiitf4GA==","shasum":"aca06d625269c326429aa7f9d0a296e9e6af0996","tarball":"https://registry.npmjs.org/@astropub/config-to-alias/-/config-to-alias-0.1.1.tgz","fileCount":5,"unpackedSize":7910,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIB+8G1wEIMtbzcsL0J/gml94Qk7oRmS92jU8mBDNkkFDAiEAwhPtAMT6GCxAx6qwHQjJZDua7W8VYZLIJtBF06jDvLo="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJj/2BRACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmr0AxAAopZjzapZcPNExNSOMVxP/a4ScEMOwAcbzUWM5Wg/+h2aaLTv\r\n1AzGsIlRluPSFXPV4scZweZ8acAs/77ob4n96blPnQJpGNZqdwZ1lTmmQsur\r\nViZb1smW9KK/iPUDaUImiS8jSrxHrRF1GC0lnqE+Ogs+AmtoBoTmw8+kSi99\r\nbtpaps8NOsnCRAcz5SwTwnleSwxLKJIy2WfwwuxtmrbYQSsJIMUYVCkI5YfG\r\nTgHn/qa1hvJknqenDBZQWVh6AYW6G5Vc7bEInWJ5fPEtEv0dWWu5SmmQpUWH\r\nYzXTwcLYaNh7wRd5Az186bJcFsDRJ6Hklud1k/9+Qq9bo2CLkhl6D4Shad7m\r\nv8xkJQMar5tRkV2UWfnBxYufI9jwOrqiaDV9w6g6ttF9qxQBO3sixj0fhczf\r\niFaNgAJ1STy5Ep4SFk8om31vwQzdYjBtI+Rw9yt63DE05ry9TQZ5nMux3NAr\r\nfgZKSfQpsJeJeOgQr3WUMYNC4mOPc+0t8dOGsjpvapWU4UBkXePaJXB399i5\r\nLTeDQoBxQWHBx/aAKKnBgNZzTtq2QTjEd4ZIIbTGlnu8uMk4jbxnD+0DZTjl\r\nLImMqpw1y+Kg/8ClMFXGIUKS7irFgQad54/NPGphLmLlx85xnUfETaYFxsLD\r\ntk2QaiAEO47wR9N4xeks/15kDrKaXxNDDbw=\r\n=9RUf\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"jonathantneal","email":"jonathantneal@hotmail.com"},"directories":{},"maintainers":[{"name":"jonathantneal","email":"jonathantneal@hotmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/config-to-alias_0.1.1_1677680721525_0.39026834457013915"},"_hasShrinkwrap":false},"1.0.0":{"name":"@astropub/config-to-alias","description":"Add aliasing support to Astro, JavaScript, TypeScript, and CSS files from tsconfig.json or jsconfig.json","type":"module","version":"1.0.0","exports":{".":{"import":"./config-to-alias.js","types":"./config-to-alias.d.ts","require":"./config-to-alias.cjs"}},"main":"config-to-alias.js","types":"config-to-alias.d.ts","dependencies":{"tsconfig-resolver":"^3"},"license":"CC0-1.0","keywords":["alias","aliases","astro","astro-plugin","config","configuration","file","files","import","imports","path","paths","plugin","javascript","js","jsconfig","json","renderer","resolve","script","ts","tsconfig","typescript","vite","vite-plugin","withastro"],"scripts":{"release":"npm publish --access public"},"repository":{"type":"git","url":"git+https://github.com/astro-community/config-to-alias.git"},"bugs":{"url":"https://github.com/astro-community/config-to-alias/issues"},"homepage":"https://github.com/astro-community/config-to-alias/#readme","devDependencies":{"astro":"^2.1.3","typescript":"^4.9.5","vite":"^4.1.4"},"peerDependencies":{"vite":"^4"},"prettier":{"singleQuote":true,"useTabs":true},"gitHead":"2c9d386304b1754a8f1e36ce28146ecda8b0c307","_id":"@astropub/config-to-alias@1.0.0","_nodeVersion":"18.12.1","_npmVersion":"8.19.2","dist":{"integrity":"sha512-hvp3eBcLcN1utXApSxQf/UU9tNDQYYrdzOg+qiyo+EjNiO+t8OX6YW3IZE9OLmpZ1nTl+ZiEux72abzgR5DF6A==","shasum":"755e51d487cb01f2c743dfef0a10c3fa6bb63934","tarball":"https://registry.npmjs.org/@astropub/config-to-alias/-/config-to-alias-1.0.0.tgz","fileCount":5,"unpackedSize":9525,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIAfOqAFq8y2licVlDg1C3v/d05XGbdkKVLdUKKrDE5gHAiBmF6mcVSw9nMF/icZkgnFoJNqyNk65weiFZAsPIcRIlQ=="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJkEqfRACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmpKQRAAhY4G+cGTTEgPOISwPM/GIOTk+OO4MQw4uuQ3ELA1uBGc8KZX\r\nWarzyO3lJ4qJwsLOQmKwape0tCSkBd+D9h82A+E7q/TYgtlqR6WCfBjg78YE\r\ni2zHXUTnfuzGaeM9NhLR/LDJhiazaKL3XW4b1xPwa3UHsvRDVka8ztkI8CRh\r\nm2csSq3k2j8hYwdlhTw8OPZAoPQeL5whqrddu1cawxWrawQjIvgYoFl4BPhr\r\niSCx2ar2iP83VIRW6VLf6JW68xv9s0nskKhP/GDOwmEEW7FpCG+uA8atakbf\r\nmpkKs69H0LepWArWVO78pJ1vQEFqrnzSqa0+85LNYCgssMbWApht7p7Nbsgh\r\nvodvPrQKd6ggdInsflDSncsodPw1F2rfcdSSEk1MzO0I7xTn/xuEZqiyWIWq\r\n1V4N15p+qQSY1Sc/L/+KKAGx5/xEhMUNFRa9DHysSJpsTaE97F8U9GtFfuHn\r\nv0JTTkwHDashjpVydfOAM8J1psA1ftTMRE0hEkNhpZ29eRXj5JHDyM+nSQ1M\r\nbzuX9bxWYfGyDYDOs76GkGIAcNges+/K1I6UZyHg3xQnIGYP25v+kh240TBj\r\nTKQg50pGOVXSNuZz1OdS+HoTd4Ns+epM1c73GDlPcHyOgZ0VLKEIHOVf8Qf+\r\nrGfA/pfdEH0K/O3kjteNJ0KMKtLEs9SkzPM=\r\n=uEuz\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"jonathantneal","email":"jonathantneal@hotmail.com"},"directories":{},"maintainers":[{"name":"jonathantneal","email":"jonathantneal@hotmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/config-to-alias_1.0.0_1678944209060_0.334831289838891"},"_hasShrinkwrap":false},"1.0.1":{"name":"@astropub/config-to-alias","description":"Add aliasing support to Astro, JavaScript, TypeScript, and CSS files from tsconfig.json or jsconfig.json","type":"module","version":"1.0.1","exports":{".":{"import":"./lib/config-to-alias.js","types":"./lib/config-to-alias.d.ts","require":"./lib/config-to-alias.cjs"},"./astro":{"import":"./lib/config-to-alias-astro-integration.js","types":"./lib/config-to-alias-astro-integration.d.ts","require":"./lib/config-to-alias-astro-integration.cjs"},"./vite":{"import":"./lib/config-to-alias-vite-plugin.js","types":"./lib/config-to-alias-vite-plugin.d.ts","require":"./lib/config-to-alias-vite-plugin.cjs"},"./package.json":{"default":"./package.json"}},"main":"config-to-alias.js","types":"config-to-alias.d.ts","dependencies":{"tsconfig-resolver":"^3"},"license":"CC0-1.0","keywords":["alias","aliases","astro","astro-plugin","config","configuration","file","files","import","imports","path","paths","plugin","javascript","js","jsconfig","json","renderer","resolve","script","ts","tsconfig","typescript","vite","vite-plugin","withastro"],"scripts":{"release":"npm publish --access public"},"repository":{"type":"git","url":"git+https://github.com/astro-community/config-to-alias.git"},"bugs":{"url":"https://github.com/astro-community/config-to-alias/issues"},"homepage":"https://github.com/astro-community/config-to-alias/#readme","devDependencies":{"astro":"^2.1.3","typescript":"^4.9.5","vite":"^4.1.4"},"peerDependencies":{"vite":"^4"},"prettier":{"singleQuote":true,"useTabs":true},"gitHead":"5e1d651ef81f5cb3c79911144f374f764e563527","_id":"@astropub/config-to-alias@1.0.1","_nodeVersion":"18.12.1","_npmVersion":"8.19.2","dist":{"integrity":"sha512-EgtXLol1m+d6n2X+3BZn/hHDlh+M0UVKm5bTtYyD8HzwASaXu5AzmkBQlBTCUHVhwmKca0M8VzBq6blVDMg+jw==","shasum":"4db9658777e06730b31deee57431dd648ed6714b","tarball":"https://registry.npmjs.org/@astropub/config-to-alias/-/config-to-alias-1.0.1.tgz","fileCount":11,"unpackedSize":11317,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCICyFzC4D6XHm+Qg3YhV9U3DhtpwYvx6B1LbdOvg83wh0AiEA2yNXMEFdsrvcQfDbnlUvTe6FIUsOCFmMKN2B7nv9fok="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJkEqxfACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmoViA//c9k458fFv96dW2cNgjM0Pzl6kk5y11mRPQx/fEJu8yFAEJ/A\r\nfooUoAyM2jn0fTNtrB7h8jwQ9lsun4OnkY+qmiJ5auoWgjrmss8BN2yXDLnd\r\no+WI6pjB7dGhSKYoJAqKvdD2z4UgFXaDQCvDCSFDXT8n7t903+ao0rUUqTfb\r\nMdrtnaM2LLLeEO9rx3tIAuAZj1CElW+eYOUFECCTGlJGXwDp5Ye96+y/CX4H\r\n1XLhU/fJRdqHGNoDBgjnFOz40tTbLb31HkknSv/+r4AmmgvP0sVj56lFQrKZ\r\nxAwCPjl5Q3GLnVHSqyE6WAkxVTTbSJ8O0MNipaY0QiiePROs8X784ZVQ4XZ0\r\nDlp6ke/FfL09UmexVxwcvJoxk3ELZi2RsBOHNFA9N1JnKBRXZIsS/M9TxZD8\r\n7pHTR+gmYr7FNHCpc9NaEUwu+EzxHLQGWAQZafCsLwnrcTLMTCODQmaujurT\r\nHjYPUmSLeufuhdb5s7ws9EfKS52MJ2xTBH8M5F4Nxl58Of6thRIOoKZEZOi0\r\nyBj+BCBbaRYVXh0WN4+9+BzMB42uynqkCTtFNvyGtzaxqQgtKA5wz3kNlOY6\r\nbuOZxY3WZomQDfyQuIZEXDMCZ6kUx6wFIs0SFfM8+EEp/Mqm4V8eZRaCECnd\r\n9xHozmHC4SEd5UYuMtvjAxP8KgivmBfkXWY=\r\n=3ibE\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"jonathantneal","email":"jonathantneal@hotmail.com"},"directories":{},"maintainers":[{"name":"jonathantneal","email":"jonathantneal@hotmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/config-to-alias_1.0.1_1678945375737_0.16025848677783605"},"_hasShrinkwrap":false}},"time":{"created":"2023-03-01T14:22:55.925Z","0.1.0":"2023-03-01T14:22:56.167Z","modified":"2023-03-16T05:42:55.970Z","0.1.1":"2023-03-01T14:25:21.684Z","1.0.0":"2023-03-16T05:23:29.230Z","1.0.1":"2023-03-16T05:42:55.885Z"},"maintainers":[{"name":"jonathantneal","email":"jonathantneal@hotmail.com"}],"description":"Add aliasing support to Astro, JavaScript, TypeScript, and CSS files from tsconfig.json or jsconfig.json","homepage":"https://github.com/astro-community/config-to-alias/#readme","keywords":["alias","aliases","astro","astro-plugin","config","configuration","file","files","import","imports","path","paths","plugin","javascript","js","jsconfig","json","renderer","resolve","script","ts","tsconfig","typescript","vite","vite-plugin","withastro"],"repository":{"type":"git","url":"git+https://github.com/astro-community/config-to-alias.git"},"bugs":{"url":"https://github.com/astro-community/config-to-alias/issues"},"license":"CC0-1.0","readme":"# Config to Alias <a href=\"https://github.com/astro-community/config-to-alias\"><img src=\"https://jonneal.dev/astro-logo.svg\" alt=\"Config to Alias\" width=\"90\" height=\"90\" align=\"right\"></a>\n\n[![NPM Version][npm-img]][npm-url]\n[![Licensing][lic-image]][lic-url]\n\n**Config to Alias** adds aliasing support to Astro, JavaScript, TypeScript, and CSS files.\n\n### Usage\n\nInstall **Config to Alias**.\n\n```shell\nnpm install @astropub/config-to-alias\n```\n\nAdd **Config to Alias** to your `astro.config.js`.\n\n```js\nimport { defineConfig } from 'astro/config'\nimport configToAlias from '@astropub/config-to-alias/astro'\n\nexport default defineConfig({\n  integrations: [\n    configToAlias()\n  ]\n})\n```\n\nThat’s it!\n\nNow, any aliases added to `tsconfig.json` or `jsconfig.json` ...\n\n```json\n{\n  \"compilerOptions\": {\n    \"baseUrl\": \".\",\n    \"paths\": {\n      \"src:*\": [\"src/*\"]\n    }\n  }\n}\n```\n\n... can be used in JavaScript, TypeScript, and Astro files ...\n\n```js\nimport * as utils from 'src:scripts/utils.astro'\n```\n\n... and CSS files, too!\n\n```css\n@import 'src:styles/shared.css'\n```\n\n---\n\n## Usage with Vite\n\nAdd **Config to Alias** to your `vite.config.js`.\n\n```js\nimport { defineConfig } from 'vite'\nimport configToAlias from '@astropub/config-to-alias/vite'\n\nexport default defineConfig({\n  plugins: [\n    configToAlias()\n  ]\n})\n```\n\n---\n\n## Author’s Note\n\nThis integration exists as a standalone version of the `vite-plugin-config-alias` plugin built into Astro with additional support for CSS. At the time of writing, Astro has not added this functionality to core because my contributions are currently banned from being used in the project. As they do not yet have any process to appeal a ban, this plugin serves as a crutch.\n\n[npm-url]: https://www.npmjs.com/package/@astropub/config-to-alias\n[npm-img]: https://img.shields.io/npm/v/@astropub/config-to-alias.svg\n[lic-url]: LICENSE.md\n[lic-image]: https://img.shields.io/npm/l/@astropub/config-to-alias.svg\n","readmeFilename":"README.md"}