Giter Club home page Giter Club logo

ts-skeleton's Introduction

Future proof application skeleton

Build Status Dependency Status

This is an example of application skeleton written full in TypeScript 1.6 including: unit and e2e test samples, bundling (minification, ng-annotate) and most needed automation tasks with gulp.

Example contains simple implementation of Angular:

  • controller
  • service
  • directive
  • ui router
  • toastr
  • ngannotate

Technology Stack


  • TypeScript
  • JSPM
  • Karma
  • Mocha
  • Chaijs
  • Sinonjs
  • Protractor
  • Gulp
  • Angular 1.x
  • Bootstrap from Twitter

Requirements


  • nodejs 4.+
  • npm 3.+

Installing dependencies


npm install gulp jspm typescript tsd -g
git cone https://github.com/b091/ts-skeleton.git
npm install

Gulp tasks


Serve application or documentation to browser

gulp serve            # Serves application, watch *.ts, recompile, reload
gulp serve --watch-js # Serves application, watch *.js, recompile, reload (useful with TypeScript IDE compilation)
gulp serve:dist       # Serves application from bundled dist file
gulp serve:docs       # Generates and serves documentation

Validate sources with specified rules defined in :

  • tslint.json for TypeScript
  • .jshintrc for JavaScript
gulp check              # check all
gulp check:jshint       # checks gulp tasks and gulpfile (only not generated js files in this repo)
gulp check:tslint       # checks TypeScript files from src/ and test/ directory
gulp check:tslint:src   # checks TypeScript files from src/ directory
gulp check:tslint:test  # checks TypeScript files from src/ directory

Angular Bundling

gulp ng:directives      # bundles directives from templateUrl to template
gulp ng:annotate        # adds ng annotate to typescript output

Remove compiled files

gulp clean      # clean all
gulp clean:src  # removes *.map, *.js files from source directory 
gulp clean:test # removes *.map, *.js files from test directory

Run TypeScript compiler

gulp compile      # compile all
gulp compile:src  # compile *.ts files from source directory
gulp compile:test # compile *.ts files from test directory

Build sources and documentation

gulp build      # build all
gulp build:dist # creates self executable distribution file into dist directory
gulp build:docs # generates documentation into docs directory

Run tests

gulp test       # all tests
gulp test:unit  # run unit tests from test/unit directory
gulp test:e2e   # run e2e tests from test/e2e directory

License

MIT

ts-skeleton's People

Contributors

b091 avatar

Watchers

 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.