Skip to content

Commit 23042f6

Browse files
authored
Merge pull request #175 from GeekyAnts/upgrade-deps
• Remove deprecated React Native components • Removed warning for deprecated React lifecycle Methods
2 parents d36ad28 + 18ccfd4 commit 23042f6

File tree

25 files changed

+920
-867
lines changed

25 files changed

+920
-867
lines changed

.github/FUNDING.yml

+8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
# These are supported funding model platforms
2+
3+
github: # Replace with up to 4 GitHub Sponsors-enabled usernames e.g., [user1, user2]
4+
patreon: # Replace with a single Patreon username
5+
open_collective: vue-native-core
6+
ko_fi: # Replace with a single Ko-fi username
7+
tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel
8+
custom: # Replace with a single custom sponsorship URL

README.md

+18
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,24 @@ Generate [CRNA + Vue App](https://github.com/GeekyAnts/vue-native-core)
3333
$ vue-native init <projectName>
3434
```
3535

36+
## NOTE:
37+
38+
```
39+
'AlertIOS',
40+
'AsyncStorage',
41+
'ImageStore',
42+
'ListView',
43+
'MaskedViewIOS',
44+
'NetInfo',
45+
'Slider',
46+
'SwipeableListView',
47+
'ViewPagerAndroid',
48+
'WebView',
49+
```
50+
The above modules are set to be removed from future core react-native.
51+
Hence these modules can no longer be imported from vue-native.
52+
[[Further Instructions](https://facebook.github.io/react-native/blog/2019/03/12/releasing-react-native-059#lean-core-is-underway)]
53+
3654
## Contributors
3755

3856
This project exists thanks to all the people who contribute.

build/.eslintrc

+6-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
1+
12
{
3+
"env": {
4+
"es6": true,
5+
},
26
"rules": {
3-
"camelcase": 0
4-
}
7+
"camelcase": 0,
8+
},
59
}

build/build.js

+21-23
Original file line numberDiff line numberDiff line change
@@ -16,11 +16,6 @@ if (process.argv[2]) {
1616
builds = builds.filter(b => {
1717
return filters.some(f => b.dest.indexOf(f) > -1)
1818
})
19-
} else {
20-
// filter out weex builds by default
21-
builds = builds.filter(b => {
22-
return b.dest.indexOf('weex') === -1
23-
})
2419
}
2520

2621
build(builds)
@@ -42,24 +37,27 @@ function build (builds) {
4237

4338
function buildEntry (config) {
4439
const isProd = /min\.js$/.test(config.dest)
45-
return rollup.rollup(config).then(bundle => {
46-
const code = bundle.generate(config).code
47-
if (isProd) {
48-
var minified = (config.banner ? config.banner + '\n' : '') + uglify.minify(code, {
49-
fromString: true,
50-
output: {
51-
screw_ie8: true,
52-
ascii_only: true
53-
},
54-
compress: {
55-
pure_funcs: ['makeMap']
56-
}
57-
}).code
58-
return write(config.dest, minified, true)
59-
} else {
60-
return write(config.dest, code)
61-
}
62-
})
40+
const output = config.output
41+
const { file, banner } = output
42+
return rollup.rollup(config)
43+
.then(bundle => bundle.generate(output))
44+
.then(({ output: [{ code }] }) => {
45+
if (isProd) {
46+
const minified = (banner ? banner + '\n' : '') + uglify.minify(code, {
47+
fromString: true,
48+
output: {
49+
screw_ie8: true,
50+
ascii_only: true
51+
},
52+
compress: {
53+
pure_funcs: ['makeMap']
54+
}
55+
}).code
56+
return write(file, minified, true)
57+
} else {
58+
return write(file, code)
59+
}
60+
})
6361
}
6462

6563
function write (dest, code, zip) {

build/config.js

+20-11
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,9 @@ const buble = require("rollup-plugin-buble");
33
const alias = require("rollup-plugin-alias");
44
const replace = require("rollup-plugin-replace");
55
const flow = require("rollup-plugin-flow-no-whitespace");
6-
const version = process.env.VERSION || require("../package.json").version;
6+
const version =
7+
process.env.VERSION
8+
|| require("../packages/vue-native-core/package.json").version;
79

810
const banner =
911
"/*!\n" +
@@ -31,45 +33,52 @@ const builds = {
3133
entry: resolve("vue-native/index.js"),
3234
dest: resolve("packages/vue-native-core/build.js"),
3335
format: "cjs",
34-
external: ["react"]
36+
external: ["react"],
3537
},
3638
"vue-native-helper": {
3739
entry: resolve("vue-native/runtime/helpers.js"),
3840
dest: resolve("packages/vue-native-helper/build.js"),
39-
format: "cjs"
41+
format: "cjs",
4042
},
4143
"vue-native-scripts": {
4244
entry: resolve("vue-native/scripts/index.js"),
4345
dest: resolve("packages/vue-native-scripts/build.js"),
4446
format: "cjs",
4547
external: []
4648
.concat(Object.keys(require("../packages/vue-native-scripts/package.json").dependencies))
47-
.concat(Object.keys(require("../packages/vue-native-scripts/package.json").peerDependencies))
49+
.concat(Object.keys(require("../packages/vue-native-scripts/package.json").peerDependencies)),
4850
},
4951
"vue-native-template-compiler": {
5052
entry: resolve("vue-native/compiler.js"),
5153
dest: resolve("packages/vue-native-template-compiler/build.js"),
5254
format: "cjs",
53-
external: ["change-case", "he", "de-indent"]
55+
external: ["change-case", "he", "de-indent"],
5456
}
5557
};
5658

5759
function genConfig(opts) {
5860
const config = {
59-
entry: opts.entry,
60-
dest: opts.dest,
61+
input: opts.entry,
62+
output: {
63+
file: opts.dest,
64+
format: opts.format,
65+
banner: opts.banner,
66+
name: "Vue",
67+
},
6168
external: opts.external,
62-
format: opts.format,
63-
banner: opts.banner,
64-
moduleName: "Vue",
6569
plugins: [
6670
replace({
6771
__VERSION__: version
6872
}),
6973
flow(),
7074
buble(),
7175
alias(Object.assign({}, aliases, opts.alias))
72-
].concat(opts.plugins || [])
76+
].concat(opts.plugins || []),
77+
onwarn: (msg, warn) => {
78+
if (!/Circular/.test(msg)) {
79+
warn(msg)
80+
}
81+
},
7382
};
7483

7584
if (opts.env) {

package.json

+9-36
Original file line numberDiff line numberDiff line change
@@ -30,33 +30,16 @@
3030
"types/*.d.ts"
3131
],
3232
"scripts": {
33-
"dev": "rollup -w -c build/config.js --environment TARGET:web-full-dev",
34-
"dev:cjs": "rollup -w -c build/config.js --environment TARGET:web-runtime-cjs",
35-
"dev:esm": "rollup -w -c build/config.js --environment TARGET:web-runtime-esm",
36-
"dev:observer": "rollup -w -c build/config.js --environment TARGET:common-observer",
37-
"dev:parser": "rollup -w -c build/config.js --environment TARGET:template-parser",
38-
"dev:compiler": "rollup -w -c build/config.js --environment TARGET:react-vue-template-compiler",
39-
"dev:helper": "rollup -w -c build/config.js --environment TARGET:react-vue-helper",
40-
"dev:react": "rollup -w -c build/config.js --environment TARGET:react-vue",
41-
"dev:test": "karma start build/karma.dev.config.js",
42-
"dev:ssr": "rollup -w -c build/config.js --environment TARGET:web-server-renderer",
43-
"dev:weex": "rollup -w -c build/config.js --environment TARGET:weex-framework ",
44-
"dev:weex:compiler": "rollup -w -c build/config.js --environment TARGET:weex-compiler ",
4533
"build": "node build/build.js",
46-
"build:ssr": "npm run build -- vue.runtime.common.js,vue-server-renderer",
47-
"build:weex": "npm run build -- weex-vue-framework,weex-template-compiler",
4834
"test": "npm run lint && flow check && npm run test:types && npm run test:cover && npm run test:e2e -- --env phantomjs && npm run test:ssr && npm run test:weex",
4935
"test:unit": "karma start build/karma.unit.config.js",
5036
"test:cover": "karma start build/karma.cover.config.js",
5137
"test:e2e": "npm run build -- vue.min.js && node test/e2e/runner.js",
52-
"test:weex": "npm run build:weex && jasmine JASMINE_CONFIG_PATH=test/weex/jasmine.json",
53-
"test:ssr": "npm run build:ssr && jasmine JASMINE_CONFIG_PATH=test/ssr/jasmine.json",
5438
"test:sauce": "npm run sauce -- 0 && npm run sauce -- 1 && npm run sauce -- 2",
5539
"test:types": "tsc -p ./types/test/tsconfig.json",
5640
"lint": "eslint src build test",
5741
"flow": "flow check",
5842
"sauce": "karma start build/karma.sauce.config.js",
59-
"bench:ssr": "npm run build:ssr && node benchmarks/ssr/renderToString.js && node benchmarks/ssr/renderToStream.js",
6043
"release": "bash build/release.sh",
6144
"install:hooks": "ln -fs ../../build/git-hooks/pre-commit .git/hooks/pre-commit",
6245
"run-vue": "cross-env NODE_ENV=development webpack-dev-server --open --hot",
@@ -77,7 +60,7 @@
7760
"babel-preset-flow-vue": "^1.0.0",
7861
"babel-preset-latest": "^6.0.0",
7962
"babel-preset-react": "^6.24.1",
80-
"buble": "^0.15.2",
63+
"buble": "^0.19.8",
8164
"chalk": "^1.1.3",
8265
"change-case": "^3.0.1",
8366
"chromedriver": "^2.21.2",
@@ -128,36 +111,26 @@
128111
"pug": "^2.0.0-rc.1",
129112
"pug-loader": "^2.3.0",
130113
"resolve": "^1.2.0",
131-
"rollup": "^0.41.4",
132-
"rollup-plugin-alias": "^1.2.0",
133-
"rollup-plugin-babel": "^2.4.0",
134-
"rollup-plugin-buble": "^0.15.0",
114+
"rollup": "^1.17.0",
115+
"rollup-plugin-alias": "^1.5.2",
116+
"rollup-plugin-buble": "^0.19.8",
135117
"rollup-plugin-flow-no-whitespace": "^1.0.0",
136-
"rollup-plugin-replace": "^1.1.0",
137-
"rollup-watch": "^3.2.2",
118+
"rollup-plugin-replace": "^2.2.0",
138119
"sass-loader": "^6.0.5",
139120
"selenium-server": "^2.53.1",
140121
"serialize-javascript": "^1.3.0",
141122
"typescript": "^2.1.6",
142-
"uglify-js": "^2.6.2",
123+
"uglify-js": "^3.6.0",
143124
"vue-loader": "^12.0.4",
144-
"vue-template-compiler": "^2.3.2",
145125
"webpack": "^2.4.1",
146126
"webpack-dev-middleware": "^1.10.2",
147-
"webpack-dev-server": "^2.2.0",
148-
"weex-js-runtime": "^0.17.0-alpha4",
149-
"weex-vdom-tester": "^0.1.4"
127+
"webpack-dev-server": "^2.2.0"
150128
},
151129
"dependencies": {
152-
"element-ui": "^1.3.4",
130+
"opencollective": "^1.0.3",
153131
"opencollective-postinstall": "^2.0.0",
154-
"prop-types": "^15.5.8",
155132
"react": "^15.5.4",
156-
"react-dom": "^15.5.4",
157-
"style-loader": "^0.17.0",
158-
"vue": "2.3.3",
159-
"vuex": "^2.3.1",
160-
"opencollective": "^1.0.3"
133+
"react-dom": "^15.5.4"
161134
},
162135
"collective": {
163136
"type": "opencollective",

0 commit comments

Comments
 (0)