{"_id":"@doonce/add-vue-suffix","_rev":"1-7ebb0f7586db7b9e47fb570fcf4a3cbb","name":"@doonce/add-vue-suffix","dist-tags":{"latest":"1.1.2"},"versions":{"1.1.1":{"name":"@doonce/add-vue-suffix","version":"1.1.1","description":"🔨Give some vue files ,find reference and add `.vue` suffix","keywords":["vue","vue3"],"homepage":"https://github.com/do-once/cbb/tree/main/cli/add-vue-suffix","bugs":{"url":"https://github.com/do-once/cbb/issues"},"repository":{"type":"git","url":"git+https://github.com/do-once/cbb.git","directory":"cli/add-vue-suffix"},"license":"MIT","author":{"name":"GuangHui","email":"bryanadamss@foxmail.com","url":"https://github.com/BryanAdamss"},"exports":{".":{"import":"./dist/index.js"}},"main":"./dist/index.js","module":"./dist/index.js","types":"./dist/index.d.ts","typesVersions":{"*":{"*":["./dist/*"]}},"bin":{"add-vue-suffix":"bin/add-vue-suffix.js"},"dependencies":{"@babel/generator":"7.14.8","@babel/parser":"7.14.8","@babel/traverse":"7.14.8","@babel/types":"7.14.8","chalk":"4.1.1","enhanced-resolve":"5.8.2","file-save":"0.2.0","globby":"11.0.4","yargs":"17.0.1"},"devDependencies":{"@doonce/node-rig":"1.10.11","@rushstack/eslint-config":"3.1.0","@rushstack/heft":"0.48.0","@types/babel__generator":"7.6.4","@types/babel__traverse":"7.18.3","@types/heft-jest":"1.0.3","@types/node":"18.11.3","@types/yargs":"17.0.17"},"scripts":{"_phase:build":"heft build --clean --verbose","_phase:test":"heft test --no-build","build":"heft build --clean --verbose","test":"heft test --clean --verbose"},"gitHead":"49bcf62113cc0d9a4dd168e7f0d7555c6f7d8666","_id":"@doonce/add-vue-suffix@1.1.1","_integrity":"sha512-k3Hp/XC7QyK692iZFHjqKfQM89uBSPbC1XrGN5TLDzrdBU3nIkdSVdtsi5lnSdkL8agRC5O+0K+X56tZztkZTQ==","_resolved":"/private/var/folders/jw/__625bdx02s57_tvm80d5sdc0000gn/T/65ad0d3a88b70f06cb52828980172eb4/doonce-add-vue-suffix-1.1.1.tgz","_from":"file:doonce-add-vue-suffix-1.1.1.tgz","_nodeVersion":"16.17.0","_npmVersion":"8.18.0","dist":{"integrity":"sha512-k3Hp/XC7QyK692iZFHjqKfQM89uBSPbC1XrGN5TLDzrdBU3nIkdSVdtsi5lnSdkL8agRC5O+0K+X56tZztkZTQ==","shasum":"ee1d280b035fdbecea3063d34d0b8a1ba7e68ebc","tarball":"https://registry.npmjs.org/@doonce/add-vue-suffix/-/add-vue-suffix-1.1.1.tgz","fileCount":34,"unpackedSize":49119,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDLzCpMDryL2gTlY0BKUim2nmH3BkQfCtL1EmZT6yYVHgIhAIG8nv8RYscl9OfO5Qvyt0XJE9k7/9PISqXOytHZ8kyM"}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjmYv7ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmrGkg/9Grnac3IojnjMx8AbtBHQu6AeEGvFZEE1MuWzQ74xvs4q8tdx\r\n1ZsfLvlv3rWRpTkZrQ5X8CWdYXmrpEjo6Xo8b6ZYPhiadiOE8HlJhLcUOomo\r\ntAClOuCI0mmtvdLjQ36dOe8eKd0RrAbZd162XCqm0k/PHJY3yVVlChMotWwj\r\nAOqvv5fJdkgFY8CICh0nDMAgbd1NS8l7r93RpRCdZlVGoQaB08bsUOonTv/b\r\n6Zru3KN4Mdu/03ZFD+NdlAc/3GdPtwIWIUUYxTIQBJozFBlAqnK3QMJIYjuj\r\nARF5y3yzc7xX899m/KlhGZsyaQ8obKXI0QcyrGd8RWp5MGVHmQJiq/8C7mic\r\nWRp7ybycbNh+LKUrnB+iFLgatIibdjt0xh7wKEsZsNqs5bNAsGATm5qJqMN+\r\nfHmfLDjRQgsSRaLDQfhPT2lE/ZFbWrDqmqR/0a6e7g0hDxPdnOZToIkA0FZA\r\n+hoNHZX2FNQiVDRLWHlAc707TjeSCmZoVBI4tiBepqubd/XPXo3QsXARr5pU\r\njZenIqKdvt5E0LXJxtGB4tk2EszdXl4UsFy+qzoNc5VG0+Yw+Cx6JNKROthB\r\nIxyRTUpIVxD/cm+vTM+24nr+oEFHhLjsKMAfVOWvH8Pzusy4v+/EVGNs3kkQ\r\ncfJ0BUzoUu6BjKfO7miiAt36P99ipVNQCtk=\r\n=MaG8\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"bryanadamss","email":"adamssbryan@foxmail.com"},"directories":{},"maintainers":[{"name":"bryanadamss","email":"adamssbryan@foxmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/add-vue-suffix_1.1.1_1671007227572_0.1727276148201593"},"_hasShrinkwrap":false},"1.1.2":{"name":"@doonce/add-vue-suffix","version":"1.1.2","description":"🔨Give some vue files ,find reference and add `.vue` suffix","keywords":["vue","vue3"],"homepage":"https://github.com/do-once/cbb/tree/main/cli/add-vue-suffix","bugs":{"url":"https://github.com/do-once/cbb/issues"},"repository":{"type":"git","url":"git+https://github.com/do-once/cbb.git","directory":"cli/add-vue-suffix"},"license":"MIT","author":{"name":"GuangHui","email":"bryanadamss@foxmail.com","url":"https://github.com/BryanAdamss"},"exports":{".":{"import":"./dist/index.js"}},"main":"./dist/index.js","module":"./dist/index.js","types":"./dist/index.d.ts","typesVersions":{"*":{"*":["./dist/index.d.ts"]}},"bin":{"add-vue-suffix":"bin/add-vue-suffix.js"},"dependencies":{"@babel/generator":"7.14.8","@babel/parser":"7.14.8","@babel/traverse":"7.14.8","@babel/types":"7.14.8","chalk":"4.1.1","enhanced-resolve":"5.8.2","file-save":"0.2.0","globby":"11.0.4","yargs":"17.0.1"},"devDependencies":{"@rushstack/eslint-config":"3.1.0","@rushstack/heft":"0.48.0","@types/babel__generator":"7.6.4","@types/babel__traverse":"7.18.3","@types/heft-jest":"1.0.3","@types/node":"18.11.3","@types/yargs":"17.0.17","@doonce/node-rig":"1.10.11"},"scripts":{"_phase:build":"heft build --clean --verbose","_phase:test":"heft test --no-build","build":"heft build --clean --verbose","test":"heft test --clean --verbose"},"gitHead":"013fb6b114b63b4cefe6980d491ba93b60216d1f","_id":"@doonce/add-vue-suffix@1.1.2","_integrity":"sha512-OZ+ClBxverZI0M52zH7ket+CydbmjExaSrVzHUdQw7aI4pqXot+aXvlfBWf05FsmYYNvJJi7fomfx7plchR51A==","_resolved":"/private/var/folders/jw/__625bdx02s57_tvm80d5sdc0000gn/T/40c563a792c9b3ed27ac0e99c02275c8/doonce-add-vue-suffix-1.1.2.tgz","_from":"file:doonce-add-vue-suffix-1.1.2.tgz","_nodeVersion":"18.16.0","_npmVersion":"9.5.1","dist":{"integrity":"sha512-OZ+ClBxverZI0M52zH7ket+CydbmjExaSrVzHUdQw7aI4pqXot+aXvlfBWf05FsmYYNvJJi7fomfx7plchR51A==","shasum":"27b471208142f21c504ab0416c816010b96730d8","tarball":"https://registry.npmjs.org/@doonce/add-vue-suffix/-/add-vue-suffix-1.1.2.tgz","fileCount":35,"unpackedSize":51782,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCICrdrTqBQUsEjiRZh6pOlhuT5fZCJHyAbUIDzUAZ684KAiEAx659Pthgb9BENsljSW69zBnD0XcASkAfbafEZVE0cVw="}]},"_npmUser":{"name":"bryanadamss","email":"adamssbryan@foxmail.com"},"directories":{},"maintainers":[{"name":"bryanadamss","email":"adamssbryan@foxmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/add-vue-suffix_1.1.2_1689565364860_0.7598295007797764"},"_hasShrinkwrap":false}},"time":{"created":"2022-12-14T08:40:27.487Z","1.1.1":"2022-12-14T08:40:27.752Z","modified":"2023-07-17T03:42:45.203Z","1.1.2":"2023-07-17T03:42:45.026Z"},"maintainers":[{"name":"bryanadamss","email":"adamssbryan@foxmail.com"}],"description":"🔨Give some vue files ,find reference and add `.vue` suffix","homepage":"https://github.com/do-once/cbb/tree/main/cli/add-vue-suffix","keywords":["vue","vue3"],"repository":{"type":"git","url":"git+https://github.com/do-once/cbb.git","directory":"cli/add-vue-suffix"},"author":{"name":"GuangHui","email":"bryanadamss@foxmail.com","url":"https://github.com/BryanAdamss"},"bugs":{"url":"https://github.com/do-once/cbb/issues"},"license":"MIT","readme":"# @doonce/add-vue-suffix\n\n🔨Give some vue files ,find reference and add `.vue` suffix;(Useful for some project migrate to `vite` from `webpack`)\n\nEnglish | [中文](https://github.com/do-once/cbb/blob/main/cli/add-vue-suffix/README.zh-CN.md)\n\n## Install\n\n```sh\nnpm i -D @doonce/add-vue-suffix\n\nor\n\nyarn add @doonce/add-vue-suffix -D\n```\n\n## Usage\n\n### with cli\n\n```bash\nnpx @doonce/add-vue-suffix --resolveConifg ./path/to/resolve-config.js\n```\n\nor\n\n```json\n{\n  \"scripts\": {\n    \"add-vue-suffix\": \"add-vue-suffix --resolveConifg ./path/to/resolve-config.js\"\n  }\n}\n```\n\n- `resolveConifg` is a path to a `enhanced-resolve` config file;\n- Because [`webpack` use `enhanced-resolve` underhood](https://webpack.js.org/concepts/module-resolution/),so you just point to a `webpack config` that contain `resolve` property.\n- etc\n\n```js\n// webpack.config.js\nconst path = require('path')\n\nmodule.exports={\n  input:'./src/index.js',\n\n  ...,\n\n  resolve:{\n    extensions: ['.js', '.vue', '.json'],\n    alias: {\n      '@': path.resolve('src'),\n      Api: path.resolve('src/api'),\n      Api2: path.resolve('src/api2'),\n      Assets: path.resolve('src/assets'),\n      Base: path.resolve('src/base'),\n      Config: path.resolve('src/config'),\n      Components: path.resolve('src/components'),\n      Directives: path.resolve('src/directives'),\n      Plugins: path.resolve('src/plugins'),\n      Routes: path.resolve('src/routes'),\n      Sass: path.resolve('src/sass'),\n      Services: path.resolve('src/services'),\n      Stores: path.resolve('src/stores'),\n      Utils: path.resolve('src/utils'),\n      Views: path.resolve('src/views')\n  }\n}\n```\n\n- If you use `vue-cli` or other not emit `webpack config` cli,you can just create a `js` file that export a object that contain `resolve` property like above.\n\n### with function\n\n```js\nimport addVueSuffix from '@doonce/add-vue-suffix'\n\naddVueSuffix({\n  withAST = false, // add-vue-suffix use regexp to replace import/export/import() by default;If you got some error,set this to true,it will use babel to replace import/export/import();\n  patterns = ['src/**/*.vue', 'src/**/*.js'], // some file may be import vue file;search `vue` and `js` under `src` by default;\n  globbyOptions = {}, // custom globby options, it will override default globby options;\n  resolveConfig = {}, // https://www.npmjs.com/package/enhanced-resolve；https://webpack.js.org/configuration/resolve/#resolve\n  debug = false,// set true will not rewrite file;\n})\n```\n\n## NPM\n\n- [vue-cli-plugin-auto-alias](https://www.npmjs.com/package/vue-cli-plugin-auto-alias)\n- [@doonce/drawing-board](https://www.npmjs.com/package/@doonce/drawing-board)\n- [@doonce/num2chn](https://www.npmjs.com/package/@doonce/num2chn)\n- [ant-color-converter](https://www.npmjs.com/package/ant-color-converter)\n\n## Show your support\n\nGive a ⭐️ if this project helped you!\n\n## 📝 License\n\nCopyright © 2021 [BryanAdamss@foxmail.com](https://github.com/BryanAdamss).<br />\nThis project is [MIT](https://github.com/kefranabg/readme-md-generator/blob/master/LICENSE) licensed.\n\n## Contributors ✨\n\nThanks goes to these wonderful people ([emoji key](https://allcontributors.org/docs/en/emoji-key)):\n\n<!-- ALL-CONTRIBUTORS-LIST:START - Do not remove or modify this section -->\n<!-- prettier-ignore-start -->\n<!-- markdownlint-disable -->\n<table>\n  <tr>\n    <td align=\"center\"><a href=\"https://bryanadamss.github.io/\"><img src=\"https://avatars3.githubusercontent.com/u/7441504?v=4\" width=\"64px;\" alt=\"\"/><br /><sub><b>GuangHui</b></sub></a><br /><a href=\"#projectManagement-BryanAdamss\" title=\"Project Management\">📆</a></td>\n  </tr>\n</table>\n\n<!-- markdownlint-enable -->\n<!-- prettier-ignore-end -->\n\n<!-- ALL-CONTRIBUTORS-LIST:END -->\n\nThis project follows the [all-contributors](https://github.com/all-contributors/all-contributors) specification. Contributions of any kind welcome!\n","readmeFilename":"README.md"}