-
-
Notifications
You must be signed in to change notification settings - Fork 22
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #474 from malept/add-arm-support
Add Linux ARMv7 support
- Loading branch information
Showing
11 changed files
with
112 additions
and
100 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
'use strict' | ||
|
||
const common = require('./common') | ||
|
||
module.exports = { | ||
supportedArchs: common.archs.reduce((result, arch) => { | ||
result[arch] = true | ||
return result | ||
}, {}), | ||
// Maps to module filename for each platform (lazy-required if used) | ||
supportedPlatforms: { | ||
darwin: './mac', | ||
linux: './linux', | ||
mas: './mac', // map to darwin | ||
win32: './win32' | ||
}, | ||
|
||
// Validates list of architectures or platforms. | ||
// Returns a normalized array if successful, or throws an Error. | ||
validateListFromOptions: function validateListFromOptions (opts, supported, name) { | ||
if (opts.all) return Object.keys(supported) | ||
|
||
let list = opts[name] || process[name] | ||
if (list === 'all') return Object.keys(supported) | ||
|
||
if (!Array.isArray(list)) list = list.split(',') | ||
for (let value of list) { | ||
if (!supported[value]) { | ||
return new Error(`Unsupported ${name}=${value}; must be one of: ${Object.keys(supported).join(', ')}`) | ||
} | ||
} | ||
|
||
return list | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.