Skip to content

Commit

Permalink
Including rxjs as commonjs
Browse files Browse the repository at this point in the history
  • Loading branch information
thelgevold committed Apr 9, 2017
1 parent 7803fa9 commit 15a52a7
Show file tree
Hide file tree
Showing 12 changed files with 286 additions and 277 deletions.
Binary file not shown.
6 changes: 5 additions & 1 deletion closure.conf
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@
--property_renaming_report=dist/property_renaming_report
--create_source_map=%outname%.map

--process_common_js_modules

--warning_level=QUIET
--dependency_mode=STRICT
--rewrite_polyfills=false
Expand All @@ -22,4 +24,6 @@ node_modules/@angular/platform-browser/@angular/platform-browser.js
vendor/zone_externs.js
vendor/angular_testability_externs.js

--js_module_root=vendor/built
--js_module_root=node_modules


448 changes: 224 additions & 224 deletions dist/bundle.js

Large diffs are not rendered by default.

Binary file removed dist/bundle.js.brotli
Binary file not shown.
Binary file removed dist/bundle.js.gz
Binary file not shown.
6 changes: 3 additions & 3 deletions dist/bundle.js.map

Large diffs are not rendered by default.

66 changes: 33 additions & 33 deletions dist/manifest.MF
Original file line number Diff line number Diff line change
@@ -1,36 +1,36 @@
vendor/built/rxjs/util/root.js
vendor/built/rxjs/util/isFunction.js
vendor/built/rxjs/util/isArray.js
vendor/built/rxjs/util/isObject.js
vendor/built/rxjs/util/errorObject.js
vendor/built/rxjs/util/tryCatch.js
vendor/built/rxjs/util/UnsubscriptionError.js
vendor/built/rxjs/Subscription.js
vendor/built/rxjs/Observer.js
vendor/built/rxjs/symbol/rxSubscriber.js
vendor/built/rxjs/Subscriber.js
vendor/built/rxjs/util/toSubscriber.js
vendor/built/rxjs/symbol/observable.js
vendor/built/rxjs/Observable.js
vendor/built/rxjs/SubjectSubscription.js
vendor/built/rxjs/util/ObjectUnsubscribedError.js
vendor/built/rxjs/Subject.js
vendor/built/rxjs/util/isScheduler.js
vendor/built/rxjs/observable/ScalarObservable.js
vendor/built/rxjs/observable/EmptyObservable.js
vendor/built/rxjs/observable/ArrayObservable.js
vendor/built/rxjs/OuterSubscriber.js
vendor/built/rxjs/util/isArrayLike.js
vendor/built/rxjs/util/isPromise.js
vendor/built/rxjs/symbol/iterator.js
vendor/built/rxjs/InnerSubscriber.js
vendor/built/rxjs/util/subscribeToResult.js
vendor/built/rxjs/operator/mergeAll.js
vendor/built/rxjs/operator/merge.js
vendor/built/rxjs/observable/merge.js
vendor/built/rxjs/observable/ConnectableObservable.js
vendor/built/rxjs/operator/multicast.js
vendor/built/rxjs/operator/share.js
node_modules/rxjs/util/isFunction.js
node_modules/rxjs/util/errorObject.js
node_modules/rxjs/util/tryCatch.js
node_modules/rxjs/util/UnsubscriptionError.js
node_modules/rxjs/util/isArray.js
node_modules/rxjs/util/isObject.js
node_modules/rxjs/Subscription.js
node_modules/rxjs/util/ObjectUnsubscribedError.js
node_modules/rxjs/SubjectSubscription.js
node_modules/rxjs/Observer.js
node_modules/rxjs/util/root.js
node_modules/rxjs/symbol/rxSubscriber.js
node_modules/rxjs/Subscriber.js
node_modules/rxjs/util/toSubscriber.js
node_modules/rxjs/symbol/observable.js
node_modules/rxjs/Observable.js
node_modules/rxjs/Subject.js
node_modules/rxjs/observable/EmptyObservable.js
node_modules/rxjs/observable/ScalarObservable.js
node_modules/rxjs/util/isScheduler.js
node_modules/rxjs/observable/ArrayObservable.js
node_modules/rxjs/util/isArrayLike.js
node_modules/rxjs/symbol/iterator.js
node_modules/rxjs/InnerSubscriber.js
node_modules/rxjs/util/isPromise.js
node_modules/rxjs/util/subscribeToResult.js
node_modules/rxjs/OuterSubscriber.js
node_modules/rxjs/operator/mergeAll.js
node_modules/rxjs/operator/merge.js
node_modules/rxjs/observable/merge.js
node_modules/rxjs/observable/ConnectableObservable.js
node_modules/rxjs/operator/multicast.js
node_modules/rxjs/operator/share.js
node_modules/@angular/core/@angular/core.js
node_modules/@angular/common/@angular/common.js
node_modules/@angular/platform-browser/@angular/platform-browser.js
Expand Down
2 changes: 2 additions & 0 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@
Otherwise the zone.js file is not imported anywhere and gets dropped.
See build_closure.sh
-->
<script>
</script>
<script src="node_modules/zone.js/dist/zone.min.js"></script>
<script src="dist/bundle.js"></script>
</body>
Expand Down
9 changes: 2 additions & 7 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,19 +12,14 @@
"@angular/tsc-wrapped": "^4.0.1",
"google-closure-compiler": "20170218.0.0",
"rxjs": "5.3.0",
"rxjs-src": "https://github.com/ReactiveX/rxjs/tarball/5.3.0",
"source-map-explorer": "^1.3.3",
"tsickle": "^0.2.3",
"typescript": "~2.1",
"zone.js": "angular/zone.js"
},
"scripts": {
"build_rxjs_es5esm": "tsc -p vendor/tsconfig.rxjs-es5+esm.json",
"build_rxjs_es6": "tsc -p vendor/tsconfig.rxjs-es6.json",
"build_rxjs_tsickle": "node ./node_modules/@angular/tsc-wrapped/src/main -p vendor/tsconfig.rxjs-tsickle.json",
"postinstall": "npm run build_rxjs_es6",
"build": "ngc && npm run closure && ./size_report.sh",
"closure": "java -jar node_modules/google-closure-compiler/compiler.jar --flagfile closure.conf $(find vendor/built/rxjs -name \\*.js) $(find built -name \\*.js)",
"build": "ngc && npm run closure",
"closure": "java -jar closure-compiler/closure-compiler-1.0-SNAPSHOT.jar --flagfile closure.conf $(find node_modules/rxjs -name \\*.js) $(find built -name \\*.js)",

"explore": "source-map-explorer dist/bundle.js dist/bundle.js.map"
},
Expand Down
1 change: 1 addition & 0 deletions src/basic.ng.html
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
<div>{{ctxProp}}</div>
<input type="text" [value]="ctxProp" (input)="ctxProp = $event.target.value"/>
<button (click)="emitNewValue()">Update Value</button>
19 changes: 16 additions & 3 deletions src/basic.ts
Original file line number Diff line number Diff line change
@@ -1,12 +1,25 @@

import {Component, Injectable} from '@angular/core';
import {Component} from '@angular/core';

import {Subject} from 'rxjs/Subject';

@Component({
selector: 'basic',
templateUrl: './basic.ng.html',
})
@Injectable()
export class Basic {
ctxProp: string;
constructor() { this.ctxProp = 'initial value'; }
subject = new Subject();
constructor() { }

ngOnInit() {

this.subject.asObservable().subscribe((res:string) => this.ctxProp = res);

this.subject.next('initial value');
}

emitNewValue() {
this.subject.next(new Date().getTime());
}
}
6 changes: 0 additions & 6 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -340,12 +340,6 @@ rimraf@~2.2.6:
version "2.2.8"
resolved "https://registry.yarnpkg.com/rimraf/-/rimraf-2.2.8.tgz#e439be2aaee327321952730f99a8929e4fc50582"

"rxjs-src@https://github.com/ReactiveX/rxjs/tarball/5.3.0":
version "5.3.0"
resolved "https://github.com/ReactiveX/rxjs/tarball/5.3.0#cf69753bc9a958b018c8b12af3ae3cdc4a64face"
dependencies:
symbol-observable "^1.0.1"

rxjs@5.3.0:
version "5.3.0"
resolved "https://registry.yarnpkg.com/rxjs/-/rxjs-5.3.0.tgz#d88ccbdd46af290cbdb97d5d8055e52453fabe2d"
Expand Down

0 comments on commit 15a52a7

Please sign in to comment.