]> khamidou — GitHub mirrors - electron.git/commitdiff
Install npm before cleaning node_modules
authorCheng Zhao <zcbenz@gmail.com>
Thu, 2 Jul 2015 14:45:26 +0000 (22:45 +0800)
committerCheng Zhao <zcbenz@gmail.com>
Thu, 2 Jul 2015 14:45:26 +0000 (22:45 +0800)
script/cibuild

index ef10977f33b2a5801e0485441fc34ed4de733dce..a4a58caea4d0e8cf94224c560dca1680ef8af8f1 100755 (executable)
@@ -45,10 +45,6 @@ def main():
     os.environ['DISPLAY'] = ':99.0'
     execute(['sh', '-e', '/etc/init.d/xvfb', 'start'])
 
-  # CI's npm is not reliable.
-  npm = 'npm.cmd' if sys.platform == 'win32' else 'npm'
-  execute([npm, 'install', 'npm'])
-
   rm_rf(os.path.join(SOURCE_ROOT, 'out'))
   rm_rf(os.path.join(SOURCE_ROOT, 'node_modules'))
   rm_rf(os.path.join(SOURCE_ROOT, 'frameworks'))
@@ -57,6 +53,10 @@ def main():
   rm_rf(os.path.join(SOURCE_ROOT, 'vendor', 'brightray', 'vendor', 'download',
                      'libchromiumcontent'))
 
+  # CI's npm is not reliable.
+  npm = 'npm.cmd' if sys.platform == 'win32' else 'npm'
+  execute([npm, 'install', 'npm'])
+
   run_script('bootstrap.py', ['--dev', '--target_arch=' + target_arch])
 
   run_script('cpplint.py')