This repository holds the TypeScript source code and distributable bundle of azure-seed/azure-functions-typescript
.
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:
- Ready-to-go build system using Webpack to work with TypeScript.
- Managing the type definitions using @types.
- Minifying the production builds using UglifyJS Webpack Plugin.
- Unit tests with Jest, including code coverage.
- Seamless integration with CircleCI continuous integration and delivery platform.
- Automatic deployment to Azure Functions.
- backend-tslint-rules as configuration preset for TSLint.
You can find the project documentation here.
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
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
If you want to file a bug, contribute some code, or improve documentation, please read up on the following contribution guidelines:
The MIT License (MIT)
Copyright (c) 2018 Burak Tasci