0.0.33 • Published 8 years ago

dalijs v0.0.33

Weekly downloads
8
License
MIT
Repository
github
Last release
8 years ago

dali Build Status

ES6 framework for creating web applications.

Introduction

dali use babel to compile ES6 code into ES5.

dali allows to use features of ES6 and some of ES7 like decorators, class properties, export extensions or function bind syntax.

dali is currently in development phase. We don't recommend using for production applications.

Installation

dali is available on npm.

$ npm install dalijs

Decorators

Decorators make it possible to annotate and modify classes and properties at design time.

@Component

  • Name
import {Component} from 'dali';

@Component({
    name : 'my-component'
})
class MyComponent {
}

@Inject

import {Inject} from 'dali';

class Test {
  myMethod() {}
}

@Inject(Test)
class MyComponent {
  constructor(test) {
    test.myMethod();
  }
}

@Directive

  • Name
import {Directive} from 'dali';

@Directive({
  name : 'my-directive'
})
class MyDirective {
  render(data, element, value) {
  }
}

@Filter

import {Filter} from 'dali';

@Filter
export class JsonFilter {
  render(value) {
    return JSON.stringify(value);
  }
}

@RouterConfig

  • Title
  • Default
  • Path
import {RouterConfig} from 'dali';

@RouterConfig({
  title: 'Module 1',
  default: true,
  path : '/path'
})

@Runnable

import {Runnable} from 'dali';

@Runnable
class Test {
}

@View

  • Template
  • TemplateURL
import {View} from 'dali';

@View({
  templateUrl: 'module1/module1_view.html'
})
class Test {
}

@Bindable

import {Bindable} from 'dali';

class Test {
  @Bindable
  name;
}

@Json

import {Json} from 'dali';

@Json
class Test {
}

Test.fromJson(...)

var model = new Test();
test.toJson();

@JsonPropertyOrder

import {JsonPropertyOrder} from 'dali';

@JsonPropertyOrder('description', 'title')
class Test {
}

@JsonIgnoreProperties

import {JsonIgnoreProperties} from 'dali';

@JsonIgnoreProperties('from', 'to')
class Test {
}

@JsonProperty

import {JsonProperty} from 'dali';

class Test {
  @JsonProperty
  title = "title";
}

@JsonIgnore

import {JsonIgnore} from 'dali';

@Json
class Test {
  @JsonIgnore
  from = new Date();
}

@Async

import {Async} from 'dali';

@Async
class MyTask {
  execute(a, b) {
    return a+ b;
  }
}

var task = new MyTask();
task.execute(2, 2).then((result) => {
  console.log(result);
});

More info and complete example in Seed project.

License

(The MIT License)

Copyright (c) 2015 Iván Rodríguez epplestun@gmail.com

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

0.0.33

8 years ago

0.0.32

8 years ago

0.0.31

8 years ago

0.0.30

8 years ago

0.0.29

8 years ago

0.0.28

8 years ago

0.0.27

8 years ago

0.0.26

8 years ago

0.0.25

8 years ago

0.0.24

9 years ago

0.0.23

9 years ago

0.0.22

9 years ago

0.0.21

9 years ago

0.0.20

9 years ago

0.0.19

9 years ago

0.0.18

9 years ago

0.0.17

9 years ago

0.0.16

9 years ago

0.0.15

9 years ago

0.0.14

9 years ago

0.0.13

9 years ago

0.0.12

9 years ago

0.0.11

9 years ago

0.0.10

9 years ago

0.0.9

9 years ago

0.0.8

9 years ago

0.0.7

9 years ago

0.0.6

9 years ago

0.0.5

9 years ago

0.0.4

9 years ago

0.0.3

9 years ago

0.0.2

9 years ago

0.0.1

9 years ago