Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Some enhancements #15

Merged
merged 4 commits into from
Nov 10, 2015
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
10 changes: 1 addition & 9 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,4 @@ node_js:
- "4.2"
- "5.0"

before_install:
- npm install -g grunt-cli
- npm install -g react-native-cli

script:
- grunt build
- react-native bundle --root src --platform ios --minify
- react-native bundle --root src --platform android --minify
- npm test
script: npm run travis
10 changes: 8 additions & 2 deletions Gruntfile.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
'use strict';

var serveStatic = require('serve-static');

var mountFolder = function (connect, dir) {
return connect.static(require('path').resolve(dir));
return serveStatic(require('path').resolve(dir));
};

var webpackDistConfig = require('./webpack.dist.config.js'),
Expand Down Expand Up @@ -63,7 +65,7 @@ module.exports = function (grunt) {
path: 'http://localhost:<%= connect.options.port %>/webpack-dev-server/index.web.html'
},
dist: {
path: 'http://localhost:<%= connect.options.port %>/index.web.html'
path: 'http://localhost:<%= connect.options.port %>/index.html'
}
},

Expand All @@ -89,6 +91,10 @@ module.exports = function (grunt) {
expand: true,
src: ['<%= pkg.src %>/images/*'],
dest: '<%= pkg.dist %>/images/'
},
{
src: ['<%= pkg.src %>/index.web.html'],
dest: '<%= pkg.dist %>/index.html'
}
]
}
Expand Down
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -146,8 +146,8 @@ There isn't any addtional requirements since you already installed the deps with

### Quick start

- `grunt build` to build the project (at least the first time)
- `grunt serve-web` to preview in the browser at http://localhost:8000/index.web.html or http://localhost:8000/webpack-dev-server/index.web.html with webpack-dev-server and hot reload enabled
- `npm run build` to build the project (at least the first time)
- `npm run serve-web` to preview in the browser at http://localhost:8000/index.web.html or http://localhost:8000/webpack-dev-server/index.web.html with webpack-dev-server and hot reload enabled

Congratulations! You've just successfully run the project as a Website App.

Expand All @@ -169,8 +169,8 @@ You can also setup an alias to call the binary.

### Quick start

- `grunt build` to build the project (at least the first time)
- `grunt serve-nw` to launch the desktop app and enable livereload
- `npm run build` to build the project (at least the first time)
- `npm run serve-nw` to launch the desktop app and enable livereload

Congratulations! You've just successfully run the project as a Desktop App.

Expand Down
17 changes: 14 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,20 @@
"flux",
"babel"
],
"src": "/",
"test": "test",
"dist": "dist",
"src": "./",
"test": "./test",
"dist": "./dist",
"mainInput": "main",
"mainOutput": "main",
"main": "index.nw.html",
"scripts": {
"build": "grunt build",
"travis": "npm run build && npm run react-native:ios && npm run react-native:android && npm test",
"react-native:ios": "grunt clean && react-native bundle --root src --platform ios --minify",
"react-native:android": "grunt clean && react-native bundle --root src --platform android --minify",
"serve-nw": "grunt serve-nw",
"serve-web": "grunt serve-web",
"serve-web:dist": "grunt serve-web:dist",
"start": "node_modules/react-native/packager/packager.sh",
"test": "jest"
},
Expand All @@ -48,14 +55,18 @@
"es6-promise": "^3.0.2",
"events": "^1.1.0",
"flux": "^2.1.1",
"grunt": "^0.4.5",
"grunt-cli": "^0.1.13",
"history": "^1.13.0",
"keymirror": "^0.1.1",
"normalize.css": "^3.0.3",
"object-assign": "^4.0.1",
"react": "^0.14.2",
"react-dom": "^0.14.2",
"react-native": "^0.13.2",
"react-native-cli": "^0.1.7",
"react-router": "^1.0.0-rc4",
"serve-static": "^1.10.0",
"uniqid": "^1.0.0"
},
"devDependencies": {
Expand Down