build-plugin-rax-faas

0.1.1 • Public • Published

build-plugin-rax-faas npm

build-scripts plugin for FaaS, the plugin based on Function Compute of Alibaba cloud.

The plugin support following features:

  • Integrated development experience, All codes are in the same directory
  • The easy way to run devServer in the local
  • The easy way to build client code and functions package

Usage

Dependencies

build-plugin-rax-faas based on Function Compute of Alibaba cloud, so you need install docker and @alicloud/fun first:

About docker instructions of installation, you can found in the docker docs.

Then install @alicloud/fun to your devDependencies:

$ npm install @alicloud/fun -D

And you need install build-plugin-rax-faas to your devDependencies:

$ npm install build-plugin-rax-faas -D

Configure

Add build-plugin-rax-faas to build.json like:

{
  "plugins": [
    [
      "build-plugin-rax-app",
      {
        "targets": ["web", "weex"]
      }
    ],
    [
      "build-plugin-rax-faas",
      {
        "aliyunConfig": {   // Your function compute config
          "id": "xxxxxxxx",
          "region": "cn-hangzhou"
        },
        "functionGroup": {
          "name": "raxTest",
          "root": "src/api", // The functions dir
          "functions": {
            "user": {
              "path": "user" // The function path relative to root config
            }
          }
        }
      }
    ]
  ]
}

Readme

Keywords

none

Package Sidebar

Install

npm i build-plugin-rax-faas

Weekly Downloads

1

Version

0.1.1

License

BSD-3-Clause

Unpacked Size

11.5 kB

Total Files

11

Last publish

Collaborators

  • oraaange
  • yacheng
  • rax-publisher