Skip to content

cranesandcaff/angular-rpg

 
 

Repository files navigation

Angular RPG Build Status

Project tooling based on Angular2 Webpack Starter ❤️

Quick start

Make sure you have Node version >= 5.0 and NPM >= 3

Clone/Download the repo then edit app.component.ts inside /src/app/app.component.ts

# clone our repo
# --depth 1 removes all but one .git commit history
git clone --depth 1 https://github.com/justindujardin/angular-rpg.git

# change directory to our repo
cd angular-rpg

# install the repo with npm
npm install

# start the server
npm start

# use Hot Module Replacement
npm run server:dev:hmr

# if you're in China use cnpm
# https://github.com/cnpm/cnpm

go to http://0.0.0.0:3000 or http://localhost:3000 in your browser

Getting Started

Dependencies

What you need to run this app:

  • node and npm (brew install node)
  • Ensure you're running the latest versions Node v4.x.x+ (or v5.x.x) and NPM 3.x.x+

If you have nvm installed, which is highly recommended (brew install nvm) you can do a nvm install --lts && nvm use in $ to run with the latest Node LTS. You can also have this zsh done for you automatically

Once you have those, you should install these globals with npm install --global:

  • webpack (npm install --global webpack)
  • webpack-dev-server (npm install --global webpack-dev-server)
  • karma (npm install --global karma-cli)
  • protractor (npm install --global protractor)
  • typescript (npm install --global typescript)

Installing

  • fork this repo
  • clone your fork
  • npm install webpack-dev-server rimraf webpack -g to install required global dependencies
  • npm install to install all dependencies or yarn
  • npm run server to start the dev server in another tab

Running the app

After you have installed all dependencies you can now run the app. Run npm run server to start a local server using webpack-dev-server which will watch, build (in-memory), and reload for you. The port will be displayed to you as http://0.0.0.0:3000 (or if you prefer IPv6, if you're using express server, then it's http://[::1]:3000/).

server

# development
npm run server
# production
npm run build:prod
npm run server:prod

Other commands

build files

# development
npm run build:dev
# production (jit)
npm run build:prod
# AoT
npm run build:aot

hot module replacement

npm run server:dev:hmr

watch and build files

npm run watch

run unit tests

npm run test

watch and run our tests

npm run watch:test

run end-to-end tests

# update Webdriver (optional, done automatically by postinstall script)
npm run webdriver:update
# this will start a test server and launch Protractor
npm run e2e

continuous integration (run unit tests and e2e tests together)

# this will test both your JIT and AoT builds
npm run ci

run Protractor's elementExplorer (for end-to-end)

npm run e2e:live

build Docker

npm run build:docker

Sponsors

angular-rpg is an open source project sponsored by JetBrains.

JetBrains

The project is built in and built in WebStorm, an excellent IDE for angular and Typescript development.

WebStorm IDE

About

RPG game built with Typescript, Angular, ngrx/store and rxjs

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • TypeScript 81.3%
  • JavaScript 8.5%
  • CSS 7.7%
  • HTML 2.5%