Skip to content
This repository was archived by the owner on Oct 12, 2022. It is now read-only.

Commit 33153ba

Browse files
committed
Fix formatting and spaces
1 parent 0d50006 commit 33153ba

File tree

6 files changed

+79
-79
lines changed

6 files changed

+79
-79
lines changed

jsx/package.json

Lines changed: 33 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -1,35 +1,35 @@
11
{
2-
"name": "jsx-demo",
3-
"version": "0.0.1",
4-
"description": "JSX in TypeScript Demo Project",
5-
"main": "app.js",
6-
"scripts": {
7-
"test": "echo \"Error: no test specified\" && exit 1"
8-
},
9-
"repository": {
10-
"type": "git",
11-
"url": "https://github.com/RyanCavanaugh/jsx-demo.git"
12-
},
13-
"keywords": [
14-
"jsx",
15-
"tsx",
16-
"typescript",
17-
"ts",
18-
"react"
19-
],
20-
"author": "Ryan Cavanaugh (Microsoft)",
21-
"license": "Apache",
22-
"bugs": {
23-
"url": "https://github.com/RyanCavanaugh/jsx-demo/issues"
24-
},
25-
"homepage": "https://github.com/RyanCavanaugh/jsx-demo",
26-
"devDependencies": {
27-
"typescript": "latest",
28-
"http-server": "0.8.0"
29-
},
30-
"dependencies": {
31-
"jquery": "^2.1.4",
32-
"react": "^0.13.3",
33-
"requirejs": "^2.1.20"
34-
}
2+
"name": "jsx-demo",
3+
"version": "0.0.1",
4+
"description": "JSX in TypeScript Demo Project",
5+
"main": "app.js",
6+
"scripts": {
7+
"test": "echo \"Error: no test specified\" && exit 1"
8+
},
9+
"repository": {
10+
"type": "git",
11+
"url": "https://github.com/RyanCavanaugh/jsx-demo.git"
12+
},
13+
"keywords": [
14+
"jsx",
15+
"tsx",
16+
"typescript",
17+
"ts",
18+
"react"
19+
],
20+
"author": "Ryan Cavanaugh (Microsoft)",
21+
"license": "Apache",
22+
"bugs": {
23+
"url": "https://github.com/RyanCavanaugh/jsx-demo/issues"
24+
},
25+
"homepage": "https://github.com/RyanCavanaugh/jsx-demo",
26+
"devDependencies": {
27+
"typescript": "latest",
28+
"http-server": "0.8.0"
29+
},
30+
"dependencies": {
31+
"jquery": "^2.1.4",
32+
"react": "^0.13.3",
33+
"requirejs": "^2.1.20"
34+
}
3535
}

jsx/require-config.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
requirejs.config({
2-
paths: {
3-
react: ['/node_modules/react/dist/react'],
4-
jquery: ['/node_modules/jquery/dist/jquery']
5-
}
2+
paths: {
3+
react: ['/node_modules/react/dist/react'],
4+
jquery: ['/node_modules/jquery/dist/jquery']
5+
}
66
});

jsx/src/app.tsx

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -3,19 +3,19 @@ import $ = require('jquery');
33
import {Greeter as Greetifier, GreeterProps as GreeterProps} from 'greeter';
44

55
function getRandomGreeting() {
6-
switch(Math.floor(Math.random() * 4)) {
7-
case 0: return 'Hello';
8-
case 1: return 'Howdy';
9-
case 2: return 'Greetings to you';
10-
case 3: return 'Hail';
11-
}
6+
switch (Math.floor(Math.random() * 4)) {
7+
case 0: return 'Hello';
8+
case 1: return 'Howdy';
9+
case 2: return 'Greetings to you';
10+
case 3: return 'Hail';
11+
}
1212
}
1313

1414
$(() => {
15-
let props: GreeterProps = {
16-
whomToGreet: 'world!',
17-
};
15+
let props: GreeterProps = {
16+
whomToGreet: 'world!',
17+
};
1818

19-
React.render(<Greetifier {...props} />, $('#output').get(0));
19+
React.render(<Greetifier {...props} />, $('#output').get(0));
2020
});
2121

jsx/src/greeter.tsx

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,21 @@
11
import React = require('react');
22

33
export interface GreeterProps extends React.Props<Greeter> {
4-
whomToGreet: string;
5-
greeting?: string|(() => string);
4+
whomToGreet: string;
5+
greeting?: string | (() => string);
66
}
77

88
export class Greeter extends React.Component<GreeterProps, {}> {
9-
render() {
10-
let g = this.props.greeting;
9+
render() {
10+
let g = this.props.greeting;
1111

12-
let greeting = 'Hello';
13-
if(typeof g === 'string') {
14-
greeting = g;
15-
} else if(g) {
16-
greeting = g();
17-
}
12+
let greeting = 'Hello';
13+
if (typeof g === 'string') {
14+
greeting = g;
15+
} else if (g) {
16+
greeting = g();
17+
}
1818

19-
return <div>{greeting}, {this.props.whomToGreet}</div>;
20-
}
19+
return <div>{greeting}, {this.props.whomToGreet}</div>;
20+
}
2121
}

jsx/tsconfig.json

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
{
2-
"compilerOptions": {
3-
"jsx": "react",
4-
"outDir": "bin",
5-
"module": "amd"
6-
},
7-
"exclude": [
8-
"node_modules"
9-
]
2+
"compilerOptions": {
3+
"jsx": "react",
4+
"outDir": "bin",
5+
"module": "amd"
6+
},
7+
"exclude": [
8+
"node_modules"
9+
]
1010
}

jsx/tsd.json

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
11
{
2-
"version": "v4",
3-
"repo": "borisyankov/DefinitelyTyped",
4-
"ref": "master",
5-
"path": "typings",
6-
"bundle": "typings/tsd.d.ts",
7-
"installed": {
8-
"react/react.d.ts": {
9-
"commit": "77ec1408257c677f8fd8d6798ebaf6bd87c11b9d"
10-
},
11-
"jquery/jquery.d.ts": {
12-
"commit": "77ec1408257c677f8fd8d6798ebaf6bd87c11b9d"
2+
"version": "v4",
3+
"repo": "borisyankov/DefinitelyTyped",
4+
"ref": "master",
5+
"path": "typings",
6+
"bundle": "typings/tsd.d.ts",
7+
"installed": {
8+
"react/react.d.ts": {
9+
"commit": "77ec1408257c677f8fd8d6798ebaf6bd87c11b9d"
10+
},
11+
"jquery/jquery.d.ts": {
12+
"commit": "77ec1408257c677f8fd8d6798ebaf6bd87c11b9d"
13+
}
1314
}
14-
}
1515
}

0 commit comments

Comments
 (0)