This repository has been archived by the owner on Mar 7, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 364
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: 新增 Node.js 的构建 API remax/build (#1040)
- Loading branch information
Showing
3 changed files
with
27 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 对象。 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
export { build as buildApp } from '@remax/cli/lib/build'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
module.exports.buildApp = require('@remax/cli/lib/build').build; |
04f79fb
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Successfully deployed to following URLs: