From 8f2c621fbd1e919d0ac4ba9ff3af058d07f0a7e6 Mon Sep 17 00:00:00 2001 From: Ward Bell Date: Wed, 9 Sep 2015 19:19:41 -0700 Subject: [PATCH] (docs) apply cosmetic fixes requested by @btford for PR #203 --- .../docs/_examples/gettingstarted/e2e-spec.js | 8 +++---- .../_examples/gettingstarted/ts/package.json | 8 +++---- .../gettingstarted/ts/src/dummy.spec.ts | 6 +++--- .../_examples/styleguide/ts/dummy.spec.js | 10 ++++----- .../gettingstarted/e2e-spec-shared.js.md | 2 +- .../quickstart/src/app-bootstrap.js.md | 3 +++ .../quickstart/src/app-import.js.md | 3 +++ .../docs/_fragments/quickstart/src/app.js.md | 21 +++++++++++++++++++ 8 files changed, 44 insertions(+), 17 deletions(-) create mode 100644 public/docs/_fragments/quickstart/src/app-bootstrap.js.md create mode 100644 public/docs/_fragments/quickstart/src/app-import.js.md create mode 100644 public/docs/_fragments/quickstart/src/app.js.md diff --git a/public/docs/_examples/gettingstarted/e2e-spec.js b/public/docs/_examples/gettingstarted/e2e-spec.js index 14edeb17ef..bbb8089d9f 100644 --- a/public/docs/_examples/gettingstarted/e2e-spec.js +++ b/public/docs/_examples/gettingstarted/e2e-spec.js @@ -1,5 +1,5 @@ /*global browser, element, by */ -describe('Getting Started E2E Tests', function() { +describe('Getting Started E2E Tests', function () { // #docregion shared var expectedMsg = 'My First Angular 2 App'; @@ -10,17 +10,17 @@ describe('Getting Started E2E Tests', function() { browser.get(basePath + 'index.html'); }); - it('should display: '+ expectedMsg, function() { + it('should display: ' + expectedMsg, function () { expect(element(by.id('output')).getText()).toEqual(expectedMsg); }); } // #enddocregion - describe('Getting Started in JavaScript', function() { + describe('Getting Started in JavaScript', function () { sharedTests('gettingstarted/js/'); }); - describe('Getting Started in TypeScript', function() { + describe('Getting Started in TypeScript', function () { sharedTests('gettingstarted/ts/'); }); diff --git a/public/docs/_examples/gettingstarted/ts/package.json b/public/docs/_examples/gettingstarted/ts/package.json index 3e15748e51..353c02007e 100644 --- a/public/docs/_examples/gettingstarted/ts/package.json +++ b/public/docs/_examples/gettingstarted/ts/package.json @@ -1,6 +1,6 @@ { "name": "ng2-getting-started", - "version": "0.0.1", + "version": "0.0.1", "dependencies": { "angular2": "2.0.0-alpha.35", "es6-module-loader": "^0.16", @@ -8,8 +8,8 @@ "traceur": "0.0.91" }, "scripts": { - "postinstall": "cd src && tsd reinstall -r -o && cd ..", - "tsc": "tsc -p src -w", - "start": "live-server --open=src" + "postinstall": "cd src && tsd reinstall -r -o && cd ..", + "tsc": "tsc -p src -w", + "start": "live-server --open=src" } } diff --git a/public/docs/_examples/gettingstarted/ts/src/dummy.spec.ts b/public/docs/_examples/gettingstarted/ts/src/dummy.spec.ts index 83f3eaea94..fdf13c8cfc 100644 --- a/public/docs/_examples/gettingstarted/ts/src/dummy.spec.ts +++ b/public/docs/_examples/gettingstarted/ts/src/dummy.spec.ts @@ -1,9 +1,9 @@ describe("Jasmine sample test", function() { - + it("1+1 should be 2", function() { - + var result = 1 + 1; - + expect(result).toBe(2); }); }); \ No newline at end of file diff --git a/public/docs/_examples/styleguide/ts/dummy.spec.js b/public/docs/_examples/styleguide/ts/dummy.spec.js index 83f3eaea94..3e9bcf8842 100644 --- a/public/docs/_examples/styleguide/ts/dummy.spec.js +++ b/public/docs/_examples/styleguide/ts/dummy.spec.js @@ -1,9 +1,9 @@ -describe("Jasmine sample test", function() { - - it("1+1 should be 2", function() { - +describe("Jasmine sample test", function () { + + it("1+1 should be 2", function () { + var result = 1 + 1; - + expect(result).toBe(2); }); }); \ No newline at end of file diff --git a/public/docs/_fragments/gettingstarted/e2e-spec-shared.js.md b/public/docs/_fragments/gettingstarted/e2e-spec-shared.js.md index 137c29d855..1bad711d86 100644 --- a/public/docs/_fragments/gettingstarted/e2e-spec-shared.js.md +++ b/public/docs/_fragments/gettingstarted/e2e-spec-shared.js.md @@ -7,7 +7,7 @@ browser.get(basePath + 'index.html'); }); - it('should display: '+ expectedMsg, function() { + it('should display: ' + expectedMsg, function () { expect(element(by.id('output')).getText()).toEqual(expectedMsg); }); } diff --git a/public/docs/_fragments/quickstart/src/app-bootstrap.js.md b/public/docs/_fragments/quickstart/src/app-bootstrap.js.md new file mode 100644 index 0000000000..299a9059b4 --- /dev/null +++ b/public/docs/_fragments/quickstart/src/app-bootstrap.js.md @@ -0,0 +1,3 @@ +``` +angular2_1.bootstrap(AppComponent); +``` \ No newline at end of file diff --git a/public/docs/_fragments/quickstart/src/app-import.js.md b/public/docs/_fragments/quickstart/src/app-import.js.md new file mode 100644 index 0000000000..8448db759c --- /dev/null +++ b/public/docs/_fragments/quickstart/src/app-import.js.md @@ -0,0 +1,3 @@ +``` +var angular2_1 = require('angular2/angular2'); +``` \ No newline at end of file diff --git a/public/docs/_fragments/quickstart/src/app.js.md b/public/docs/_fragments/quickstart/src/app.js.md new file mode 100644 index 0000000000..6e85873c52 --- /dev/null +++ b/public/docs/_fragments/quickstart/src/app.js.md @@ -0,0 +1,21 @@ +``` +var angular2_1 = require('angular2/angular2'); +var AppComponent = (function () { + function AppComponent() { + this.name = 'Alice'; + } + AppComponent = __decorate([ + angular2_1.Component({ + selector: 'app' + }), + angular2_1.View({ + template: '

Hello {{ name }}

' + }), + __metadata('design:paramtypes', []) + ], AppComponent); + return AppComponent; +})(); +exports.AppComponent = AppComponent; +angular2_1.bootstrap(AppComponent); +//# sourceMappingURL=app.js.map +``` \ No newline at end of file