Skip to content

Commit

Permalink
fix(initializer): fix setting Electron version in.compilerc when it's…
Browse files Browse the repository at this point in the history
… x.0 (#506)

* fix(initializer): fix setting Electron version in.compilerc when it's x.0

* Travis: drop the cache to see if it fixes CI
  • Loading branch information
malept authored and MarshallOfSound committed May 6, 2018
1 parent 049055c commit e26de71
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
3 changes: 0 additions & 3 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,6 @@ os:
dist: trusty
osx_image: xcode8.3
sudo: required
cache:
directories:
- node_modules
services:
- docker
env:
Expand Down
3 changes: 2 additions & 1 deletion src/init/init-npm.js
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,8 @@ export default async (dir, lintStyle) => {
const envTarget = content.env[profile]['application/javascript'].presets.find(x => x[0] === 'env');
// parseFloat strips the patch version
// parseFloat('1.3.2') === 1.3
envTarget[1].targets.electron = parseFloat(electronPrebuilt.version).toString();
// Note: This won't work if the minor version ever gets higher than 9
envTarget[1].targets.electron = parseFloat(electronPrebuilt.version).toFixed(1).toString();
}

await fs.writeJson(path.join(dir, '.compilerc'), content, { spaces: 2 });
Expand Down

0 comments on commit e26de71

Please sign in to comment.