GithubHelp home page GithubHelp logo

angular2-ts-seed's Introduction

angular2-ts-seed

Join the chat on Gitter Dependency Status devDependency Status

A complete, yet simple, starter for Angular 2 using TypeScript.

This seed repo serves as an Angular 2 starter for anyone looking to get up and running with Angular 2 and TypeScript fast. Using Webpack 2 for building our files and assisting with boilerplate.

Notable features

  • TS
    • TS linting with TSLint, additional angular2 specific rules with Codelyzer.
    • Generate scaffold files (component, directive, pipe, service, route, action -, reducer -, selector-, effect for ngrx) with plop.
  • CSS
  • Development mode
    • Fast TS re-bundling.
    • File Watching and page reloading.
  • Production builds
    • TS and CSS minification.
    • Cache busting.
    • Local sever for testing production build.

Is Angular 2 Ready Yet?

Quick start

# clone our repo
$ git clone https://github.com/codewareio/angular2-ts-seed.git my-app

# change directory to your app
$ cd my-app

# install the dependencies with npm
$ npm i

# start mock json api
$ npm run start:mock-api

# start webpack-dev-server in a separate terminal session
$ npm start

navigate to http://localhost:3000 or http://0.0.0.0:3000 in your browser.

Table of Contents

Dependencies

What you need to run this app:

  • node and npm (use NVM)
  • Ensure you're running Node (v4.1.x+) and NPM (2.14.x+)

Installing

  • fork this repo
  • clone your fork
  • npm i to install all dependencies
  • npm run start:mock-api to start mock json api
  • npm start to start webpack-dev-server
  • navigate to http://localhost:3000

Running the app

After you have installed all dependencies you can now run the app. Run npm start 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).

Other commands

Please note, not all commands will be listed here, feel free to check out the npm scripts section in package.json.

build files for production and serve it

# production build
$ npm run build

# serve it, on port 8080
$ npm run start:prod

serve, watch and build files

$ npm start

# or

$ npm run start:dev

run linters

# run js lint
$ npm run lint:ts

# run scss lint
$ npm run lint:scss

generate scaffold files with plop

You can generate component, directive, pipe, service, route, action -, reducer -, selector-, effect for ngrx.

$ npm run generate

Frequently asked questions

  • What's the current browser support for Angular 2 Beta?
  • How do I start the app when I get EACCES and EADDRINUSE errors?
    • The EADDRINUSE error means the port 3000 is currently being used and EACCES is lack of permission for webpack to build files to ./dist/
  • What are the naming conventions for Angular 2?
  • Some dependencies are not met, what's going on?
    • es6-shim and reflect-metadata are dependencies of angular 2. We decided to include core-js as a better replacement.
  • What is the .github folder for?

angular2-ts-seed's People

Contributors

aegyed91 avatar

Watchers

James Cloos avatar Probably Brian avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.