{"id":23907569,"url":"https://github.com/gaia-hill/glue-core","last_synced_at":"2026-05-16T04:50:14.173Z","repository":{"id":94898952,"uuid":"285173099","full_name":"gaia-hill/glue-core","owner":"gaia-hill","description":"基于webpack的前端构建工具","archived":false,"fork":false,"pushed_at":"2021-02-23T05:07:45.000Z","size":295,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-02-10T20:06:13.476Z","etag":null,"topics":["glue","webpack"],"latest_commit_sha":null,"homepage":"","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/gaia-hill.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-08-05T03:53:28.000Z","updated_at":"2021-02-23T05:07:46.000Z","dependencies_parsed_at":"2023-04-02T13:33:34.498Z","dependency_job_id":null,"html_url":"https://github.com/gaia-hill/glue-core","commit_stats":null,"previous_names":["okmengzhilin/glue-core"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gaia-hill%2Fglue-core","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gaia-hill%2Fglue-core/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gaia-hill%2Fglue-core/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gaia-hill%2Fglue-core/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/gaia-hill","download_url":"https://codeload.github.com/gaia-hill/glue-core/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":240331318,"owners_count":19784643,"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":["glue","webpack"],"created_at":"2025-01-05T03:12:53.388Z","updated_at":"2026-05-16T04:50:14.111Z","avatar_url":"https://github.com/gaia-hill.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"\n[![npm version](https://img.shields.io/npm/v/glue-core.svg?style=flat)](https://www.npmjs.com/package/glue-core)\n\n\n## glue-core\n基于webpack的react构建工具\n\n\n\n#### 安装\n\n`npm i glue-core --save-dev`\n\n\n\n#### 使用\n\n1、进入项目初始化目录\n\n2、运行`glue init 项目名 [--ts]`，如果添加ts参数，则初始化为ts项目\n\n3、进入项目`cd 项目名`\n\n4、安装依赖`npm install`\n\n5、运行项目`npm start`\n\n\n\n#### 命令\n\nglue init 项目名     初始化项目\n\nglue start          启动项目\n\nglue build          构建项目\n\nglue help           显示帮助信息\n\nglue version        显示当前版本\n\n\n\n#### 目录结构\n\n```javascript\nsrc/                     // 源文件目录，入口文件路径\nbundle.config.js         // glue-core配置文件，详细见下文bundle配置\nwebpack.config.js        // 暴露webpack配置，可自行修改\npackage.json             // 项目package.json\n```\n\n\n#### bundle.config.js配置\n\n```javascript\n\nconst path = require('path')\nmodule.exports = function (appPath, env) {\n    return {\n        title: '项目标题',              //  页面标题\n        hash: true,                   //  构建时是否添加hash\n        favicon: '',                  //  页面图标\n        html: true,                   //  是否生成html文件\n        template: undefined,          //  模板路径\n        entry: {                      //  页面入口文件，默认{ index: path.join(appPath, \t\t\t'./src/index.js') }\n            index: path.join(appPath, './src/index.js')\n\t\t},\n        src: path.join(appPath, './src'),    //  项目源码目录\n        dist: path.join(appPath, './dist'),  //  项目构建输出目录\n        // tsConfigPath: path.join(appPath, './tsconfig.json'),    //  ts项目，ts配置文件路径，不填会自动使用默认配置\n        babelConfig: {},                  //  babel配置，参考babel文档\n        fix: false,                       //  是否自动修复eslint问题\n        lint: false,                      //  是否开启eslint，true或者{...eslintOptions}，具体配置可参考eslint官网 -\u003e Node.js API -\u003e new ESLint(options)\n        devServer: {                      //  dev-server文档，参考webpack文档中的配置\n            port: 9999\n        }\n    }\n}\n\n```\n\n#### webpack.config.js配置\n\n```javascript\n\nmodule.exports = function (webpackConfig, appPath, env) {\n    // 可在webpackConfig中添加自定义配置\n    return webpackConfig\n}\n\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgaia-hill%2Fglue-core","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgaia-hill%2Fglue-core","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgaia-hill%2Fglue-core/lists"}