Skip to content

Commit 68fdba8

Browse files
committed
install dependencies and add scripts
1 parent cda6710 commit 68fdba8

File tree

2 files changed

+79
-0
lines changed

2 files changed

+79
-0
lines changed

gulpfile.js

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
var gulp = require('gulp');
2+
3+
var os = require('os');
4+
var fs = require('fs');
5+
var path = require('path');
6+
7+
/** Clear react-packager cache */
8+
gulp.task('clear-cache', function () {
9+
var tempDir = os.tmpdir();
10+
11+
var cacheFiles = fs.readdirSync(tempDir).filter(function (fileName) {
12+
return fileName.indexOf('react-packager-cache') === 0;
13+
});
14+
15+
cacheFiles.forEach(function (cacheFile) {
16+
var cacheFilePath = path.join(tempDir, cacheFile);
17+
fs.unlinkSync(cacheFilePath);
18+
console.log('Deleted cache: ', cacheFilePath);
19+
});
20+
21+
if (!cacheFiles.length) {
22+
console.log('No cache files found!');
23+
}
24+
});

package.json

Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
{
2+
"name": "ReactNativeWebHelloWorld",
3+
"version": "0.0.1",
4+
"private": true,
5+
"scripts": {
6+
"start": "react-native start",
7+
"ios-bundle": "react-native bundle --dev false --entry-file index.ios.js --platform ios --bundle-output ios/main.jsbundle",
8+
"ios-dev-bundle": "react-native bundle --entry-file index.ios.js --platform ios --bundle-output ios/main.jsbundle",
9+
"android-bundle": "react-native bundle --dev false --entry-file index.android.js --platform android --bundle-output android/app/src/main/assets/index.android.bundle",
10+
"android-dev-bundle": "react-native bundle --entry-file index.android.js --platform android --bundle-output android/app/src/main/assets/index.android.bundle",
11+
"web-bundle": "webpack --config web/webpack/web.prod.config.js --progress --colors",
12+
"web-dev": "webpack-dev-server --content-base web/public/ --config web/webpack/web.dev.config.js --port 3001 --inline --hot --colors",
13+
"clear-cache": "gulp clear-cache"
14+
},
15+
"dependencies": {
16+
"babel": "^6.3.26",
17+
"babel-polyfill": "^6.3.14",
18+
"clone": "^1.0.2",
19+
"morgan": "^1.6.1",
20+
"object-assign": "^4.0.1",
21+
"react": "^0.14.6",
22+
"react-dom": "^0.14.6",
23+
"react-native": "^0.18.1",
24+
"react-redux": "^3.1.2",
25+
"redux": "^3.1.1",
26+
"redux-thunk": "^1.0.3",
27+
"superagent": "^1.7.2"
28+
},
29+
"devDependencies": {
30+
"autoprefixer": "^6.3.1",
31+
"autoprefixer-loader": "^3.2.0",
32+
"babel-core": "^6.4.5",
33+
"babel-loader": "^6.2.1",
34+
"babel-plugin-react-transform": "^2.0.0",
35+
"babel-preset-es2015": "^6.3.13",
36+
"babel-preset-react": "^6.3.13",
37+
"css-loader": "^0.23.1",
38+
"gulp": "^3.9.0",
39+
"less": "^2.5.3",
40+
"less-loader": "^2.2.2",
41+
"react-native-cli": "^0.1.10",
42+
"react-transform-catch-errors": "^1.0.1",
43+
"react-transform-hmr": "^1.0.1",
44+
"redbox-react": "^1.2.0",
45+
"redux-devtools": "^3.0.1",
46+
"redux-devtools-dock-monitor": "^1.0.1",
47+
"redux-devtools-log-monitor": "^1.0.2",
48+
"redux-logger": "^2.4.0",
49+
"style-loader": "^0.13.0",
50+
"webpack": "^1.12.12",
51+
"webpack-dev-middleware": "^1.5.1",
52+
"webpack-dev-server": "^1.14.1",
53+
"webpack-hot-middleware": "^2.6.4"
54+
}
55+
}

0 commit comments

Comments
 (0)