]> khamidou — GitHub mirrors - electron.git/commitdiff
We don't need to force updating to latest npm.
authorCheng Zhao <zcbenz@gmail.com>
Mon, 1 Jul 2013 08:06:37 +0000 (16:06 +0800)
committerCheng Zhao <zcbenz@gmail.com>
Mon, 1 Jul 2013 08:06:37 +0000 (16:06 +0800)
script/bootstrap.py

index f0bf121ffd64e3cefaeaf8442e631a60dc8fd247..45f9927afb6e142ce6d342339e4936ee3c6d0b0f 100755 (executable)
@@ -21,10 +21,10 @@ def main():
   args = parse_args()
   update_submodules()
   bootstrap_brightray(args.url)
+  update_node_modules()
   if sys.platform == 'cygwin':
     update_win32_python()
   update_atom_shell()
-  update_npm()
 
 
 def parse_args():
@@ -49,6 +49,10 @@ def bootstrap_brightray(url):
   subprocess.check_call([sys.executable, bootstrap, url])
 
 
+def update_node_modules():
+  subprocess.check_call(['npm', 'install', '--silent'])
+
+
 def update_win32_python():
   with scoped_cwd(VENDOR_DIR):
     if not os.path.exists('python_26'):
@@ -63,12 +67,5 @@ def update_atom_shell():
   subprocess.check_call([sys.executable, update])
 
 
-def update_npm():
-  subprocess.check_call(['npm', 'install', 'npm', '--silent'])
-
-  npm = os.path.join(SOURCE_ROOT, 'node_modules', '.bin', 'npm')
-  subprocess.check_call([npm, 'install', '--silent'])
-
-
 if __name__ == '__main__':
   sys.exit(main())