@dry-software/cmake-js 7.3.2 → 7.3.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bin/cmake-js +15 -9
- package/dist/index.cjs +1975 -0
- package/dist/index.cjs.map +1 -0
- package/dist/index.mjs +1940 -0
- package/dist/index.mjs.map +1 -0
- package/package.json +16 -4
- package/lib/appCMakeJSConfig.js +0 -58
- package/lib/buildSystem.js +0 -123
- package/lib/cMake.js +0 -362
- package/lib/cmLog.js +0 -61
- package/lib/dist.js +0 -176
- package/lib/downloader.js +0 -92
- package/lib/environment.js +0 -97
- package/lib/import/LICENSE +0 -24
- package/lib/import/README +0 -6
- package/lib/import/find-visualstudio.js +0 -439
- package/lib/import/util.js +0 -70
- package/lib/index.js +0 -12
- package/lib/locateNAN.js +0 -63
- package/lib/locateNodeApi.js +0 -18
- package/lib/npmConfig.js +0 -31
- package/lib/processHelpers.js +0 -53
- package/lib/runtimePaths.js +0 -95
- package/lib/targetOptions.js +0 -33
- package/lib/toolset.js +0 -224
- /package/{lib → dist}/cpp/win_delay_load_hook.cc +0 -0
- /package/{lib → dist}/import/Find-VisualStudio.cs +0 -0
package/bin/cmake-js
CHANGED
|
@@ -1,13 +1,18 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
'use strict'
|
|
3
2
|
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
3
|
+
import log from 'npmlog'
|
|
4
|
+
import { BuildSystem } from '../lib/index.js'
|
|
5
|
+
import util from 'node:util'
|
|
6
|
+
import { createRequire } from 'node:module'
|
|
7
|
+
import rc from 'rc'
|
|
8
|
+
import yargs from 'yargs'
|
|
9
|
+
import { hideBin } from 'yargs/helpers'
|
|
10
|
+
|
|
11
|
+
const require = createRequire(import.meta.url)
|
|
12
|
+
const version = require('../package.json').version
|
|
8
13
|
const logLevels = ['silly', 'verbose', 'info', 'http', 'warn', 'error']
|
|
9
14
|
|
|
10
|
-
const npmConfigData =
|
|
15
|
+
const npmConfigData = rc('npm')
|
|
11
16
|
for (const [key, value] of Object.entries(npmConfigData)) {
|
|
12
17
|
if (key.startsWith('cmake_js_')) {
|
|
13
18
|
const option = key.substr(9)
|
|
@@ -22,7 +27,7 @@ for (const [key, value] of Object.entries(npmConfigData)) {
|
|
|
22
27
|
}
|
|
23
28
|
}
|
|
24
29
|
|
|
25
|
-
const
|
|
30
|
+
const yargsInstance = yargs(hideBin(process.argv))
|
|
26
31
|
.usage('CMake.js ' + version + '\n\nUsage: $0 [<command>] [options]')
|
|
27
32
|
.version(version)
|
|
28
33
|
.command('install', 'Install Node.js distribution files if needed')
|
|
@@ -173,12 +178,13 @@ const yargs = require('yargs')
|
|
|
173
178
|
type: 'string',
|
|
174
179
|
},
|
|
175
180
|
})
|
|
176
|
-
|
|
181
|
+
|
|
182
|
+
const argv = await yargsInstance.argv
|
|
177
183
|
|
|
178
184
|
// If help, then print and exit:
|
|
179
185
|
|
|
180
186
|
if (argv.h) {
|
|
181
|
-
console.info(
|
|
187
|
+
console.info(await yargsInstance.getHelp())
|
|
182
188
|
process.exit(0)
|
|
183
189
|
}
|
|
184
190
|
|