{"id":21937427,"url":"https://github.com/packingjs/packing","last_synced_at":"2025-04-22T12:07:33.871Z","repository":{"id":9437977,"uuid":"62117607","full_name":"packingjs/packing","owner":"packingjs","description":"基于webpack的前端集成开发环境和编译环境","archived":false,"fork":false,"pushed_at":"2023-01-23T18:49:07.000Z","size":5031,"stargazers_count":34,"open_issues_count":16,"forks_count":15,"subscribers_count":12,"default_branch":"master","last_synced_at":"2025-03-29T14:51:13.400Z","etag":null,"topics":["data-mock","eslint","hot-module-replacement","less","react","sass","vendor","webpack"],"latest_commit_sha":null,"homepage":"https://packingjs.github.io","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/packingjs.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2016-06-28T06:56:48.000Z","updated_at":"2021-05-28T03:42:30.000Z","dependencies_parsed_at":"2023-02-13T02:00:44.447Z","dependency_job_id":null,"html_url":"https://github.com/packingjs/packing","commit_stats":null,"previous_names":[],"tags_count":81,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/packingjs%2Fpacking","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/packingjs%2Fpacking/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/packingjs%2Fpacking/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/packingjs%2Fpacking/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/packingjs","download_url":"https://codeload.github.com/packingjs/packing/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248859023,"owners_count":21173293,"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":["data-mock","eslint","hot-module-replacement","less","react","sass","vendor","webpack"],"created_at":"2024-11-29T01:19:44.870Z","updated_at":"2025-04-22T12:07:33.852Z","avatar_url":"https://github.com/packingjs.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Packing\n\n\u003e基于webpack的前端集成开发环境和编译环境\n\n[![NPM](https://nodei.co/npm/packing.png?downloads=true\u0026downloadRank=true\u0026stars=true)](https://nodei.co/npm/packing/)\n[![Build Status](https://travis-ci.org/qails/qails.svg?branch=master)](https://travis-ci.org/packingjs/packing)\n[![Dependency Status](https://david-dm.org/packingjs/packing.svg)](https://david-dm.org/packingjs/packing)\n[![devDependency Status](https://david-dm.org/packingjs/packing/dev-status.svg)](https://david-dm.org/packingjs/packing#info=devDependencies)\n\n## 特点\n* 不依赖 host 文件，根据环境自动切换资源路径\n* 节约开发服务器，多分支开发部署到同一台服务器不会相互覆盖\n* 提供资源包体积分析报告\n* Version\u003e=4.0支持babel 7。\n\n## Install\n\n1. 安装`yo`和`generator-packing`\n  ```\n  npm install -g yo generator-packing\n  ```\n\n2. 生成你的网站\n  ```\n  yo packing\n  ```\n\n3. 启动开发模式\n  ```\n  npm run serve\n  ```\n\n4. 在浏览器中预览网站 `http://localhost:8081`\n\n5. 其他命令\n  ```sh\n  # 编译工程\n  npm run build\n\n  # 不同环境下编译工程\n  npm run build:dev\n  npm run build:beta\n  npm run build:prod\n\n  # 编译并预览编译结果，端口8080\n  npm run serve:dist\n\n  # 启动不带webpack-dashboard的开发环境\n  npm run serve:normal\n\n  # 启动时自动打开浏览器功能\n  npm run serve -- --open\n  npm run serve -- -o\n\n  # 启动时强制清除DLL缓存功能\n  npm run serve -- --clean\n  npm run serve -- -c\n  ```\n\n## Directory\n\n```\n.\n├── /bin/\n│   ├── /packing-build.js\n│   ├── /packing-serve:dist.js\n│   ├── /packing-serve.js\n│   └── /packing.js\n├── /config/\n│   ├── /packing.js              # 构建工具相关配置\n│   ├── /webpack.build.babel.js  # webpack编译环境配置文件\n│   ├── /webpack.dll.babel.js    # DllPlugin插件编译配置\n│   └── /webpack.serve:dist.js   # webpack预览编译后结果的配置文件\n├── /examples/                   # 例子\n├── /src/                        # 项目代码容器目录\n├── /util/                       # util\n├── .babelrc                     # babel配置\n├── .eslintrc.js                 # eslint配置\n├── package.json\n└── README.md                   \n```\n\n## 例子\n- [build-library](examples/build-library)\u003cbr/\u003e演示输出一个工具类库\n- [common-chunks](examples/common-chunks)\u003cbr/\u003e演示将共用代码打包成common包\n- [custom-page-master](examples/custom-page-master)\u003cbr/\u003e演示自定义网页母模版\n- [custom-page-title](examples/custom-page-title)\u003cbr/\u003e演示自定义网页标题、关键字、网页描述等信息\n- [mock-ajax](examples/mock-ajax)\u003cbr/\u003e演示模拟异步请求\n- [mock-graphql](examples/mock-graphql)\u003cbr/\u003e演示模拟GraphQL服务\n- [mock-page-context-global](examples/mock-page-context-global)\u003cbr/\u003e演示模拟公用的模版数据\n- [mock-page-context-promise](examples/mock-page-context-promise)\u003cbr/\u003e演示模拟从其他服务获取模版数据\n- [remove-default-plugin](examples/remove-default-plugin)\u003cbr/\u003e演示删除packing默认配置\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpackingjs%2Fpacking","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpackingjs%2Fpacking","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpackingjs%2Fpacking/lists"}