Brew-cask: local node update

Source: Internet
Author: User
Tags install node brew cask

Brew-cask: local node update
The reason is that Node v4.2.2 (LTS) is released today. What is LTS? Baidu's Long Term Support: the version is supported for a Long time (three years), and the general version is 18 months. So I plan to update it. In fact, I had just tossed node5 a few days ago and switched it back to version 4.x. Now I have to play with this little dish for the time being. I have written an article brew-cask local installation application before, because the mac didn't get involved soon, and it won't be ruby at all. Later I found that the script in the directory/usr/local/Library/Taps/phinze/homebrew-cask/Casks/is OK. Modify the cask installation script to open the/usr/local/Library/Taps/phinze/homebrew-cask/Casks/node. rb script. The following code is displayed.

cask :v1 => 'node' do  version '4.2.1'  sha256 '688df0a12461f378b296f69e8ae2c1cbb974b0216278624815bce7dcfea080c2'  url "https://nodejs.org/dist/v#{version}/node-v#{version}.pkg"  name 'Node.js'  homepage 'https://nodejs.org/'  license :mit  pkg  "node-v#{version}.pkg"  uninstall :pkgutil => 'org.nodejs.node.pkg'end

 

I found a sha256, But I downloaded 4.2.2 and found an online tool to calculate sha256. Now that you have downloaded the file, install it locally. Then, modify the rb step as follows:
cask :v1 => 'node' do  version '4.2.2'  sha256 '0b2ca2deecfeb37d23745c374c2332a11b291b58df8b39803c27b089c16bb1d2'  url "file:///Users/cik/Downloads/node-v4.2.2.pkg"  name 'Node.js'  homepage 'https://nodejs.org/'  license :mit  pkg  "node-v#{version}.pkg"  uninstall :pkgutil => 'org.nodejs.node.pkg'end
OK, save. Of course, remember to change it to your local file address. The file: // protocol is added before your local path. Do not change the file name, because pkg "node-v # {version}. pkg" is installed below, so you cannot change the file name at will. Install $ brew cask install node to install node. You will find that the installation is complete in an instant and you no longer need to wait for cask updates or worry about wall issues. Note that the cask tool is actually an artifact. However, tianchao is neither a wall nor a slow download process. Now we can use download tools such as thunder to download files, so we don't have to worry about the wall, slow, and disconnected issues any more. I believe that the applications installed by many people are cracked versions, and there is no way to use cask. Now all these problems are solved.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.