# require-to-webpack-cli

> A simple CLI for scaffolding requirejs projects.

Latest version **1.0.1** (published 2019-09-30) · MIT license · 0 weekly downloads

## Install

```sh
npm install require-to-webpack-cli
pnpm add require-to-webpack-cli
yarn add require-to-webpack-cli
bun add require-to-webpack-cli
```

Provides the command `require`.

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.1 |
| Published | 2019-09-30 |
| First published | 2019-09-30 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 7 |
| Unpacked size | 11 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | Alex |
| Maintainers | alexjia |
| Keywords | require, webpack |

## Links

- npm: https://www.npmjs.com/package/require-to-webpack-cli
- Repository: https://github.com/HbuJiaTian/require-cli
- Homepage: https://github.com/HbuJiaTian/require-cli#readme
- Issues: https://github.com/HbuJiaTian/require-cli/issues
- npm.io page: https://npm.io/package/require-to-webpack-cli

## Dependencies (7)

- [ora](https://npm.io/package/ora.md) ^3.4.0
- [chalk](https://npm.io/package/chalk.md) ^2.4.2
- [figlet](https://npm.io/package/figlet.md) ^1.2.3
- [fs-extra](https://npm.io/package/fs-extra.md) ^8.0.1
- [inquirer](https://npm.io/package/inquirer.md) ^6.4.0
- [commander](https://npm.io/package/commander.md) ^2.20.0
- [handlebars](https://npm.io/package/handlebars.md) ^4.1.2

## Alternatives

- [raw-loader](https://npm.io/package/raw-loader.md) — 4.3M weekly downloads
- [plop](https://npm.io/package/plop.md) — 1.4M weekly downloads
- [webpack-deadcode-plugin](https://npm.io/package/webpack-deadcode-plugin.md) — 80.3K weekly downloads
- [@storybook/preact-vite](https://npm.io/package/@storybook/preact-vite.md) — 54.2K weekly downloads
- [vite-plugin-transform](https://npm.io/package/vite-plugin-transform.md) — 2.4K weekly downloads

## Recent versions

- 1.0.1 (latest) — 2019-09-30

## README

# require-cli

A simple CLI for scaffolding require projects

## Installing

Using npm:

```bash
$ npm install -g require-to-webpack-cli
```

## Quick Start

Create the app:

```bash
$ require init
```

Install dependencies:

```bash
$ npm install
```

Rock and Roll

```bash
$ npm run build
```

注：安装时将项目名改为对应页面项目名

## 迁移步骤

1. 将 requirejs 的页面入口文件代码（路径目录：\_pkg/job/）复制到/src/index.js 中；
2. 将引用模块文件拷贝到 job 或 common 中（对应原引用路径）
3. 将 index.js 的入口引用路径改为相对路径（./job）
4. 页面 css 拷贝到 src/css 文件夹下，打包时会自动 copy 到 dist/css 目录下

## 代码执行中容易出现的问题：

1. xxx is not defined：由于变量声明没有加 var 导致

---
_Source: https://npm.io/package/require-to-webpack-cli · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
