azure-functions-bundle
Write Azure Functions using ES Modules, and bundle them using Rollup to a dist folder to ensure smaller functions and fixed dependencies getting shipped to Azure.
Last updated 3 months ago by antstanley .
ISC · Original npm · Tarball · package.json
$ cnpm install azure-functions-bundle 
SYNC missed versions from official npm registry.

Azure Functions Bundle

Write Azure Functions using ES Modules, and bundle them using Rollup to a dist folder to ensure smaller functions and fixed dependencies getting shipped to Azure.

Install

npm install --save-dev azure-functions-bundle

Usage

npx afbundle

Options

Specify the location of the bundler config file to be used. Must be a JSON file

-c | -config <file location>

Config File

By default the CLI will look for azurebundle.config.json in the root of the folder.

{
    "dist": "<dist folder>",
    "entries": [
        {
            "name": "<function App Name>",
            "folder": "<Root folder of Function App source>"
        }
    ],
    "rollupConfig": "OPTIONAL: <RollupJS Input options>"
}

dist Required - Distribution folder that the Function Apps will be bundled too

entries Required - Array consisting of an object with the following properties.

  • name Required - The name of the Function App that will be shipped

  • folder Required - The root source folder of the Function App that must be bundled

rollupConfig Optional - Override the default config that Rollup uses to bundle the Function Apps. Correlates to the RollupJS input options as defined here https://rollupjs.org/guide/en/#rolluprollup

The following Rollup and Babel plugins are bundled with the project, and be configured through the rollupConfig property.

  • rollup-plugin-node-resolve
  • rollup-plugin-commonjs
  • rollup-plugin-json
  • rollup-plugin-babel
  • rollup-plugin-node-builtins
  • @babel/preset-env
  • @babel/plugin-syntax-import-meta

zip Optional - boolean By default zip files of each Function App will be created in the dist folder. If set to false, the zip files will not be created.

Basic Example

{
    "dist": "./dist",
    "entries": [
        {
            "name": "prodFunction",
            "folder": "./src/myFunctionApp"
        }
    ]
}

Current Tags

  • 0.1.3                                ...           latest (3 months ago)

4 Versions

  • 0.1.3                                ...           3 months ago
  • 0.1.2                                ...           3 months ago
  • 0.1.1                                ...           3 months ago
  • 0.1.0                                ...           3 months ago
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 1
Last Day 0
Last Week 1
Last Month 4
Dev Dependencies (8)
Dependents (0)
None

Copyright 2014 - 2016 © taobao.org |