您的位置:

全局升级corejs@3(全局升级node)

全局升级corejs@3(全局升级node)

更新:

本文目录一览:

如何单独下载ui.core.js

在jQuery ui的官网页面 有勾选项的。只勾选core那项就可以了。把其他的勾选去掉然后下载

react native gradle怎么升级

更新版本的React Native将会让你访问更多的APIs, 这样我们可以去使用更多的APIs,视图Views,以及开发者工具以及其他一些好用的东西。浏览版本更新日志就会发现整体FB官方开发进度还是非常紧张的,这样就很容易导致旧版本会出现不能用的情况,后期可能会出现不可预料的情况,这边建议大家尽量更新最新正式版本。

我们大家都知道一个React Native项目使用Android项目,iOS项目和JavaScript项目三部分进行组成的,而且三者都关联打包在npm包内的,所以该项目版本进行更新是比较繁琐的。下面我来给大家讲解一下React Native项目的升级步骤。

一、查看当前版本

[plain] view plain copy

span style="font-family:SimSun;font-size:14px;"pengchengxiang@ubuntu:~/AwesomeProject$ react-native --version

react-native-cli: 0.2.0

react-native: 0.22.2/span

二、查看最新的版本

[plain] view plain copy

span style="font-family:SimSun;font-size:14px;"pengchengxiang@ubuntu:~/AwesomeProject$ npm info react-native

{ name: 'react-native',

'dist-tags': { latest: '0.25.1', next: '0.26.0-rc' },

versions:

[ '0.0.0',

'0.0.5',

... ...

'0.24.1',

'0.25.0-rc',

'0.25.1',

'0.26.0-rc' ],

maintainers:

... ...

dist:

{ shasum: '4177e70e56281cec8fb5fe76218bf6606eeb34b8',

tarball: '' },

directories: {} }/span

三、升级依赖的版本

[plain] view plain copy

span style="font-family:SimSun;font-size:14px;"pengchengxiang@ubuntu:~/AwesomeProject$ npm install --save react-native@0.25.1

bufferutil@1.2.1 install /home/pengchengxiang/AwesomeProject/node_modules/react-native/node_modules/ws/node_modules/bufferutil

node-gyp rebuild

make: Entering directory `/home/pengchengxiang/AwesomeProject/node_modules/react-native/node_modules/ws/node_modules/bufferutil/build'

CXX(target) Release/obj.target/bufferutil/src/bufferutil.o

SOLINK_MODULE(target) Release/obj.target/bufferutil.node

COPY Release/bufferutil.node

make: Leaving directory `/home/pengchengxiang/AwesomeProject/node_modules/react-native/node_modules/ws/node_modules/bufferutil/build'

utf-8-validate@1.2.1 install /home/pengchengxiang/AwesomeProject/node_modules/react-native/node_modules/ws/node_modules/utf-8-validate

node-gyp rebuild

make: Entering directory `/home/pengchengxiang/AwesomeProject/node_modules/react-native/node_modules/ws/node_modules/utf-8-validate/build'

CXX(target) Release/obj.target/validation/src/validation.o

SOLINK_MODULE(target) Release/obj.target/validation.node

COPY Release/validation.node

make: Leaving directory `/home/pengchengxiang/AwesomeProject/node_modules/react-native/node_modules/ws/node_modules/utf-8-validate/build'

spawn-sync@1.0.15 postinstall /home/pengchengxiang/AwesomeProject/node_modules/react-native/node_modules/yeoman-generator/node_modules/cross-spawn/node_modules/spawn-sync

node postinstall

npm WARN optional dep failed, continuing fsevents@1.0.12

react-native@0.25.1 node_modules/react-native

├── regenerator-runtime@0.9.5

├── react-clone-referenced-element@1.0.1

├── absolute-path@0.0.0

├── graceful-fs@4.1.3

├── progress@1.1.8

├── stacktrace-parser@0.1.3

├── base64-js@0.0.8

├── event-target-shim@1.1.1

├── wordwrap@1.0.0

├── react-timer-mixin@0.13.3

├── immutable@3.7.6

├── semver@5.1.0

├── image-size@0.3.5

├── opn@3.0.3 (object-assign@4.1.0)

├── bser@1.0.2 (node-int64@0.4.0)

├── debug@2.2.0 (ms@0.7.1)

├── json-stable-stringify@1.0.1 (jsonify@0.0.0)

├── temp@0.8.3 (os-tmpdir@1.0.1, rimraf@2.2.8)

├── chalk@1.1.3 (escape-string-regexp@1.0.5, ansi-styles@2.2.1, supports-color@2.0.0, has-ansi@2.0.0, strip-ansi@3.0.1)

├── source-map@0.4.4 (amdefine@1.0.0)

├── mkdirp@0.5.1 (minimist@0.0.8)

├── rebound@0.0.13

├── optimist@0.6.1 (wordwrap@0.0.3, minimist@0.0.10)

├── worker-farm@1.3.1 (xtend@4.0.1, errno@0.1.4)

├── promise@7.1.1 (asap@2.0.3)

├── node-haste@2.9.6 (throat@2.0.2, denodeify@1.2.1)

├── sane@1.3.4 (fb-watchman@1.9.0, watch@0.10.0, minimist@1.2.0, exec-sh@0.2.0, minimatch@0.2.14, walker@1.0.7)

├── yargs@3.32.0 (decamelize@1.2.0, y18n@3.2.1, camelcase@2.1.1, window-size@0.1.4, cliui@3.2.0, string-width@1.0.1, os-locale@1.4.0)

├── node-fetch@1.5.1 (is-stream@1.1.0, encoding@0.1.12)

├── art@0.10.1

├── ws@0.8.1 (options@0.0.6, ultron@1.0.2, bufferutil@1.2.1, utf-8-validate@1.2.1)

├── json5@0.4.0

├── uglify-js@2.6.2 (async@0.2.10, uglify-to-browserify@1.0.2, source-map@0.5.6, yargs@3.10.0)

├── connect@2.30.2 (bytes@2.1.0, cookie-signature@1.0.6, utils-merge@1.0.0, content-type@1.0.1, on-headers@1.0.1, pause@0.1.0, fresh@0.3.0, parseurl@1.3.1, response-time@2.3.1, vhost@3.0.2, basic-auth-connect@1.0.0, cookie@0.1.3, cookie-parser@1.3.5, depd@1.0.1, qs@4.0.0, method-override@2.3.5, connect-timeout@1.6.2, serve-favicon@2.3.0, http-errors@1.3.1, morgan@1.6.1, finalhandler@0.4.0, express-session@1.11.3, type-is@1.6.12, csurf@1.8.3, serve-static@1.10.2, multiparty@3.3.2, errorhandler@1.4.3, compression@1.5.2, body-parser@1.13.3, serve-index@1.7.3)

├── jstransform@11.0.3 (object-assign@2.1.1, base62@1.1.1, esprima-fb@15001.1.0-dev-harmony-fb, commoner@0.10.4)

├── module-deps@3.9.1 (browser-resolve@1.11.1, through2@1.1.1, inherits@2.0.1, defined@1.0.0, duplexer2@0.0.2, xtend@4.0.1, concat-stream@1.4.10, parents@1.0.1, readable-stream@1.1.14, subarg@1.0.0, stream-combiner2@1.0.2, JSONStream@1.1.1, resolve@1.1.7, detective@4.3.1)

├── babel-plugin-external-helpers@6.8.0 (babel-runtime@6.6.1)

├── babel-register@6.8.0 (path-exists@1.0.0, home-or-tmp@1.0.0, source-map-support@0.2.10, babel-runtime@6.6.1)

├── babel-polyfill@6.8.0 (babel-regenerator-runtime@6.5.0, babel-runtime@6.6.1)

├── babel-types@6.8.1 (to-fast-properties@1.0.2, esutils@2.0.2, babel-traverse@6.8.0, babel-runtime@6.6.1)

├── babel-core@6.8.0 (slash@1.0.0, babel-messages@6.8.0, babel-template@6.8.0, shebang-regex@1.0.0, path-exists@1.0.0, path-is-absolute@1.0.0, babel-helpers@6.8.0, private@0.1.6, convert-source-map@1.2.0, babel-code-frame@6.8.0, source-map@0.5.6, minimatch@2.0.10, babel-generator@6.8.0, babel-traverse@6.8.0, babel-runtime@6.6.1)

├── babylon@6.8.0 (babel-runtime@6.6.1)

├── joi@6.10.1 (topo@1.1.0, isemail@1.2.0, hoek@2.16.3, moment@2.13.0)

├── lodash@3.10.1

├── fbjs@0.7.2 (ua-parser-js@0.7.10, loose-envify@1.1.0, isomorphic-fetch@2.2.1, core-js@1.2.6)

├── fbjs-scripts@0.4.0 (object-assign@4.1.0, through2@2.0.1, gulp-util@3.0.7, core-js@1.2.6, babel@5.8.38)

├── core-js@2.3.0

├── yeoman-environment@1.6.1 (escape-string-regexp@1.0.5, log-symbols@1.0.2, text-table@0.2.0, untildify@2.1.0, diff@2.2.2, mem-fs@1.1.2, globby@4.0.0, grouped-queue@0.3.2, inquirer@1.0.2, lodash@4.11.2)

├── react-transform-hmr@1.0.4 (global@4.3.0, react-proxy@1.1.8)

├── yeoman-generator@0.20.3 (detect-conflict@1.0.0, read-chunk@1.0.1, path-exists@1.0.0, yeoman-welcome@1.0.1, path-is-absolute@1.0.0, async@1.5.2, mime@1.3.4, text-table@0.2.0, class-extend@0.1.2, dargs@4.1.0, user-home@2.0.0, xdg-basedir@2.0.0, istextorbinary@1.0.2, nopt@3.0.6, diff@2.2.2, run-async@0.1.0, cli-table@0.3.1, shelljs@0.5.3, yeoman-assert@2.2.1, through2@2.0.1, glob@5.0.15, findup-sync@0.2.1, rimraf@2.5.2, mem-fs-editor@2.2.0, cross-spawn@2.2.3, underscore.string@3.3.4, sinon@1.17.4, pretty-bytes@2.0.1, github-username@2.1.0, dateformat@1.0.12, download@4.4.3, html-wiring@1.2.0, inquirer@0.8.5, gruntfile-editor@1.2.0)

└── babel-preset-react-native@1.7.0 (babel-plugin-syntax-flow@6.8.0, babel-plugin-syntax-async-functions@6.8.0, babel-plugin-transform-es2015-template-literals@6.8.0, babel-plugin-transform-class-properties@6.8.0, babel-plugin-syntax-class-properties@6.8.0, babel-plugin-transform-es2015-arrow-functions@6.8.0, babel-plugin-transform-es2015-destructuring@6.8.0, babel-plugin-transform-es2015-shorthand-properties@6.8.0, babel-plugin-transform-es2015-spread@6.8.0, babel-plugin-transform-flow-strip-types@6.8.0, babel-plugin-transform-es2015-for-of@6.8.0, babel-plugin-transform-react-display-name@6.8.0, babel-plugin-syntax-jsx@6.8.0, babel-plugin-check-es2015-constants@6.8.0, babel-plugin-transform-es2015-function-name@6.8.0, babel-plugin-transform-es2015-computed-properties@6.8.0, babel-plugin-transform-react-jsx@6.8.0, babel-plugin-transform-object-rest-spread@6.8.0, babel-plugin-transform-es2015-modules-commonjs@6.8.0, babel-plugin-transform-es2015-block-scoping@6.8.0, babel-plugin-transform-object-assign@6.8.0, babel-plugin-transform-es2015-parameters@6.8.0, babel-plugin-transform-es2015-classes@6.8.0, babel-plugin-syntax-trailing-function-commas@6.8.0, babel-plugin-transform-regenerator@6.8.0, babel-plugin-react-transform@2.0.2)/span

别用babel-polyfill了,教你用core-js@3兼容IE浏览器

最近新启动了个pc端的项目,项目要求兼容IE,想必各位前端都清楚,要想拿下IE这个破地,必须用上babel。

个人平时对这方面也没有过分的关注,于是乎各种网上寻找解决方案,这一找,发现有时候网络就跟个历史博物馆一样,大部分问题的解决方案基本都是过时了的。通篇看下来,基本全是推荐使用 babel-polyfill 的,于是我上npm看了下,发现这个插件最后一次提交是3年前。

然后在入口文件中加入以下内容:

再运行后,你会发现IE浏览器再也不会只能出来个标题,页面一片空白了。

怎么样?是不是很简单!

关于网站首页与子页面是否加载同一个js文件的问题

相同的文件客户端只会向服务器请求一次,不必担心这个,增加服务器负载的是你的页面中的文件的多少,大小,顺序,不同请求的次数和一些其他的问题

如何升级nodejs版本

首先安装n模块:

npm install -g n

第二步:

升级node.js到最新稳定版

n stable

是不是很简单?

n后面也可以跟随版本号比如:

n v0.10.26

n 0.10.26

分享几个npm的常用命令

npm -v #显示版本,检查npm 是否正确安装。

npm install express #安装express模块

npm install -g express #全局安装express模块

npm list #列出已安装模块

npm show express #显示模块详情

npm update #升级当前目录下的项目的所有模块

npm update express #升级当前目录下的项目的指定模块

npm update -g express #升级全局安装的express模块

npm uninstall express #删除指定的模块