w3tecch / ng2-ts-boilerplate

AngularJS 2.x + TypeScript + Karma + Webpack

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Build Status Dependency Status devDependency Status StackShare

Getting Started

Prerequisites

  1. Install Node.js

  2. Install these NPM packages globally

npm install -g webpack typescript typings karma

Dependencies

  1. Navigate to your project folder to install all dependencies
npm install

Commands

Running the server

npm start

Generate docs and start the docs server

npm run docs

Run test

npm test

Build the app

npm run build

Build the app

You can pass configurations to the app like this:

npm start --env prod

This can be passed to start and build command.

App Structure

projectRoot/
   |
   +-- config/ (configurations)
   +-- dist/ (minified app version will placed by gulp here with the task 'gulp dist')
   +-- docs/ (has the generated docs from typedoc)
   |
   +-- src/
   |   |
   |   +-- app/
   |   |   |
   |   |   + components/
   |   |   + models/
   |   |   + services/
   |   |   + utils/
   |   |   + modules/
   |   |   |   |
   |   |   |   + <moduleName>/
   |   |   |       |
   |   |   |       + components/
   |   |   |       |   |
   |   |   |       |   + <componentName>.ts
   |   |   |       |   + <componentName>.html
   |   |   |       |
   |   |   |       + filters/
   |   |   |       |   |
   |   |   |       |   + <filterName>.filter.js
   |   |   |       |
   |   |   |       + services/
   |   |   |           |
   |   |   |           + <serviceName>.service.js
   |   |   |
   |   |   + app.config.ts (represents the project configuration)
   |   |   + <appName>.ts (the app component)
   |   |   + <appName>.html (the app view)
   |   |   + <appName>.scss (the app styles)
   |   |
   |   +-- assets/
   |   |   |
   |   |   +-- fonts/
   |   |   +-- i18n/
   |   |   +-- images/
   |   |
   |   +-- index.html ("MAIN" - This is the start page of your single-page-application and has some gulp vars)
   |   +-- boot.ts
   |   +-- vendor.ts
   +-- typings-custom/ (custom type definition)

#Supporter

License

MIT

About

AngularJS 2.x + TypeScript + Karma + Webpack

License:MIT License


Languages

Language:CSS 37.4%Language:JavaScript 34.0%Language:TypeScript 17.1%Language:HTML 10.7%Language:MAXScript 0.7%