Natively Pronounced Mandarin

    create-func-app

    1.13.0 • Public • Published

    Create Func App

    A tool to quickly set up a collaborative workspace of an azure function project with eslint, jest, gitlab-ci, lintstaged and prettier.

    Motivation

    When setting up a new workspace for azure functions I tended to use vscode for the azure function app template and then copy existing configuration files to enable eslint and prettier over and over again. It took time to figure out which dependencies are needed again and how the configuration files need to be adapted. Therefore I evaluated against https://xkcd.com/1205/ and concluded that this tool will save time in the future when writing azure function app projects.

    Usage

    npx create-func-app my-app
    cd my-app
    npm start
    

    Contents

    The tool will use the azure function core tools to setup a new workspace initially. It then adds all necessary dependencies for

    • eslint
    • prettier
    • jest
    • lint-staged

    to setup a collaborative workspace. It also adds an initial gitlab-ci configuration to configure install, test and build stages in the gitlab-ci pipeline.

    Available scripts are:

    • build - tsc
    • build:production - npm run prestart && npm prune --production
    • watch - tsc --w
    • prestart - npm run build && func extensions install
    • start:host - func start
    • start - npm-run-all --parallel start:host watch
    • test - jest
    • lint:fix - npm run lint -- --quiet --fix
    • lint - eslint --ignore-path .gitignore --ext .ts .
    • prettier - prettier --ignore-path .gitignore --write .
    • download-settings - func azure functionapp fetch-app-settings FUNCTIONAPP_NAME && func settings decrypt
    • upload-settings - func azure functionapp publish FUNCTIONAPP_NAME --publish-local-settings
    • deploy - npm run build && func azure functionapp publish FUNCTIONAPP_NAME,

    Every configuration is just setup initially as an example. They can be modified.

    Keywords

    none

    Install

    npm i create-func-app

    DownloadsWeekly Downloads

    11

    Version

    1.13.0

    License

    ISC

    Unpacked Size

    34.8 kB

    Total Files

    14

    Last publish

    Collaborators

    • jro_di