Skip to content
This repository has been archived by the owner on Nov 21, 2019. It is now read-only.

Seed project for backend development on Azure Functions with TypeScript

License

Notifications You must be signed in to change notification settings

fulls1z3/azure-functions-typescript

Repository files navigation

azure-seed/azure-functions-typescript

This repository holds the TypeScript source code and distributable bundle of azure-seed/azure-functions-typescript.

CircleCI codecov tested with jest Conventional Commits Greenkeeper badge

Please support this project by simply putting a Github star. Share this library with friends on Twitter and everywhere else you can.

azure-seed/azure-functions-typescript is following the common patterns and best practices in backend development on Azure Functions with TypeScript, using the following features:

You can find the project documentation here.

Table of contents:

Prerequisites

Please ensure that you are using Typescript v2.6.2 or higher.

You can install azure-seed/azure-functions-typescript by simply forking the repo:

# clone the repo
$ git clone https://github.com/azure-seed/azure-functions-typescript.git
$ cd azure-functions-typescript

Once you have cloned the repo, you can follow these steps to allow sync changes made in this repo with your fork:

# set up `origin`
$ git remote set-url origin [your-fork-repo]

# set up `upstream` to sync future changes
$ git remote add upstream https://github.com/azure-seed/azure-functions-typescript.git

# verify the upstream repo specified for your fork
$ git remote -v
origin    https://github.com/YOUR_USERNAME/[your-fork-repo].git (fetch)
origin    https://github.com/YOUR_USERNAME/[your-fork-repo].git (push)
upstream  https://github.com/azure-seed/azure-functions-typescript.git (fetch)
upstream  https://github.com/azure-seed/azure-functions-typescript.git (push)

# initial push for the fork
$ git push

Now, you can create a new directory (ex: src/some-other-function) to build your codebase out, while benefiting from the build and deployment tools included by this project.

In order to merge the latest upstream changes, simply follow:

# fetch the latest upstream
$ git fetch upstream

# merge the upstream changes
$ git merge upstream/master

then handle any conflicts, and go on with building your function app.

These are the scripts to lint, test and build this project:

# use `yarn` to install the dependencies
$ yarn

# clean artifacts
$ npm run clean

# run tslint
$ npm run lint

# run unit tests
$ npm test

# build
$ npm run build

Directory structure

azure-functions-typescript/
 ├──.circleci/
 |   └──config.yml                                          * CircleCI config
 ├──.github/                                                * issue & pr templates
 ├──coverage/                                               * test coverage reports
 ├──node_modules/                                           * dependencies
 ├──dist/                                                   * output directory to extract bundles
 |
 ├──src/
 |   ├──some-function/                                      * sample function
 |   | 
 |   ├──host.json                                           * hosts info
 |   └──local.settings.json                                 * settings to evaluate APIs at the local environment
 |
 ├──tools/
 |   ├──build/                                              * build tasks
 |   └──deploy/                                             * deployment tasks
 |
 ├──.gitignore                                              * GIT settings
 ├──.jshintrc                                               * jshint config
 ├──CHANGELOG.md                                            * change log
 ├──CODE_OF_CONDUCT.md                                      * code of conduct
 ├──CONTRIBUTING.md                                         * contributing info
 ├──LICENSE                                                 * software license
 ├──package.json                                            * deps management
 ├──README.md                                               * project information
 ├──test-report.xml                                         * JUNIT test results
 ├──tsconfig.json                                           * typescript config
 ├──tslint.json                                             * tslint config
 └──yarn.lock                                               * deps lockfile

Contributing

If you want to file a bug, contribute some code, or improve documentation, please read up on the following contribution guidelines:

Thanks to

  • JetBrains, for their support to this open source project with free WebStorm licenses.

License

The MIT License (MIT)

Copyright (c) 2018 Burak Tasci