Skip to content

Files

120 lines (90 loc) · 3.2 KB

SETUP.md

File metadata and controls

120 lines (90 loc) · 3.2 KB

TrimetCommuter

Installation & Setup

These instructions assume you're using Mac OSx.

Here are some links in case you need information about setup for other operating systems:
Node JS; Node via CLI; Angular; Jasmine; Karma; TypeScript.

Basic Setup

You will need to have these tools installed on your machine. They may already be installed - see the 'Confirm installation' sections below.

Install Node JS:

This uses Homebrew: (for other modes of installation see Node via CLI)

$ brew install node

Confirm installation:

$ node -v
(should return something like: v11.9.0)

$ npm -v
(should return something like: 6.7.0)

Confirm installation:

$ tsc -v
(should return something like: Version 2.1.4)

Install Angular globally:

$ npm install -g @angular/cli

Confirm installation:

$ ng -v

You should get something like this in return:

    _                      _                 ____ _     ___
   / \   _ __   __ _ _   _| | __ _ _ __     / ___| |   |_ _|
  / △ \ | '_ \ / _` | | | | |/ _` | '__|   | |   | |    | |
 / ___ \| | | | (_| | |_| | | (_| | |      | |___| |___ | |
/_/   \_\_| |_|\__, |\__,_|_|\__,_|_|       \____|_____|___|
               |___/

Angular CLI: 7.3.0
Node: 8.8.1
OS: darwin x64
Angular:
...

Install TypeScript:

This uses Node Package Manager (npm) which was installed in an earlier step:

$ npm install typescript -g

OPTIONAL :: Install the Atom-TypeScript package:

$ apm install atom-typescript

Fork the repository from GitHub.
Clone your forked repository.

Use your preferred command line/terminal to navigate into the directory:

cd trimet-commuter/

Open the project in a text editor like Atom or VS Code.

Run the application

In the project root directory run the command:

npm install

Run the command:

ng serve --open

Your default browser should open a new window or tab with the website/app ready to use at localhost:4200.

Angular CLI commands

Development server

Run ng serve for a dev server. Navigate to http://localhost:4200/. The app will automatically reload if you change any of the source files.

Code scaffolding

Run ng generate component component-name to generate a new component. You can also use ng generate directive|pipe|service|class|guard|interface|enum|module.

Build

Run ng build to build the project. The build artifacts will be stored in the dist/ directory. Use the --prod flag for a production build.

Running unit tests

Run ng test to execute the unit tests via Karma.

Running end-to-end tests

Run ng e2e to execute the end-to-end tests via Protractor.

Further help

To get more help on the Angular CLI use ng help or go check out the Angular CLI README.