{"_id":"@autopack/rpack","_rev":"1-af5124b55ba40be095b9e95bb8803a37","name":"@autopack/rpack","dist-tags":{"latest":"1.0.1"},"versions":{"1.0.0":{"name":"@autopack/rpack","version":"1.0.0","description":"📦 基于rollup的React包构建工具 | One common construction and package tool for React components based on Rollup 📦","author":{"name":"yanpanmichael"},"license":"MIT","repository":{"type":"git","url":"git+https://github.com/YanPanMichael/rpack.git"},"bugs":{"url":"https://github.com/YanPanMichael/rpack/issues","email":"1214863281@qq.com"},"homepage":"https://github.com/YanPanMichael/rpack.git","keywords":["rollup","@autopack/rpack","javascript bundler","typescript bundler","package-bundler"],"bin":{"rpack":"bin/cli.js"},"main":"src/index.js","publishConfig":{"access":"public","registry":"https://registry.npmjs.org/"},"scripts":{"release":"qkrelease --skipBuild","build":"cross-env NODE_ENV=production BABEL_ENV=production node bin/cli.js --source=react","format":"prettier --write .","lint":"eslint src","fix":"eslint src/**/*.* --fix","docs":"docsify serve ./docs"},"peerDependencies":{"react":">=16.x","react-dom":">=16.x"},"dependencies":{"@babel/core":"^7.22.8","@babel/eslint-parser":"^7.22.7","@babel/plugin-proposal-class-properties":"^7.18.6","@babel/plugin-proposal-decorators":"^7.22.3","@babel/plugin-syntax-dynamic-import":"^7.8.3","@babel/plugin-syntax-flow":"^7.22.5","@babel/plugin-transform-react-jsx":"^7.22.5","@babel/plugin-transform-runtime":"^7.22.7","@babel/preset-env":"^7.22.7","@babel/preset-react":"^7.22.5","@babel/preset-typescript":"^7.22.5","@babel/runtime":"^7.22.6","@rollup/plugin-alias":"^5.0.0","@rollup/plugin-babel":"^6.0.3","@rollup/plugin-commonjs":"^25.0.2","@rollup/plugin-html":"^1.0.2","@rollup/plugin-json":"^6.0.0","@rollup/plugin-node-resolve":"^15.1.0","@rollup/plugin-replace":"^5.0.2","@rollup/plugin-url":"^8.0.1","@svgr/rollup":"^8.0.1","@zerollup/ts-transform-paths":"^1.7.18","autoprefixer":"^9.8.6","babel-jest":"^27.5.1","babel-loader":"^9.1.3","babel-plugin-css-modules-transform":"^1.6.2","babel-plugin-dynamic-import-node":"^2.3.3","babel-plugin-named-asset-import":"^0.3.8","babel-plugin-transform-react-remove-prop-types":"^0.4.24","babel-preset-react-app":"^10.0.1","chalk":"^4.1.2","css-loader":"^6.8.1","figlet":"^1.6.0","file-loader":"^6.2.0","fs-extra":"^10.1.0","inquirer":"^8.2.5","lodash":"^4.17.20","moment":"^2.29.4","ora":"^5.4.0","postcss":"^8.4.25","postcss-scss":"^4.0.6","prettier":"^2.8.8","process":"^0.11.10","prop-types":"^15.8.1","pug":"^3.0.2","react":">=16.x","react-app-polyfill":"^3.0.0","react-docgen-typescript":"^2.2.2","react-dom":">=16.x","react-test-renderer":"^18.2.0","react-transition-group":"^4.4.5","regenerator-runtime":"^0.13.11","remark-gfm":"^3.0.1","resolve-url-loader":"^5.0.0","rimraf":"^5.0.1","rollup":"^3.26.2","rollup-plugin-css-porter":"^1.0.2","rollup-plugin-filesize":"^10.0.0","rollup-plugin-peer-deps-external":"^2.2.4","rollup-plugin-postcss":"^4.0.2","rollup-plugin-serve":"^1.1.0","rollup-plugin-stylus":"^1.0.4","rollup-plugin-stylus-compiler":"^1.0.1","rollup-plugin-terser":"^7.0.2","rollup-plugin-typescript2":"^0.35.0","rollup-plugin-url":"^3.0.0","sass":"^1.63.6","sass-loader":"^13.3.2","shelljs":"^0.8.3","storybook":"^7.0.26","style-loader":"^3.3.3","stylelint":"^15.10.1","stylelint-prettier":"^3.0.0","stylelint-scss":"^5.0.1","stylus":"^0.54.8","ts-toolbelt":"^9.6.0","tslib":"^2.6.0","typescript":"^5.1.6","url-loader":"^4.1.1","yargs":"^13.2.1"},"devDependencies":{"@types/bluebird":"^3.5.38","@types/jest":"^27.4.1","@types/lodash":"^4.14.195","@types/node":"^20.4.1","@types/react":">=16.x","@types/react-dom":">=16.x","@typescript-eslint/eslint-plugin":"^5.61.0","@typescript-eslint/parser":"^5.61.0","cross-env":"^7.0.3","docsify-cli":"^4.4.4","eslint":"^8.44.0","eslint-config-prettier":"^8.8.0","eslint-config-react-app":"^7.0.1","eslint-config-standard":"^17.1.0","eslint-import-resolver-webpack":"^0.13.2","eslint-plugin-flowtype":"^8.0.3","eslint-plugin-import":"^2.27.5","eslint-plugin-jest":"^27.2.2","eslint-plugin-jsx-a11y":"^6.7.1","eslint-plugin-node":"^11.1.0","eslint-plugin-prettier":"^4.2.1","eslint-plugin-promise":"^6.1.1","eslint-plugin-react":"^7.32.2","eslint-plugin-react-hooks":"^4.6.0","eslint-plugin-storybook":"^0.6.12","prettier":"^2.8.8","qk-release":"latest"},"engines":{"node":">=12"},"gitHead":"ac85d9cd530474b4ff81448aaffb42f4455f49b9","_id":"@autopack/rpack@1.0.0","_nodeVersion":"16.15.1","_npmVersion":"8.11.0","dist":{"integrity":"sha512-vTcwybdyqryitlKd2a4uglU4m/56Ca0aVPrQrqmvZ2h15oxmHMEUubj6uLaziwMvUh7nOq7urdlQsNW14sBSrQ==","shasum":"15ba91741e915ab39691b7096574bc39310617df","tarball":"https://registry.npmjs.org/@autopack/rpack/-/rpack-1.0.0.tgz","fileCount":51,"unpackedSize":61492,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDMz1uRPmoAOE5UgxHyo4AHrH47gXNEUQgjoXaPFiHcLAIgcI+nfFiXOWzC5WUzu0xMltbKaQ/2xsmGnDGFiL5ALGU="}]},"_npmUser":{"name":"yanpanmichael","email":"yanpancsu@icloud.com"},"directories":{},"maintainers":[{"name":"yanpanmichael","email":"yanpancsu@icloud.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/rpack_1.0.0_1690386100686_0.9307719427219192"},"_hasShrinkwrap":false},"1.0.1":{"name":"@autopack/rpack","version":"1.0.1","description":"📦 基于rollup的React包构建工具 | One common construction and package tool for React components based on Rollup 📦","author":{"name":"yanpanmichael"},"license":"MIT","repository":{"type":"git","url":"git+https://github.com/YanPanMichael/rpack.git"},"bugs":{"url":"https://github.com/YanPanMichael/rpack/issues","email":"1214863281@qq.com"},"homepage":"https://github.com/YanPanMichael/rpack.git","keywords":["rollup","@autopack/rpack","react component bundler","package-bundler"],"bin":{"rpack":"bin/cli.js"},"main":"src/index.js","publishConfig":{"access":"public","registry":"https://registry.npmjs.org/"},"scripts":{"release":"qkrelease --skipBuild","build":"cross-env NODE_ENV=production BABEL_ENV=production node bin/cli.js","format":"prettier --write .","lint":"eslint src","fix":"eslint src/**/*.* --fix","docs":"docsify serve ./docs"},"peerDependencies":{"react":">=16.x","react-dom":">=16.x"},"dependencies":{"@babel/core":"^7.22.8","@babel/eslint-parser":"^7.22.7","@babel/plugin-proposal-class-properties":"^7.18.6","@babel/plugin-proposal-decorators":"^7.22.3","@babel/plugin-syntax-dynamic-import":"^7.8.3","@babel/plugin-syntax-flow":"^7.22.5","@babel/plugin-transform-react-jsx":"^7.22.5","@babel/plugin-transform-runtime":"^7.22.7","@babel/preset-env":"^7.22.7","@babel/preset-react":"^7.22.5","@babel/preset-typescript":"^7.22.5","@babel/runtime":"^7.22.6","@rollup/plugin-alias":"^5.0.0","@rollup/plugin-babel":"^6.0.3","@rollup/plugin-commonjs":"^25.0.2","@rollup/plugin-html":"^1.0.2","@rollup/plugin-json":"^6.0.0","@rollup/plugin-node-resolve":"^15.1.0","@rollup/plugin-replace":"^5.0.2","@rollup/plugin-url":"^8.0.1","@svgr/rollup":"^8.0.1","@zerollup/ts-transform-paths":"^1.7.18","autoprefixer":"^9.8.6","babel-jest":"^27.5.1","babel-loader":"^9.1.3","babel-plugin-css-modules-transform":"^1.6.2","babel-plugin-dynamic-import-node":"^2.3.3","babel-plugin-named-asset-import":"^0.3.8","babel-plugin-transform-react-remove-prop-types":"^0.4.24","babel-preset-react-app":"^10.0.1","chalk":"^4.1.2","css-loader":"^6.8.1","figlet":"^1.6.0","file-loader":"^6.2.0","fs-extra":"^10.1.0","inquirer":"^8.2.5","lodash":"^4.17.20","moment":"^2.29.4","ora":"^5.4.0","postcss":"^8.4.25","postcss-scss":"^4.0.6","prettier":"^2.8.8","process":"^0.11.10","prop-types":"^15.8.1","pug":"^3.0.2","react":">=16.x","react-app-polyfill":"^3.0.0","react-docgen-typescript":"^2.2.2","react-dom":">=16.x","react-test-renderer":"^18.2.0","react-transition-group":"^4.4.5","regenerator-runtime":"^0.13.11","remark-gfm":"^3.0.1","resolve-url-loader":"^5.0.0","rimraf":"^5.0.1","rollup":"^3.26.2","rollup-plugin-css-porter":"^1.0.2","rollup-plugin-filesize":"^10.0.0","rollup-plugin-peer-deps-external":"^2.2.4","rollup-plugin-postcss":"^4.0.2","rollup-plugin-serve":"^1.1.0","rollup-plugin-stylus":"^1.0.4","rollup-plugin-stylus-compiler":"^1.0.1","rollup-plugin-terser":"^7.0.2","rollup-plugin-typescript2":"^0.35.0","rollup-plugin-url":"^3.0.0","sass":"^1.63.6","sass-loader":"^13.3.2","shelljs":"^0.8.3","storybook":"^7.0.26","style-loader":"^3.3.3","stylelint":"^15.10.1","stylelint-prettier":"^3.0.0","stylelint-scss":"^5.0.1","stylus":"^0.54.8","ts-toolbelt":"^9.6.0","tslib":"^2.6.0","typescript":"^5.1.6","url-loader":"^4.1.1","yargs":"^13.2.1"},"devDependencies":{"@types/bluebird":"^3.5.38","@types/jest":"^27.4.1","@types/lodash":"^4.14.195","@types/node":"^20.4.1","@types/react":">=16.x","@types/react-dom":">=16.x","@typescript-eslint/eslint-plugin":"^5.61.0","@typescript-eslint/parser":"^5.61.0","cross-env":"^7.0.3","docsify-cli":"^4.4.4","eslint":"^8.44.0","eslint-config-prettier":"^8.8.0","eslint-config-react-app":"^7.0.1","eslint-config-standard":"^17.1.0","eslint-import-resolver-webpack":"^0.13.2","eslint-plugin-flowtype":"^8.0.3","eslint-plugin-import":"^2.27.5","eslint-plugin-jest":"^27.2.2","eslint-plugin-jsx-a11y":"^6.7.1","eslint-plugin-node":"^11.1.0","eslint-plugin-prettier":"^4.2.1","eslint-plugin-promise":"^6.1.1","eslint-plugin-react":"^7.32.2","eslint-plugin-react-hooks":"^4.6.0","eslint-plugin-storybook":"^0.6.12","prettier":"^2.8.8","qk-release":"latest"},"engines":{"node":">=12"},"gitHead":"504b8ff6449656b3ec74f41b384b1f3e66347aaf","_id":"@autopack/rpack@1.0.1","_nodeVersion":"16.20.1","_npmVersion":"8.19.4","dist":{"integrity":"sha512-x8dgIRY135XEyPAjOtcSs6jKjW9+88P0KW393IBRnpJf+nQ+dnfzDPIFEXbGOoVeeWrN/PnppYwMQ5KdRmTYkQ==","shasum":"de7a435502cd329d84888dd5404376420736726e","tarball":"https://registry.npmjs.org/@autopack/rpack/-/rpack-1.0.1.tgz","fileCount":51,"unpackedSize":60515,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDN8Gmd9jU7xuP6uGMoNwgW0M48gK+m4Anr+lJAC9YIuwIgQmKaPL0uDw7VhsCFU79tR3F94tZArgaGJmwXEvwo1g8="}]},"_npmUser":{"name":"yanpanmichael","email":"yanpancsu@icloud.com"},"directories":{},"maintainers":[{"name":"yanpanmichael","email":"yanpancsu@icloud.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/rpack_1.0.1_1692116359238_0.08639182089468256"},"_hasShrinkwrap":false}},"time":{"created":"2023-07-26T15:41:40.565Z","1.0.0":"2023-07-26T15:41:40.971Z","modified":"2023-08-15T16:19:19.628Z","1.0.1":"2023-08-15T16:19:19.441Z"},"maintainers":[{"name":"yanpanmichael","email":"yanpancsu@icloud.com"}],"description":"📦 基于rollup的React包构建工具 | One common construction and package tool for React components based on Rollup 📦","homepage":"https://github.com/YanPanMichael/rpack.git","keywords":["rollup","@autopack/rpack","react component bundler","package-bundler"],"repository":{"type":"git","url":"git+https://github.com/YanPanMichael/rpack.git"},"author":{"name":"yanpanmichael"},"bugs":{"url":"https://github.com/YanPanMichael/rpack/issues","email":"1214863281@qq.com"},"license":"MIT","readme":"<!-- <img src=\"icon.png\" align=\"right\" /> -->\n\n# @autopack/rpack [![@autopack/rpack](https://cdn.rawgit.com/sindresorhus/awesome/d7305f38d29fed78fa85652e3a63e154dd8e8829/media/badge.svg)](https://github.com/yanppanmichael/autopack-rpack#readme)\n\n[![Sponsor][sponsor-badge]][sponsor]\n[![TypeScript version][ts-badge]][typescript-4-0]\n[![Node.js version][nodejs-badge]][nodejs]\n[![MIT][license-badge]][license]\n[![Build Status - GitHub Actions][gha-badge]][gha-ci]\n\n> 📦 基于 rollup 的 React 包基础核心构建工具\n> One common construction and package tool for React components based on Rollup 📦\n\n## ✨ Features\n\n- 基于 rollup 的基础核心构建工具\n- 支持 React\n- 支持自定义banner，可通过指定package中__cusBannerString__字段值修改本工具品牌名称\n\n- Basic core build tools based on rollup\n- Supports mutiple frameworks such as React\n- Support custom banner, you can modify the brand name of this tool by specifying the value of the __cusBannerString__ field in the package\n\n## 🚀 Quick Start\n\n### Installion\n\n```bash\nnpm i -D @autopack/rpack@latest # OR yarn add -D @autopack/rpack@latest\n```\n\n### Usage\n\n**First Step**：Add the scripts in package.json：\n\n```js\n  \"scripts\": {\n    \"build\": \"NODE_ENV=production @autopack/rpack build\"\n  },\n```\n\n**Second Step**：Goes to the project directory and runs:\n\n```bash\nnpm run build # OR yarn build\n```\n\n@autopack/rpack 默认以 `src/index.js` 为入口，在 `dist` 目录输出 `'umd', 'es', 'cjs', 'iife', 'amd'` 五种格式的构建包（包含未压缩和已压缩版本）。\n\n@autopack/rpack defaults to 'src/index.js' as the entry, and outputs 'umd', 'es', 'cjs', 'iife', 'amd'' build packages (including uncompressed and compressed versions) in the 'dist' directory.\n\n### Custom Config\n\n可在项目根目录新建 `autopack.config.js` 自定义 @autopack/rpack 构建配置（或在 `package.json` 中使用 `autopackConfig` 对象配置）。\n\nYou can create a new 'autopack.config.js' custom @autopack/rpack build configuration at the project root (or use the 'autopackConfig' object configuration in 'package.json')\n\n支持自定义banner，可通过指定package.json文件中__cusBannerString__字段值修改本工具品牌名称。\n\nCustom banners are supported, and you can modify the brand name of the tool by specifying the value of the __cusBannerString__ field in the package.json file\n\n如需指定打包需要隔离的依赖包，则可配置 formatConfig 属性对象\n\nIf you need to specify that packaging depends on packages that need to be isolated, you can configure the formatConfig property object\n\n```js\n  \"formatConfig\": {\n    [format]: {\n      external: ['xxx']\n    }\n  },\n```\n\n如需整体隔离 dependences 全体依赖包，可指定 isolateDep: true\n\nTo isolate all dependent packages of dependences as a whole, specify isolateDep: true\n\n```js\n  \"formatConfig\": {\n    [format]: {\n      isolateDep: true,\n    }\n  },\n```\n\ndebug 并且非production环境状态会自动开启 rollup-serve，可配置 templateBase 属性指定模版 index.html 所在路径\n\nThe debug and development states automatically turns on rollup-serve, and you can configure the templateBase property to specify the path where the template index.html is located.\n\n```js\n  \"formatConfig\": {\n    templateBase: 'examples/',\n  },\n```\n\nbatchPackage 布尔状态会自动开启批量打包, 默认批量路径为\"./packages\"，可配置 input 数组属性指定input路径文件\n\n```js\n  \"batchPackage\": true,\n```\n\n[@autopack/rpack 默认配置/配置示例 Default Config]()\n\n```js\n/**\n * @autopack/rpack 默认配置 Default Config\n */\nmodule.exports = ({ pkg } = {}) => {\n  return {\n    // 输入 Input\n    input: 'src/index.tsx',\n\n    // 输出 Output\n    output: {\n      // 目录 directory\n      directory: 'dist',\n      // 包名 name\n      name: /\\//.test(pkg.name) ? pkg.name.match(/\\/(.+)/)[1] : pkg.name,\n      // 格式 format\n      format: ['umd', 'es', 'cjs', 'iife', 'amd'],\n      // 顶部注释 banner\n      banner: `/*!\n* ${pkg.name} with v${pkg.version}\n* Author: ${pkg.author}\n* Built on ${new Date().toLocaleDateString()}\n* Released under the ${\n        pkg.license\n      } License Copyright (c) 2021-${new Date().getFullYear()}\n*/`\n    },\n    formatConfig: {\n      umd: {\n        // 打包屏蔽的外部模块 Shielded external modules\n        external: ['lodash', 'moment'],\n        // 外部pkg.dependences依赖不屏蔽 Isolate dependences not blocking\n        isolateDep: false\n      },\n      es: {\n        external: ['lodash', 'moment'],\n        // 自动屏蔽全部pkg.dependences依赖 Blocking isolate dependences\n        isolateDep: true\n      },\n      cjs: {\n        external: [],\n        isolateDep: false\n      },\n      iife: {\n        external: [],\n        isolateDep: false\n      },\n      amd: {\n        external: [],\n        isolateDep: false\n      }\n    },\n    skipAlert: true, // 重复路径是否提示覆盖并继续构建，默认不提示 Whether the duplicate path prompts to override and continue building, it is not prompted by default\n    templateBase: 'examples/', // rollup-plugin-serve build base\n    // devServeInput: 'examples/index.js', // rollup-plugin-serve build input file\n    batchPackage: false, //是否批量打包packages路径下的组件, 默认打包路径, 会覆盖input路径\n    replaceMaps: {},\n    stylusAlias: {\n      '@': path.join(cwd, './node_modules/@')\n    },\n    styleExtract: false\n  }\n}\n```\n\n<br>\n<br>\n😉😘 If you feel it is helpful, please click <b>⭐️<a href=\"https://github.com/YanPanMichael/@autopack/rpack.git\">Star</a></b> Thank you for you support~\n\n## License\n\n[MIT](http://opensource.org/licenses/MIT)\n\nCopyright (c) 2022-present, YanPan\n\n[ts-badge]: https://img.shields.io/badge/TypeScript-4.0-blue.svg\n[nodejs-badge]: https://img.shields.io/badge/Node.js->=12.0-blue.svg\n[nodejs]: https://nodejs.org/dist/latest-v8.x/docs/api/\n[gha-badge]: https://github.com/jsynowiec/node-typescript-boilerplate/actions/workflows/nodejs.yml/badge.svg\n[gha-ci]: https://github.com/jsynowiec/node-typescript-boilerplate/actions/workflows/nodejs.yml\n[typescript]: https://www.typescriptlang.org/\n[typescript-4-0]: https://devblogs.microsoft.com/typescript/announcing-typescript-4-0/\n[license-badge]: https://img.shields.io/badge/license-MIT-blue.svg\n[license]: https://github.com/jsynowiec/node-typescript-boilerplate/blob/main/LICENSE\n[sponsor-badge]: https://img.shields.io/badge/♥-Sponsor-fc0fb5.svg\n[sponsor]: https://github.com/YanPanMichael/@autopack/rpack\n[jest]: https://facebook.github.io/jest/\n[eslint]: https://github.com/eslint/eslint\n[wiki-js-tests]: https://github.com/jsynowiec/node-typescript-boilerplate/wiki/Unit-tests-in-plain-JavaScript\n[prettier]: https://prettier.io\n[volta]: https://volta.sh\n[volta-getting-started]: https://docs.volta.sh/guide/getting-started\n[volta-tomdale]: https://twitter.com/tomdale/status/1162017336699838467?s=20\n[gh-actions]: https://github.com/features/actions\n[repo-template-action]: https://github.com/jsynowiec/node-typescript-boilerplate/generate\n[esm]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Modules\n[sindresorhus-esm]: https://gist.github.com/sindresorhus/a39789f98801d908bbc7ff3ecc99d99c\n[dynamic-import]: https://v8.dev/features/dynamic-import","readmeFilename":"README.md"}