Skip to content

Commit

Permalink
feat(package): introduce a catch-all package angular.
Browse files Browse the repository at this point in the history
modules/angular has no implementation, but depends on all the pieces
that make angular - core, di, directives, etc. It is the package that
all client apps will depend on.
  • Loading branch information
rkirov committed Jan 23, 2015
1 parent 4df1825 commit ec5cb3e
Show file tree
Hide file tree
Showing 12 changed files with 44 additions and 10 deletions.
1 change: 1 addition & 0 deletions karma-dart.conf.js
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ module.exports = function(config) {
'/packages/path': 'http://localhost:9877/base/packages/path',

// Local dependencies, transpiled from the source.
'/packages/angular': 'http://localhost:9877/base/modules/angular/src',
'/packages/core': 'http://localhost:9877/base/modules/core/src',
'/packages/change_detection': 'http://localhost:9877/base/modules/change_detection/src',
'/packages/reflection': 'http://localhost:9877/base/modules/reflection/src',
Expand Down
20 changes: 20 additions & 0 deletions modules/angular/pubspec.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
name: angular
version: 2.0.0-alpha.1
environment:
sdk: '>=1.4.0'
dependencies:
stack_trace: '1.1.1'
change_detection:
path: ../change_detection
di:
path: ../di
facade:
path: ../facade
reflection:
path: ../reflection
directives:
path: ../directives
dev_dependencies:
test_lib:
path: ../test_lib
guinness: ">=0.1.16 <0.2.0"
6 changes: 6 additions & 0 deletions modules/angular/src/angular.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
/**
* Define public API for Angular here.
*/
export * from 'change_detection/change_detection';
export * from 'core/core';
export * from 'directives/directives';
2 changes: 2 additions & 0 deletions modules/benchmarks/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@ name: benchmarks
environment:
sdk: '>=1.4.0'
dependencies:
angular:
path: ../angular
facade:
path: ../facade
di:
Expand Down
2 changes: 1 addition & 1 deletion modules/benchmarks/src/tree/tree_benchmark.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import {Parser, Lexer, ChangeDetector} from 'change_detection/change_detection';

import {bootstrap, Component, Template, TemplateConfig, ViewPort, Compiler} from 'core/core';
import {bootstrap, Component, Template, TemplateConfig, ViewPort, Compiler} from 'angular/angular';

import {CompilerCache} from 'core/compiler/compiler';
import {DirectiveMetadataReader} from 'core/compiler/directive_metadata_reader';
Expand Down
7 changes: 1 addition & 6 deletions modules/core/src/core.js
Original file line number Diff line number Diff line change
@@ -1,17 +1,12 @@
/**
* Define public API for Angular here
*/
export * from './annotations/annotations';
export * from './compiler/interfaces';
export * from './annotations/template_config';

export * from './application';

export * from 'change_detection/change_detection';

export * from './compiler/compiler';
export * from './compiler/template_loader';
export * from './compiler/view';
export * from './compiler/viewport';

export * from 'core/dom/element';
export * from './dom/element';
4 changes: 4 additions & 0 deletions modules/directives/src/directives.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
export * from './ng_if';
export * from './ng_non_bindable';
export * from './ng_repeat';
export * from './ng_switch';
4 changes: 3 additions & 1 deletion modules/examples/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@ name: examples
environment:
sdk: '>=1.4.0'
dependencies:
angular:
path: ../angular
facade:
path: ../facade
reflection:
Expand All @@ -18,4 +20,4 @@ transformers:
minify: true
commandLineOptions: [--trust-type-annotations, --trust-primitives, --dump-info]
#commandLineOptions: [--trust-type-annotations, --dump-info]
#commandLineOptions: [--dump-info]
#commandLineOptions: [--dump-info]
2 changes: 1 addition & 1 deletion modules/examples/src/hello_world/index_common.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import {bootstrap, Component, Decorator, TemplateConfig, NgElement} from 'core/core';
import {bootstrap, Component, Decorator, TemplateConfig, NgElement} from 'angular/angular';

// Angular 2.0 supports 3 basic types of directives:
// - Component - the basic building blocks of Angular 2.0 apps. Backed by
Expand Down
2 changes: 1 addition & 1 deletion modules/examples/src/hello_world/index_static.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import * as app from './index_common';

import {Component, Decorator, TemplateConfig, NgElement} from 'core/core';
import {Component, Decorator, TemplateConfig, NgElement} from 'angular/angular';
import {Lexer, Parser, ChangeDetector} from 'change_detection/change_detection';
import {LifeCycle} from 'core/life_cycle/life_cycle';

Expand Down
3 changes: 3 additions & 0 deletions test-main.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,9 @@ System.baseURL = '/base/modules/';

// So that we can import packages like `core/foo`, instead of `core/src/foo`.
System.paths = {
'angular/*': './angular/src/*.js',
'angular/test/*': './angular/test/*.js',

'core/*': './core/src/*.js',
'core/test/*': './core/test/*.js',

Expand Down
1 change: 1 addition & 0 deletions tools/build/snippets/runtime_paths.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
System.paths = {
'angular/*': '/angular/lib/*.js',
'core/*': '/core/lib/*.js',
'change_detection/*': '/change_detection/lib/*.js',
'facade/*': '/facade/lib/*.js',
Expand Down

0 comments on commit ec5cb3e

Please sign in to comment.