diff --git a/README.md b/README.md index 0216aa3..b9e69b9 100644 --- a/README.md +++ b/README.md @@ -1,11 +1,8 @@ # ng-conf-2016 Hackathon Starter Project -For the installation and update of npm and node click here ### Steps: ```bash -$ git clone https://github.com/attribesolution/ng-conf-2016-hackathon-app.git -$ cd ng-conf-2016-hackathon-app/ or 'path to ng-conf-2016-hackathon-app folder' $ npm install $ npm run start ``` diff --git a/npm-debug.log b/npm-debug.log new file mode 100644 index 0000000..e876e00 --- /dev/null +++ b/npm-debug.log @@ -0,0 +1,45 @@ +0 info it worked if it ends with ok +1 verbose cli [ '/usr/local/bin/node', '/usr/local/bin/npm', 'start' ] +2 info using npm@3.8.9 +3 info using node@v6.0.0 +4 verbose run-script [ 'prestart', 'start', 'poststart' ] +5 info lifecycle a2-countries-and-capitals@1.0.0~prestart: a2-countries-and-capitals@1.0.0 +6 silly lifecycle a2-countries-and-capitals@1.0.0~prestart: no script for prestart, continuing +7 info lifecycle a2-countries-and-capitals@1.0.0~start: a2-countries-and-capitals@1.0.0 +8 verbose lifecycle a2-countries-and-capitals@1.0.0~start: unsafe-perm in lifecycle true +9 verbose lifecycle a2-countries-and-capitals@1.0.0~start: PATH: /usr/local/lib/node_modules/npm/bin/node-gyp-bin:/home/sarwan/ng-conf-2016-hackathon-app/node_modules/.bin:/usr/local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin +10 verbose lifecycle a2-countries-and-capitals@1.0.0~start: CWD: /home/sarwan/ng-conf-2016-hackathon-app +11 silly lifecycle a2-countries-and-capitals@1.0.0~start: Args: [ '-c', 'tsc && concurrently "npm run tsc:w" "npm run lite" ' ] +12 silly lifecycle a2-countries-and-capitals@1.0.0~start: Returned: code: 2 signal: null +13 info lifecycle a2-countries-and-capitals@1.0.0~start: Failed to exec start script +14 verbose stack Error: a2-countries-and-capitals@1.0.0 start: `tsc && concurrently "npm run tsc:w" "npm run lite" ` +14 verbose stack Exit status 2 +14 verbose stack at EventEmitter. (/usr/local/lib/node_modules/npm/lib/utils/lifecycle.js:245:16) +14 verbose stack at emitTwo (events.js:106:13) +14 verbose stack at EventEmitter.emit (events.js:191:7) +14 verbose stack at ChildProcess. (/usr/local/lib/node_modules/npm/lib/utils/spawn.js:24:14) +14 verbose stack at emitTwo (events.js:106:13) +14 verbose stack at ChildProcess.emit (events.js:191:7) +14 verbose stack at maybeClose (internal/child_process.js:850:16) +14 verbose stack at Process.ChildProcess._handle.onexit (internal/child_process.js:215:5) +15 verbose pkgid a2-countries-and-capitals@1.0.0 +16 verbose cwd /home/sarwan/ng-conf-2016-hackathon-app +17 error Linux 3.13.0-65-generic +18 error argv "/usr/local/bin/node" "/usr/local/bin/npm" "start" +19 error node v6.0.0 +20 error npm v3.8.9 +21 error code ELIFECYCLE +22 error a2-countries-and-capitals@1.0.0 start: `tsc && concurrently "npm run tsc:w" "npm run lite" ` +22 error Exit status 2 +23 error Failed at the a2-countries-and-capitals@1.0.0 start script 'tsc && concurrently "npm run tsc:w" "npm run lite" '. +23 error Make sure you have the latest version of node.js and npm installed. +23 error If you do, this is most likely a problem with the a2-countries-and-capitals package, +23 error not with npm itself. +23 error Tell the author that this fails on your system: +23 error tsc && concurrently "npm run tsc:w" "npm run lite" +23 error You can get information on how to open an issue for this project with: +23 error npm bugs a2-countries-and-capitals +23 error Or if that isn't available, you can get their info via: +23 error npm owner ls a2-countries-and-capitals +23 error There is likely additional logging output above. +24 verbose exit [ 1, true ] diff --git a/package.json b/package.json index c0c7920..40f0de1 100644 --- a/package.json +++ b/package.json @@ -22,17 +22,17 @@ }, "homepage": "https://github.com/mohuk/a2-countries-and-capitals#readme", "dependencies": { - "angular2": "2.0.0-beta.17", - "es6-shim": "0.35.0", - "reflect-metadata": "0.1.3", - "rxjs": "5.0.0-beta.7", + "angular2": "^2.0.0-beta.17", + "es6-shim": "^0.35.0", + "reflect-metadata": "^0.1.3", + "rxjs": "^5.0.0-beta.7", "systemjs": "0.19.26", - "zone.js": "0.6.12" + "zone.js": "^0.6.12" }, "devDependencies": { - "concurrently": "2.0.0", - "lite-server": "2.2.0", - "typescript": "1.8.10", - "typings": "0.8.1" + "concurrently": "^2.0.0", + "lite-server": "^2.2.0", + "typescript": "^1.8.10", + "typings": "^0.8.1" } } diff --git a/src/Button.ts b/src/Button.ts new file mode 100644 index 0000000..299805d --- /dev/null +++ b/src/Button.ts @@ -0,0 +1,15 @@ +import {bootstrap} from 'angular2/platform/browser'; +import {Component} from 'angular2/core'; + +@Component({ + selector: 'myButton', + template: ` +
+ +
+ `, + styleUrls:['src/center.css'] +}) +export class Button {} + + diff --git a/src/bootstrap.ts b/src/bootstrap.ts index 74df08e..a00649d 100644 --- a/src/bootstrap.ts +++ b/src/bootstrap.ts @@ -1,12 +1,19 @@ import {bootstrap} from 'angular2/platform/browser'; import {Component} from 'angular2/core'; - +import {Paragraph} from './header' +import {Button} from './Button' +import {Listing} from './listing' @Component({ + directives : [Paragraph, Button,Listing], selector: 'app', template: ` -

Countries and Capitals

- `, +

Countries and Capitals

+
+ + + + ` , }) export class App {} diff --git a/src/center.css b/src/center.css new file mode 100644 index 0000000..24d436a --- /dev/null +++ b/src/center.css @@ -0,0 +1,6 @@ + + +.container { + width: 970px; + margin: 0 auto; +} \ No newline at end of file diff --git a/src/header.ts b/src/header.ts new file mode 100644 index 0000000..6cd7a6d --- /dev/null +++ b/src/header.ts @@ -0,0 +1,12 @@ +import {bootstrap} from 'angular2/platform/browser'; +import {Component} from 'angular2/core'; + + +@Component({ + selector: 'myParagraph', + templateUrl: 'src/myParagraph.html', + styleUrls:['src/center.css'] +}) +export class Paragraph {} + + diff --git a/src/listing.ts b/src/listing.ts new file mode 100644 index 0000000..7a1fc09 --- /dev/null +++ b/src/listing.ts @@ -0,0 +1,11 @@ +import {bootstrap} from 'angular2/platform/browser'; +import {Component} from 'angular2/core'; + + +@Component({ + selector: 'myListing', + templateUrl: 'src/table.html' +}) +export class Listing {} + + diff --git a/src/myParagraph.html b/src/myParagraph.html new file mode 100644 index 0000000..9d26c0f --- /dev/null +++ b/src/myParagraph.html @@ -0,0 +1,3 @@ +
+

Contrary to popular belief, Lorem Ipsum is not simply random text. It has roots in a piece of classical Latin literature from 45 BC, making it over 2000 years old. Richard McClintock, a Latin professor at Hampden-Sydney College in Virginia, looked up one of the more obscure Latin words, consectetur, from a Lorem Ipsum passage, and going through the cites of the word in classical literature, discovered the undoubtable source. Lorem Ipsum comes from sections 1.10.32 and 1.10.33 of "de Finibus Bonorum et Malorum" (The Extremes of Good and Evil) by Cicero, written in 45 BC. This book is a treatise on the theory of ethics, very popular during the Renaissance. The first line of Lorem Ipsum, "Lorem ipsum dolor sit amet..", comes from a line in section 1.10.32.

+
diff --git a/src/table.html b/src/table.html new file mode 100644 index 0000000..304d99e --- /dev/null +++ b/src/table.html @@ -0,0 +1,10 @@ + + + + + + + + + +
NameCountry CodeCapitalArea in km2PopulationContinent
\ No newline at end of file diff --git a/tsconfig.json b/tsconfig.json index a4302d0..0bae6ce 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -1,6 +1,6 @@ { "compilerOptions": { - "target": "es5", + "target": "es6", "module": "system", "moduleResolution": "node", "sourceMap": true,