{"id":13802512,"url":"https://github.com/ant-tool/atool-build","last_synced_at":"2025-05-13T13:31:42.004Z","repository":{"id":57186376,"uuid":"43932090","full_name":"ant-tool/atool-build","owner":"ant-tool","description":":hammer: Build tool based on webpack.","archived":false,"fork":true,"pushed_at":"2019-03-05T03:26:43.000Z","size":310,"stargazers_count":391,"open_issues_count":27,"forks_count":75,"subscribers_count":28,"default_branch":"master","last_synced_at":"2024-11-06T07:44:23.712Z","etag":null,"topics":["build-tool","webpack"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":"ibigbug/antd-build","license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ant-tool.png","metadata":{"files":{"readme":"README.md","changelog":"HISTORY.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":"2015-10-09T04:02:19.000Z","updated_at":"2024-07-12T07:45:17.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/ant-tool/atool-build","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ant-tool%2Fatool-build","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ant-tool%2Fatool-build/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ant-tool%2Fatool-build/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ant-tool%2Fatool-build/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ant-tool","download_url":"https://codeload.github.com/ant-tool/atool-build/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":224863597,"owners_count":17382396,"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":["build-tool","webpack"],"created_at":"2024-08-04T00:01:46.193Z","updated_at":"2024-11-18T17:31:31.625Z","avatar_url":"https://github.com/ant-tool.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# atool-build\n\n[![NPM version](https://img.shields.io/npm/v/atool-build.svg?style=flat)](https://npmjs.org/package/atool-build)\n[![Build Status](https://img.shields.io/travis/ant-tool/atool-build.svg?style=flat)](https://travis-ci.org/ant-tool/atool-build)\n[![Coverage Status](https://img.shields.io/coveralls/ant-tool/atool-build.svg?style=flat)](https://coveralls.io/r/ant-tool/atool-build)\n[![NPM downloads](http://img.shields.io/npm/dm/atool-build.svg?style=flat)](https://npmjs.org/package/atool-build)\n[![Dependency Status](https://david-dm.org/ant-tool/atool-build.svg)](https://david-dm.org/ant-tool/atool-build)\n\n基于 webpack 的构建封装.\n\n----\n\n## 特性\n\n- 基于 webpack 实现\n- 支持通过 `webpack.config.js` 进行扩展 webpack 的配置项\n- 支持 [stage-0](https://babeljs.io/docs/plugins/preset-stage-0), [es2015](https://babeljs.io/docs/plugins/preset-es2015), react 和 less\n- 支持 hash 模式的构建, 并生成映射表 `map.json`\n- 支持 typescript\n\n## 安装\n\n```bash\n$ npm i atool-build --save\n```\n\n## 使用\n\n```bash\n$ atool-build [options]\n```\n\n### 命令行参数\n\n```bash\n$ atool-build -h\n\n  Usage: atool-build [options]\n\n  Options:\n\n    -h, --help                output usage information\n    -v, --version             output the version number\n    -o, --output-path \u003cpath\u003e  output path\n    -w, --watch [delay]       watch file changes and rebuild\n    --hash                    build with hash and output map.json\n    --publicPath \u003cpublicPath\u003e webpack publicPath\n    --devtool \u003cdevtool\u003e       sourcemap generate method, default is null\n    --config \u003cpath\u003e           custom config path, default is webpack.config.js\n    --no-compress             build without compress\n    --silent                  build without notify\n```\n\n### 配置扩展\n\n如果需要对内置的 webpack 配置进行修改, 可在项目根目录新建 `webpack.config.js` 进行扩展.\n\n\n让 `webpack.config.js` 输出 `Function`, 比如:\n\n```javascript\nvar path = require(\"path\");\nmodule.exports = function(webpackConfig) {\n  webpackConfig.output.path = path.join(__dirname, './public');\n  return webpackConfig;\n};\n```\n\n参数:\n\n- `webpackConfig` -- 默认配置, 修改后返回新的配置\n\n\n详细内容：[atool-build 基本使用](http://ant-tool.github.io/atool-build.html)\n\n\n## FAQ\n\n\u003e 如何在 webpack.config.js 中引用 webpack ? (新增插件需要)\n\n`var webpack = require('atool-build/lib/webpack');`\n\n[#32](https://github.com/ant-tool/atool-build/issues/32)\n\n\u003e 为什么 TypeScript 错误不会显示？\n\n自行添加 [fork-ts-checker-webpack-plugin](https://github.com/Realytics/fork-ts-checker-webpack-plugin)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fant-tool%2Fatool-build","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fant-tool%2Fatool-build","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fant-tool%2Fatool-build/lists"}