chore(build): execute pub get
only if a pubspec.yaml changed and run dart analyzer
on all dart files
`pub get` is now only executed when the `pubspec.yaml` in the `modules` folder is different than the `pubspec.yaml` in the `build/dart` folder. Generates the file `build/dart/_analyzer.dart` that imports all modules to run `dart analyzer` against all of them. The build will fail whenever there are errors, warnings or hints in `dart analyzer`. Changes the sources so that `dart analyzer` does not report any error, warning or hint. Closes #40
This commit is contained in:
@ -2,8 +2,9 @@ name: change_detection
|
||||
environment:
|
||||
sdk: '>=1.4.0'
|
||||
dependencies:
|
||||
facade:
|
||||
path: ../facade
|
||||
dev_dependencies:
|
||||
test_lib:
|
||||
path: ../test_lib
|
||||
facade:
|
||||
path: ../facade
|
||||
guinness: ">=0.1.5 <0.2.0"
|
||||
|
@ -368,7 +368,7 @@ export class Scanner {
|
||||
}
|
||||
|
||||
error(message:string) {
|
||||
var position:int = this.index + this.offset;
|
||||
var position:int = this.index;
|
||||
throw `Lexer Error: ${message} at column ${position} in expression [${input}]`;
|
||||
}
|
||||
}
|
||||
|
@ -25,12 +25,14 @@ export class ProtoRecord {
|
||||
this.prev = null;
|
||||
this.changeNotifier = null;
|
||||
this._clone = null;
|
||||
}
|
||||
this.changeContext = null;
|
||||
this.dispatcherContext = null;
|
||||
}
|
||||
|
||||
instantiate(watchGroup/*:wg.WatchGroup*/):Record {
|
||||
var record = this._clone = new Record(watchGroup, this);
|
||||
record.prev = this.prev._clone;
|
||||
record._checkPrev = this._prev._clone;
|
||||
record._checkPrev = this.prev._clone;
|
||||
return _clone;
|
||||
}
|
||||
|
||||
|
@ -1,13 +1,11 @@
|
||||
import {describe, it, expect} from 'test_lib/test_lib';
|
||||
import {ProtoWatchGroup, WatchGroup, WatchGroupDispatcher} from 'change_detection/change_detection';
|
||||
import {DOM} from 'facade/dom';
|
||||
import {describe, it, xit, expect} from 'test_lib/test_lib';
|
||||
import {ProtoWatchGroup, WatchGroup, WatchGroupDispatcher, ChangeDetection} from 'change_detection/change_detection';
|
||||
|
||||
|
||||
export function main() {
|
||||
describe('change_detection', function() {
|
||||
describe('ChangeDetection', function() {
|
||||
it('should do simple watching', function() {
|
||||
return; // remove me once xit or CD works.
|
||||
xit('should do simple watching', function() {
|
||||
var person = new Person('misko', 38);
|
||||
var pwg = new ProtoWatchGroup();
|
||||
pwg.watch('name', 'nameToken');
|
||||
@ -32,11 +30,16 @@ export function main() {
|
||||
|
||||
class Person {
|
||||
constructor(name:string, age:number) {
|
||||
this.name = null;
|
||||
this.a
|
||||
this.name = name;
|
||||
this.age = age;
|
||||
}
|
||||
}
|
||||
|
||||
class Dispatcher extends WatchGroupDispatcher {
|
||||
class LoggingDispatcher extends WatchGroupDispatcher {
|
||||
constructor() {
|
||||
this.log = null;
|
||||
}
|
||||
clear() {
|
||||
|
||||
}
|
||||
}
|
||||
|
@ -1,6 +1,5 @@
|
||||
import {describe, it, expect} from 'test_lib/test_lib';
|
||||
import {Scanner, Token} from 'change_detection/parser/scanner';
|
||||
import {DOM} from 'facade/dom';
|
||||
import {List, ListWrapper} from "facade/collection";
|
||||
import {StringWrapper} from "facade/lang";
|
||||
|
||||
|
@ -11,3 +11,4 @@ dependencies:
|
||||
dev_dependencies:
|
||||
test_lib:
|
||||
path: ../test_lib
|
||||
guinness: ">=0.1.5 <0.2.0"
|
||||
|
@ -1,19 +1,19 @@
|
||||
import {Type} from 'facade/lang';
|
||||
import {ElementServicesFunction} from './facade';
|
||||
// import {Type} from 'facade/lang';
|
||||
// import {ElementServicesFunction} from './facade';
|
||||
import {ABSTRACT} from 'facade/lang';
|
||||
|
||||
|
||||
@ABSTRACT
|
||||
@ABSTRACT()
|
||||
export class Directive {
|
||||
constructor({
|
||||
selector,
|
||||
lightDomServices,
|
||||
implementsTypes
|
||||
}:{
|
||||
}/*:{
|
||||
selector:String,
|
||||
lightDomServices:ElementServicesFunction,
|
||||
implementsTypes:Array<Type>
|
||||
})
|
||||
}*/)
|
||||
{
|
||||
this.lightDomServices = lightDomServices;
|
||||
this.selector = selector;
|
||||
|
@ -1,3 +1,5 @@
|
||||
library core.annotations.facade;
|
||||
|
||||
import 'package:di/di.dart' show Module;
|
||||
import '../compiler/element_module.dart' show ElementModule;
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
import {Type, List} from 'facade/lang';
|
||||
// import {Type, List} from 'facade/lang';
|
||||
|
||||
export class TemplateConfig {
|
||||
constructor({
|
||||
@ -6,11 +6,11 @@ export class TemplateConfig {
|
||||
directives,
|
||||
formatters,
|
||||
source
|
||||
}: {
|
||||
}/*: {
|
||||
url: String,
|
||||
directives: List<Type>,
|
||||
formatters: List<Type>,
|
||||
source: List<TemplateConfig>
|
||||
})
|
||||
}*/)
|
||||
{}
|
||||
}
|
@ -1,6 +1,6 @@
|
||||
import {Future, Type} from 'facade/lang';
|
||||
import {Element} from 'facade/dom';
|
||||
import {ProtoView} from './view';
|
||||
//import {ProtoView} from './view';
|
||||
import {TemplateLoader} from './template_loader';
|
||||
import {FIELD} from 'facade/lang';
|
||||
|
||||
@ -19,7 +19,7 @@ export class Compiler {
|
||||
* - don't know about injector in deserialization
|
||||
* - compile does not need the injector, only the ViewFactory does
|
||||
*/
|
||||
compile(component:Type, element:Element/* = null*/):Future<ProtoView> {
|
||||
compile(component:Type, element:Element/* = null*/):Future/*<ProtoView>*/ {
|
||||
return null;
|
||||
}
|
||||
|
||||
|
@ -1,11 +1,11 @@
|
||||
import {Future} from 'facade/lang';
|
||||
import {Document} from 'facade/dom';
|
||||
//import {Document} from 'facade/dom';
|
||||
|
||||
export class TemplateLoader {
|
||||
|
||||
constructor() {}
|
||||
|
||||
load(url:String):Future<Document> {
|
||||
load(url:String):Future/*<Document>*/ {
|
||||
return null;
|
||||
}
|
||||
}
|
@ -4,7 +4,10 @@ export class LifeCycle {
|
||||
|
||||
@FIELD('final _changeDetection:ChangeDetection')
|
||||
@FIELD('final _onChangeDispatcher:OnChangeDispatcher')
|
||||
constructor() {}
|
||||
constructor() {
|
||||
this._changeDetection = null;
|
||||
this._onChangeDispatcher = null;
|
||||
}
|
||||
|
||||
digest() {
|
||||
_changeDetection.detectChanges();
|
||||
|
@ -1,5 +1,5 @@
|
||||
import {describe, it, expect} from 'test_lib/test_lib';
|
||||
import {Compiler} from 'core/compiler/compiler';
|
||||
import {describe, it} from 'test_lib/test_lib';
|
||||
//import {Compiler} from 'core/compiler/compiler';
|
||||
|
||||
export function main() {
|
||||
describe('compiler', function() {
|
||||
|
@ -7,3 +7,4 @@ dependencies:
|
||||
dev_dependencies:
|
||||
test_lib:
|
||||
path: ../test_lib
|
||||
guinness: ">=0.1.5 <0.2.0"
|
||||
|
@ -2,6 +2,9 @@ name: examples
|
||||
environment:
|
||||
sdk: '>=1.4.0'
|
||||
dependencies:
|
||||
facade:
|
||||
path: ../facade
|
||||
dev_dependencies:
|
||||
test_lib:
|
||||
path: ../test_lib
|
||||
guinness: ">=0.1.5 <0.2.0"
|
||||
|
@ -5,3 +5,4 @@ dependencies:
|
||||
dev_dependencies:
|
||||
test_lib:
|
||||
path: ../test_lib
|
||||
guinness: ">=0.1.5 <0.2.0"
|
||||
|
@ -6,7 +6,7 @@ export 'dart:html' show DocumentFragment, Node, Element, TemplateElement, Text;
|
||||
|
||||
class DOM {
|
||||
static query(selector) {
|
||||
return document.query(selector);
|
||||
return document.querySelector(selector);
|
||||
}
|
||||
static on(element, event, callback) {
|
||||
element.addEventListener(event, callback);
|
||||
|
@ -4,12 +4,20 @@ export 'dart:async' show Future;
|
||||
export 'dart:core' show Type, int;
|
||||
|
||||
class FIELD {
|
||||
const constructor(this.definition);
|
||||
final String definition;
|
||||
const FIELD(this.definition);
|
||||
}
|
||||
|
||||
class CONST {}
|
||||
class ABSTRACT {}
|
||||
class IMPLEMENTS {}
|
||||
class CONST {
|
||||
const CONST();
|
||||
}
|
||||
class ABSTRACT {
|
||||
const ABSTRACT();
|
||||
}
|
||||
class IMPLEMENTS {
|
||||
final interfaceClass;
|
||||
const IMPLEMENTS(this.interfaceClass);
|
||||
}
|
||||
|
||||
|
||||
class StringWrapper {
|
||||
|
@ -1,3 +1,4 @@
|
||||
library test_lib.test_lib;
|
||||
export 'package:guinness/guinness.dart' show
|
||||
describe, ddescribe, xdescribe,
|
||||
it, xit, iit,
|
||||
|
Reference in New Issue
Block a user