node package manager

atla-data

Atla Data

This repository contains angular 2 services and configuration for interacting with Oseberg data services. Authentication is handled automatically if the proper jwt exists in local storage.

Using the search services.

Configuration files for particular environments exist within the config/ folder. See this project's boot.ts file for a usage example of how to provide the proper configuration file. Your project should provide your chosen configuration file in a similar manner.

Using data cache.

This project also contains services for caching data. Look in the cache/ folder for support services. Any class you want to make cachable must implement the ISerializable interface.

Running

npm install
gulp serve

To run in browser, hit the url shown in the console after running gulp serve. (Usually http://localhost:3000)

To run in electron, first use gulp serve followed by npm start

Development

1 TypeScript Compiler

You will need the typescript compiler installed to compile the project.

npm install typescript -g

Run tsc in the project root to compile the project. Currently no auto-watch is implemented and compiles have to be run manually or set up separately.

See https://github.com/Microsoft/TypeScript#readme

2 Typings Manager

Install Typescript Definition Manager to add type definition files for 3rd party modules.

npm install typings -g

See https://github.com/typings/typings#readme

Testing

Install Jasmine for unit testing.

npm install -g jasmine

See https://github.com/jasmine/jasmine-npm#readme

Run tests continuously using the npm script. This command will cause tests to be rerun on any file change, automatically outputting a code coverage report.

npm tdd

Test coverage is always running in the background with the gulp watch command. To see coverage reports updated in real time use gulp coverage and a browser window will launch with said report.