Skip to content
This repository has been archived by the owner on Mar 7, 2024. It is now read-only.

Commit

Permalink
feat: 新增 Node.js 的构建 API remax/build (#1040)
Browse files Browse the repository at this point in the history
  • Loading branch information
yesmeck committed Jun 5, 2020
1 parent c300c33 commit 04f79fb
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 0 deletions.
25 changes: 25 additions & 0 deletions docs/api/remax-build.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
---
title: remax/build
---

`remax/build` 下包含构建 Remax 应用的 Node.js API,方便把 Remax 集成到你自己的构建流程中。

_带有 `?` 的选项表示非必填项_

## buildApp(options)

构建 Remax 应用。

```javascript
const { buildApp } = require('remax/build');

buildApp({ target: 'ali', output: 'build' });
```

#### 参数

- `options` - `remax.config.js` 里支持的配置和命令行的参数

#### 返回值

webpack 的 compiler 对象。
1 change: 1 addition & 0 deletions packages/remax/build.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export { build as buildApp } from '@remax/cli/lib/build';
1 change: 1 addition & 0 deletions packages/remax/build.js
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
module.exports.buildApp = require('@remax/cli/lib/build').build;

1 comment on commit 04f79fb

@vercel
Copy link

@vercel vercel bot commented on 04f79fb Jun 5, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.