0.2.1 • Published 10 years ago

toccata v0.2.1

Weekly downloads
3
License
MIT
Repository
github
Last release
10 years ago

Cresc Toccata

Cresc Toccata is the utility for AngularJS >= 1.3.14 / Angular 2.

Motivation

Migrating to Angular 2 is our concern. We make it possible to perform the migration in stages, we propose The Cresc Toccata krəs təkάːṭə, call me "Toccata". This is currently aware of TypeScript because of it uses the @Decorators syntax a lot. Also we're going to focus even for use in Babel.

Usage

In TypeScript or Babel (ES7 stage 1) syntax.

import {toccata as toccata_} from 'toccata';
import * as angular from 'angular'; // AngularJS 1.x
// or 
// import * as angular2 from 'angular2/angular2'; // Angular 2

const toccata = toccata_(angular);
// or 
// const toccata = toccata_(angular2);

const {Component, View, bootstrap} = toccata;

// The syntax such as Angular 2 in AngularJS 1.x
@Component({
  selector: 'hello'
})
@View({
  template: `<p>Hello!</p>`
})
class HelloController {
  constructor() {
    // noop
  }
}

bootstrap(HelloController);

NOTICE: Angular 2 is not supported building with Babel currently, we use ugly hacking for tests. Not recommended still you use in Angular 2.

TODO

  • Support default export of toccata (TypeScript 1.5-alpha has a problem)
  • Automatically e2e test (Now it has confirmed manually)
  • More migration support and further compatibility
  • Support without browserify, in other words support <script src="">
  • Flux in Angular

Goal

The migration from smooth AngularJS 1.x to Angular 2.

Author

License

MIT

0.2.1

10 years ago

0.2.0

10 years ago

0.1.0

10 years ago

0.1.0-rc.2

10 years ago

0.1.0-rc.1

10 years ago

0.0.1

10 years ago