Skip to content

Commit 8afa421

Browse files
mheverytbosch
authored andcommitted
first chunk of interfaces that are valid via dart analyzer
1 parent 29c20f7 commit 8afa421

40 files changed

Lines changed: 462 additions & 9 deletions

gulpfile.js

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -58,9 +58,10 @@ var sourceTypeConfigs = {
5858
compiler: function() {
5959
return traceur(js2dartOptions, true);
6060
},
61-
transpileSrc: ['modules/**/*.es6d'],
61+
transpileSrc: ['modules/**/*.js'],
6262
htmlSrc: ['modules/*/src/**/*.html'],
63-
copySrc: ['modules/**/*.dart'],
63+
// TODO: execute pub get after a yaml changed and was copied over to 'build' folder
64+
copySrc: ['modules/**/*.dart', 'modules/**/*.yaml'],
6465
outputDir: 'build/dart',
6566
outputExt: 'dart',
6667
mimeType: 'application/dart'
@@ -69,9 +70,9 @@ var sourceTypeConfigs = {
6970
compiler: function() {
7071
return traceur(js2es5Options, true);
7172
},
72-
transpileSrc: ['modules/**/*.es*'],
73+
transpileSrc: ['modules/**/*.js', 'modules/**/*.es6'],
7374
htmlSrc: ['modules/*/src/**/*.html'],
74-
copySrc: ['modules/**/*.js'],
75+
copySrc: ['modules/**/*.es5'],
7576
outputDir: 'build/js',
7677
outputExt: 'js'
7778
}
@@ -82,18 +83,25 @@ gulp.task('modules/clean', function() {
8283
.pipe(clean());
8384
});
8485

86+
function renameSrcToLib(file) {
87+
file.dirname = file.dirname.replace(/\bsrc\b/, 'lib');
88+
}
89+
8590
function createModuleTask(sourceTypeConfig, isWatch) {
8691
var start = isWatch ? watch : gulp.src.bind(gulp);
8792
return function(done) {
8893
var transpile = start(sourceTypeConfig.transpileSrc)
8994
.pipe(rename({extname: '.'+sourceTypeConfig.outputExt}))
95+
.pipe(rename(renameSrcToLib))
9096
.pipe(sourceTypeConfig.compiler())
9197
.pipe(gulp.dest(sourceTypeConfig.outputDir));
9298
var copy = start(sourceTypeConfig.copySrc)
99+
.pipe(rename(renameSrcToLib))
93100
.pipe(gulp.dest(sourceTypeConfig.outputDir));
94101
// TODO: provide the list of files to the template
95102
// automatically!
96103
var html = start(sourceTypeConfig.htmlSrc)
104+
.pipe(rename(renameSrcToLib))
97105
.pipe(ejs({
98106
type: sourceTypeConfig.outputExt
99107
}))
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
name: change_detection
2+
environment:
3+
sdk: '>=1.4.0'
4+
dependencies:
5+
dev_dependencies:
6+
unittest: '>=0.10.1 <0.12.0'
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
export class ChangeDetection {
2+
3+
detectChanges():int {}
4+
5+
}
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
export class ProtoRecord {
2+
3+
}
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
export class ProtoWatchGroup {
2+
watch(
3+
expression:String,
4+
context:dynamic,
5+
{isCollection})
6+
{
7+
8+
}
9+
}
10+
11+
/*
12+
@Component(
13+
bind: {
14+
'title': 'title',
15+
'name': 'name'
16+
}
17+
)
18+
class MyComponent implements ChangeListener {
19+
String name;
20+
String title;
21+
22+
onChange(List<Record> changes) {
23+
24+
}
25+
}
26+
27+
*/
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
export class Record {
2+
3+
}
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
export class WatchGroup {
2+
@FIELD('final dispatcher:WatchGroupDispatcher')
3+
constructor() {}
4+
}
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
2+
export class WatchGroupDispatcher {
3+
notify(record:Record, context) {}
4+
}

modules/core/pubspec.yaml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
name: core
2+
environment:
3+
sdk: '>=1.4.0'
4+
dependencies:
5+
change_detection:
6+
path: ../change_detection
7+
di:
8+
path: ../di
9+
facade:
10+
path: ../facade
11+
dev_dependencies:
12+
unittest: '>=0.10.1 <0.12.0'

modules/core/src/angular.js

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
/**
2+
* Define public API for Angular here
3+
*/
4+
export * from './annotations/directive';
5+
export * from './annotations/component';
6+
export * from './annotations/template_config';
7+
8+
export * from './compiler/compiler';
9+
export * from './compiler/template_loader';
10+
11+
export * from './view/proto_view';
12+
export * from './view/view';

0 commit comments

Comments
 (0)