# @norejs/cli

> nore rollup cli

Latest version **0.0.5** (published 2023-08-14) · ISC license · 0 weekly downloads

> **Deprecated.** This package is deprecated.

## Install

```sh
npm install @norejs/cli
pnpm add @norejs/cli
yarn add @norejs/cli
bun add @norejs/cli
```

Provides the commands `nore`, `norejs`.

## Health

**Score 10/100 (F)** — status: deprecated.

Negative: deprecated.

## Facts

| | |
|---|---|
| Version | 0.0.5 |
| Published | 2023-08-14 |
| First published | 2022-05-22 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 28 |
| Unpacked size | 19.4 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | nore |
| Maintainers | pengzai-dev |
| Keywords | nore, rollup, cli, builder, esm, cjs, cli, typescript |

## Links

- npm: https://www.npmjs.com/package/@norejs/cli
- Repository: https://github.com/norejs/norejs
- Homepage: https://github.com/norejs/norejs#readme
- Issues: https://github.com/norejs/norejs/issues
- npm.io page: https://npm.io/package/@norejs/cli

## Dependencies (28)

- [less](https://npm.io/package/less.md) ^4.1.3
- [yalc](https://npm.io/package/yalc.md) ^1.0.0-pre.53
- [chalk](https://npm.io/package/chalk.md) ^4.1.2
- [jsdoc](https://npm.io/package/jsdoc.md) ^3.6.7
- [lerna](https://npm.io/package/lerna.md) ^5.5.2
- [tslib](https://npm.io/package/tslib.md) ^2.4.0
- [rollup](https://npm.io/package/rollup.md) ^2.59.0
- [core-js](https://npm.io/package/core-js.md) 3
- [postcss](https://npm.io/package/postcss.md) ^8.4.24
- [colorful](https://npm.io/package/colorful.md) ^2.1.0
- [fs-extra](https://npm.io/package/fs-extra.md) ^10.0.0
- [commander](https://npm.io/package/commander.md) ^8.3.0
- [typescript](https://npm.io/package/typescript.md) ^4.6.4
- [@babel/core](https://npm.io/package/@babel/core.md) ^7.16.0
- [@babel/register](https://npm.io/package/@babel/register.md) ^7.16.0
- [@babel/preset-env](https://npm.io/package/@babel/preset-env.md) ^7.18.9
- [rollup-plugin-sass](https://npm.io/package/rollup-plugin-sass.md) ^1.2.12
- [@babel/preset-react](https://npm.io/package/@babel/preset-react.md) ^7.22.3
- [@rollup/plugin-alias](https://npm.io/package/@rollup/plugin-alias.md) ^5.0.0
- [@rollup/plugin-babel](https://npm.io/package/@rollup/plugin-babel.md) ^5.3.0
- [rollup-plugin-terser](https://npm.io/package/rollup-plugin-terser.md) ^7.0.2
- [rollup-plugin-postcss](https://npm.io/package/rollup-plugin-postcss.md) ^4.0.2
- [rollup-plugin-filesize](https://npm.io/package/rollup-plugin-filesize.md) ^9.1.1
- [@rollup/plugin-commonjs](https://npm.io/package/@rollup/plugin-commonjs.md) ^21.0.1
- [@rollup/plugin-typescript](https://npm.io/package/@rollup/plugin-typescript.md) ^8.3.2
- [@rollup/plugin-node-resolve](https://npm.io/package/@rollup/plugin-node-resolve.md) ^13.0.6
- [rollup-plugin-resolve-index](https://npm.io/package/rollup-plugin-resolve-index.md) ^0.0.5
- [rollup-plugin-postcss-webpack-alias-less-loader](https://npm.io/package/rollup-plugin-postcss-webpack-alias-less-loader.md) ^1.0.0

## Alternatives

- [@salesforce/cli](https://npm.io/package/@salesforce/cli.md) — 389.7K weekly downloads
- [@mintlify/cli](https://npm.io/package/@mintlify/cli.md) — 208.9K weekly downloads
- [@grafana/e2e-selectors](https://npm.io/package/@grafana/e2e-selectors.md) — 128.7K weekly downloads
- [mintlify](https://npm.io/package/mintlify.md) — 112.0K weekly downloads
- [@intlayer/cli](https://npm.io/package/@intlayer/cli.md) — 22.8K weekly downloads

## Recent versions

- 0.0.5 (latest) — 2023-08-14
- 0.0.4 — 2023-07-31
- 0.0.3 — 2023-07-31
- 0.0.1 — 2022-05-22

## README

# @nore-js/cli


## @norejs/cli - A Minimalist JS Package Building Tool

If you want to develop a JS package, `@nore/js` can save you from the hassle of configuring `rollup`, `babel`, `eslint`, and more.

## Main Features:
* TypeScript Support
* JSX and TSX Support
* React Component Development Support
* Sass Support
* Export as ES Modules (ESM) and CommonJS (CJS)
* Support for Configuring Extension Features
* Support for Local Debugging with `yalc`

# Usage
## Installation
```bash
npm i @norejs/cli
```
## Project Directory
You need to manually create the following directory structure:
```bash
├── src
│   ├── index.ts # Entry file
├── package.json
```

## Modify package.json
``` json
{
  // ...
  "main": "dist/index.js",
  "module": "dist/index.esm.js",
  "scripts": {
    "start": "nore start",
    "build": "nore build"
  }
  // ...
}
```
## Development
```bash
npm start
```
After running, it will automatically monitor the changes of files in the `src` directory. When the files change, it will automatically rebuild and publish to the local repository of `yalc`. You can use the `yalc link` command to link the local repository package to your project for debugging.

## Build
```bash
npm run build
```

## Configuration
If you want to customize the configuration, you can create a `nore.config.js` file in the root directory of the project. The configuration items are as follows:
``` javascript
// nore.config.js
module.exports = function rollupConfig(config, options) {
    // config is the current rollup configuration, modify it here and return a new config
    return config;
};
```


----
## @norejs/cli 极简的 JS package 构建工具

如果你想开发一个 JS package, `@nore/js` 可以帮你省去 `rollup`、`babel`、`eslint` 等配置的烦恼
## 主要包含以下功能：
* 支持 typescript
* 支持 jsx、tsx
* 支持 react 组件开发
* 支持 sass
* 支持导出 ESM、CJS
* 支持配置扩展功能
* 支持 yalc 本地调试

# 使用
## 安装
```bash
npm i @norejs/cli
```

## 项目目录
需要手动创建目录结构，目录结构如下：

```bash
├── src
│   ├── index.ts # 入口文件
├── package.json
```

## 修改 package.json
```json
{
  // ...
  "main": "dist/index.js",
  "module": "dist/index.esm.js",
  "scripts": {
    "start": "nore start",
    "build": "nore build"
  }
  // ...
}
```

## 开发
```bash
npm start
```
运行后，会自动监听 src 目录下的文件变化，当文件变化时，会自动重新构建，同时会自动发布至 yalc 本地仓库, 你可以使用 yalc link 命令将本地仓库的包链接到你的项目中进行调试

## 构建
```bash
npm run build
```

## 配置
如果你想自定义配置，可以在项目根目录下创建 nore.config.js 文件，配置项如下：
``` javascript
// nore.config.js
module.exports = function rollupConfig(config, options) {
    // config 是当前正在使用的rollup配置，在这里修改后返回一个新的config
    return config;
};
```

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