/availity-toolkit

Starter project for Angular apps on the Availity platform

Primary LanguageJavaScriptMIT LicenseMIT

availity-toolkit

Starter project for Angular apps on the Availity platform.

Table of Contents

Requirements

  • node.js - brew install node (mac)
  • node-gyp - is a cross-platform command-line tool for compiling native add-on modules for Node.js. Please review your system requirements for Node to function properly.
  • git - brew install git (mac)
  • gulp - npm install -g gulp
  • bower - npm install -g bower

Features

The Toolkit combines several projects that simplify developing web applications on Availity platform. These projects include:

Getting Started

  • git clone https://github.com/Availity/availity-toolkit {{your-project-name}}
  • cd {{your-project-name}}
  • npm install availity-workflow --save-dev
  • bower install availity-uikit availity-angular --save
  • npm install - install module dependencies
  • run the CLI for project initialization by updating the package.json, bower.json and availity.json meta info.
    • Windows: node_modules\.bin\av init
    • Mac: ./node_modules/.bin/av init
  • gulp
    • starts the development server on http://localhost:3000

Git

Before pushing to Git repository:

  • cd into {{your-project-name}}
  • delete the .git folder else you will contain availity-toolkit history inside your project
  • git init
  • git remote add origin ssh://{{your-git-url}}.git
  • git push to your Git repo

Upgrading

Always check the release logs for changes

Upgrading Availity bower modules

bower install availity-uikit availity-angular --save

Upgrading the Toolkit workflow

npm install availity-workflow --save-dev

Troubleshooting

  • Git protocol blocked by firewall
    • git config --global url."https://".insteadOf git://
  • Windows installation issues
  • EADDRNOTAVAIL
    • Change bind address from 0.0.0.0 to 127.0.0.1 or localhost for your web server configuration

Gulp

A gulpfile.js is included your project and has been seeded with the following tasks:

  • gulp - starts the development server on http://localhost:3000
  • gulp test - executes your spec files using the Karma test runner and Phantom.js
  • gulp test:server - equivalent to the gulp test command but the Karma server continuously runs so that unit tests can be debugged.
  • gulp lint - checks for stylistic and programming errors using ESLint. Two .eslintrc/.eslintrc files are included in your project using the Availity Shared ESLint standards . The .eslintrc file in the projec/app folder is configured for web development and ES3 support.
  • NODE_ENV=production gulp release - bundles and versions the toolkit project into the ./dist folder
  • NODE_ENV=staging gulp release - bundles the toolkit project with cache busting into the ./build folder

CLI

  • /node_modules/.bin/av --help

Best Practices

We encourage you to organize your project using feature folders and dashes - within file names for readability.

Good
├── project
|    ├── app/
|    |    ├── orders/
|    |    |   ├── tests/
|    |    |   |   └──orders-directive-spec.js
|    |    |   |   └──orders-service-spec.js
|    |    |   ├── templates/
|    |    |   |   └──orders-template.html
|    |    |   ├── orders-directive.js
|    |    |   ├── orders-controller.js
|    |    |   └── orders-service.js
|    |    ├── users/
|    |    |   ├── tests/
|    |    |   |   └──users-directive-spec.js
|    |    |   |   └──users-service-spec.js
|    |    |   ├── templates/
|    |    |   |   └──users-template.html
|    |    │   ├── users-directive.js
|    |    │   ├── users-controller.js
|    |    |   └── order-service.js
|    |    ├── index.js
|    |    ├── vendor.js
|    |    ├── module.js
|    |    ├── index.html
Bad
├── project
│    ├── app/
│    │    ├── controllers/
│    │    │   ├── homeController.js
│    │    │   └──loginController.js
│    │    ├── directives/
│    │    │   ├── usersDirective.js
│    │    │   └──ordersDirective.js
│    │    ├── services/
│    │    │   ├── userService.js
│    │    │   ├── orderService.js
│    │    │   └── loginService.js

Authors

Robert McGuinness

Robert Warner

Kasey Powers

Disclaimer

Open source software components distributed or made available in the Availity Materials are licensed to Company under the terms of the applicable open source license agreements, which may be found in text files included in the Availity Materials.

License

Copyright (c) 2015 Availity, LLC. Code released under the the MIT license