{"id":22696188,"url":"https://github.com/vicsolwang/webpack-base-cli","last_synced_at":"2025-04-13T03:26:29.942Z","repository":{"id":139610854,"uuid":"235505782","full_name":"VicSolWang/webpack-base-cli","owner":"VicSolWang","description":"Use webpack to build project","archived":false,"fork":false,"pushed_at":"2020-03-17T01:35:45.000Z","size":45,"stargazers_count":5,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2024-12-20T00:33:58.490Z","etag":null,"topics":["cli","webpack"],"latest_commit_sha":null,"homepage":"https://www.npmjs.com/package/webpack-base-cli","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/VicSolWang.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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-01-22T05:33:39.000Z","updated_at":"2020-07-20T05:00:11.000Z","dependencies_parsed_at":null,"dependency_job_id":"3179287c-f8bb-4caf-9e51-4c724832f66d","html_url":"https://github.com/VicSolWang/webpack-base-cli","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/VicSolWang%2Fwebpack-base-cli","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/VicSolWang%2Fwebpack-base-cli/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/VicSolWang%2Fwebpack-base-cli/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/VicSolWang%2Fwebpack-base-cli/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/VicSolWang","download_url":"https://codeload.github.com/VicSolWang/webpack-base-cli/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248658959,"owners_count":21141041,"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":["cli","webpack"],"created_at":"2024-12-10T04:14:47.845Z","updated_at":"2025-04-13T03:26:29.933Z","avatar_url":"https://github.com/VicSolWang.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# webpack-base-cli\n\n[![NPM version](https://img.shields.io/npm/v/webpack-base-cli)](https://www.npmjs.com/package/webpack-base-cli)\n[![node](https://img.shields.io/node/v/webpack-base-cli)](https://nodejs.org)\n[![Build Status](https://travis-ci.com/VicSolWang/webpack-base-cli.svg?branch=master)](https://travis-ci.com/VicSolWang/webpack-base-cli)\n[![codecov](https://codecov.io/gh/VicSolWang/webpack-base-cli/branch/master/graph/badge.svg)](https://codecov.io/gh/VicSolWang/webpack-base-cli)\n[![NPM downloads](https://img.shields.io/npm/dt/webpack-base-cli)](https://www.npmjs.com/package/webpack-base-cli)\n\nUse webpack to build project\n\n# Installation\n\n    npm install --save-dev webpack-base-cli\n\n# Usage\n\n    webpack-base-cli build [options]\n\n## Command options\n\n    -p, --prod       Set production environment    [boolean] [default: false]\n    -c, --config     Set webpack config            [string]\n    -v, --version    Show version number\n    -h, --help       Show help\n\n\n### Example\n\n    webpack-base-cli build -p true  -c config.js\n\n#### Description\nDefault configuration is recommended, including config.js, babel.config.js, postcss.config.js, browserslist.js and other files. You can also configure these files by yourself, provided they are placed in the root directory of your project.\n\nThe default configuration of config.js is roughly as follows:\n\n    const path = require('path');\n\n    const config = {\n\t    path: {\n            src: path.resolve(process.cwd(), 'src'),\n            dev: path.resolve(process.cwd(), 'dev'),\n            prod: path.resolve(process.cwd(), 'output'),\n            devPublicPath: '/',\n            prodPublicPath: '',\n\t    },\n\t    devServerPort: 8888,\n\t    backEndServer: '',\n\t    hash: '-[hash:6]',\n\t    chunkhash: '-[chunkhash:6]',\n\t    contenthash: '-[contenthash:6]',\n\t    supportNewAPI: true,\n\t    imageCompress: true,\n\t    html: [{\n\t        name: 'index.html',\n\t        path: path.resolve(process.cwd(), 'src/index.html'),\n        }],\n\t    entry: {\n\t        index: [path.resolve(process.cwd(), 'src/index.js')]\n\t    },\n\t    favicon: path.resolve(process.cwd(), 'src/favicon.ico'),\n    };\n\nNote: generally speaking, you only need to configure path.prodPublicPath and backEndServer in your own config.js.\n\n# License\n\n[MIT](LICENSE).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvicsolwang%2Fwebpack-base-cli","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fvicsolwang%2Fwebpack-base-cli","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvicsolwang%2Fwebpack-base-cli/lists"}