Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
36 changes: 36 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
# ng2chat

A chat app written in Angular 2

## Getting started

### Prerequisites

* Node
* NPM

### Install dependencies

The following command installs all the depenedencies for the project:

**On OSX / Linux**

```
./install
```

**On windows**

```
install
```

### Running the app

To run the app on port 8080 with LiveReload, run:

```
npm run serve
```

Then you can visit `http://localhost:8080` in the browser.
9 changes: 4 additions & 5 deletions config.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,18 +4,17 @@ System.config({
"github:*": "jspm_packages/github/*.js",
"*": "*.js",
"github:angular*": "jspm_packages/github/angular/*.es6"
},
"traceurOptions": {
"annotations": true,
"types": true
}
});

System.config({
"map": {
"angular/angular": "github:angular/angular@2.0.0-alpha.15",
"angular/zone.js": "github:angular/zone.js@0.4.1",
"angular2": "github:angular/angular@2.0.0-alpha.15/dist/js/prod/es6/angular2",
"automattic/socket.io-client": "github:automattic/socket.io-client@1.3.5"
"automattic/socket.io-client": "github:automattic/socket.io-client@1.3.5",
"traceur": "github:jmcriffey/bower-traceur@0.0.87",
"traceur-runtime": "github:jmcriffey/bower-traceur-runtime@0.0.87"
}
});

27 changes: 27 additions & 0 deletions install
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
#!/usr/bin/env node

var spawn = require('child_process').spawn;

// Do some windows checks to make sure we're executing the right commands
var npm = (process.platform === "win32" ? "npm.cmd" : "npm");
var jspm = (process.platform === "win32" ? "jspm.cmd" : "jspm");
var npmChild = spawn(npm, ["install"]);

npmChild.on('close', function (code) {
if (code !== 0) {
console.log('npm process exited with code ' + code);
} else {
// Spawn
var jspmChild = spawn(jspm, ["install"]);
// Output to the cli
jspmChild.stdout.on('data', function (data) { console.log(data.toString()); });
jspmChild.stderr.on('data', function (data) { console.log(data.toString()); });
jspmChild.on('error', function() { console.log(arguments); });
jspmChild.stdin.end();
}
npmChild.stdin.end();
});

npmChild.stdout.on('data', function (data) { console.log(data.toString()); });
npmChild.stderr.on('data', function (data) { console.log(data.toString()); });
npmChild.on('error', function() { console.log(arguments); });
1 change: 1 addition & 0 deletions install.cmd
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
@node "%~dpn0" %*
22 changes: 20 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,13 +1,31 @@
{
"description": "A chat app in Angular2",
"repository": {
"type": "git",
"url": "http://github.com/robwormald/ng2chat.git"
},
"jspm": {
"directories": {
"lib": ".",
"packages": "jspm_packages"
"lib": "."
},
"dependencies": {
"angular/angular": "github:angular/angular@2.0.0-alpha.15",
"angular/zone.js": "github:angular/zone.js@^0.4.1",
"automattic/socket.io-client": "github:automattic/socket.io-client@^1.3.5"
},
"devDependencies": {
"traceur": "github:jmcriffey/bower-traceur@0.0.87",
"traceur-runtime": "github:jmcriffey/bower-traceur-runtime@0.0.87"
}
},
"devDependencies": {
"gulp": "^3.8.11",
"gulp-concat": "^2.5.2",
"gulp-connect": "^2.2.0",
"jspm": "^0.15.0",
"systemjs-builder": "^0.10.2"
},
"scripts": {
"serve": "gulp"
}
}