Skip to content

Commit

Permalink
[tabris-ng] reorganize folder structure
Browse files Browse the repository at this point in the history
Write build output to a dist/ folder. To exclude this folder
from git, but not from npm install, create an .npmignore file.

Rename example app folder to example/. Add a package.json and
tsconfig file to use this folder as an app template.
  • Loading branch information
ralfstx committed Mar 9, 2016
1 parent 03118b5 commit 645ef43
Show file tree
Hide file tree
Showing 10 changed files with 69 additions and 11 deletions.
2 changes: 2 additions & 0 deletions tabris-ng/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@ node_modules/
typings/
src/**/*.js

dist/

# Eclipse IDE
.project
.settings/
7 changes: 7 additions & 0 deletions tabris-ng/.npmignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
node_modules/
typings/
src/**/*.js

# Eclipse IDE
.project
.settings/
4 changes: 2 additions & 2 deletions tabris-ng/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

To experiment with Angular2 apps on Tabris.js, the module `tabris-ng` re-exports Angular2 with a renderer for Tabris.js.

The folder `src/app/` contains a simple example application.
The folder `src/example/` contains a simple example application.

### Prepare

Expand All @@ -20,7 +20,7 @@ The folder `src/app/` contains a simple example application.

npm run build

This will create a file `tabris-ng.js` in `node_modules/`.
This will create a file `dist/tabris-ng.js`.

### Start HTTP Server with example app

Expand Down
13 changes: 5 additions & 8 deletions tabris-ng/package.json
Original file line number Diff line number Diff line change
@@ -1,28 +1,25 @@
{
"main": "src/app/boot.js",
"name": "tabris-ng",
"version": "0.1.0",
"main": "dist/tabris-ng.js",
"private": true,
"repository": {
"type": "git",
"url": "https://github.com/eclipsesource/tabris-js-experiments.git"
},
"dependencies": {
"devDependencies": {
"angular2": "2.0.0-beta.8",
"es6-promise": "^3.1.2",
"es6-shim": "^0.33.3",
"reflect-metadata": "0.1.2",
"rxjs": "5.0.0-beta.2",
"zone.js": "0.5.15",
"parse5": "1.5.1",
"tabris": "^1.7.0"
},
"devDependencies": {
"compression-webpack-plugin": "^0.3.0",
"copy-webpack-plugin": "^1.1.1",
"http-server": "^0.9.0",
"webpack": "^1.12.14"
},
"scripts": {
"build": "webpack --config webpack.config.js --progress --profile --colors --display-error-details --display-cached",
"start": "hs -c-1"
"build": "webpack --config webpack.config.js --progress --profile --colors --display-error-details --display-cached"
}
}
16 changes: 16 additions & 0 deletions tabris-ng/src/example/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# Tabris-ng Example App

Example Angular2 application with Tabris.js.

### Prepare

npm install
npm install -g typescript

### Compile typescript

tsc -p .

### Start HTTP Server with example app

npm start
File renamed without changes.
File renamed without changes.
18 changes: 18 additions & 0 deletions tabris-ng/src/example/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
{
"name": "tabris-ng-example",
"version": "0.1.0",
"private": true,
"main": "boot.js",
"dependencies": {
"tabris": "https://tabrisjs.com/downloads/nightly/tabris.tgz",
"tabris-ng": "../../"
},
"devDependencies": {
"http-server": "^0.9.0",
"typescript": "^1.8.7"
},
"scripts": {
"build": "tsc -p .",
"start": "hs -c-1"
}
}
18 changes: 18 additions & 0 deletions tabris-ng/src/example/tsconfig.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
{
"version": "1.5.3",
"compilerOptions": {
"target": "es5",
"module": "commonjs",
"declaration": false,
"noImplicitAny": false,
"removeComments": true,
"noLib": false,
"preserveConstEnums": true,
"suppressImplicitAnyIndexErrors": true,
"emitDecoratorMetadata": true,
"experimentalDecorators": true
},
"exclude": [
"node_modules"
]
}
2 changes: 1 addition & 1 deletion tabris-ng/webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ var OccurenceOrderPlugin = require('webpack/lib/optimize/OccurenceOrderPlugin');
module.exports = {
entry: "./src/tabris-bootstrap.js",
output: {
filename: "node_modules/tabris-ng.js",
filename: "dist/tabris-ng.js",
library: "tabris-ng",
libraryTarget: "commonjs2"
},
Expand Down

0 comments on commit 645ef43

Please sign in to comment.