Skip to content

Commit d183441

Browse files
committed
fix: return results of the installation in lib mode
1 parent 68964ee commit d183441

16 files changed

+148
-78
lines changed

README.md

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -505,6 +505,37 @@ test_linux_gcc:
505505
- *test
506506
```
507507

508+
### As a Library in Nodejs
509+
510+
```ts
511+
import { setupCpp, success, error } from "setup-cpp"
512+
513+
async function main() {
514+
const { errorMessages, successMessages } = await setupCpp({
515+
compiler: "llvm",
516+
cmake: true,
517+
ninja: true,
518+
vcpkg: true,
519+
})
520+
521+
for (const message of errorMessages) {
522+
error(message)
523+
}
524+
for (const message of successMessages) {
525+
success(message)
526+
}
527+
528+
if (errorMessages.length !== 0) {
529+
process.exit(1)
530+
}
531+
}
532+
533+
main().catch(err => {
534+
console.error(err)
535+
process.exit(1)
536+
})
537+
```
538+
508539
## Articles
509540

510541
[Setup-Cpp on Dev.to](https://dev.to/aminya/setup-cpp-3ia4)

dist/legacy/lib.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/legacy/lib.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/legacy/setup-cpp.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/legacy/setup-cpp.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/modern/actions_python-python.mjs

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

dist/modern/lib.mjs

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

dist/modern/lib.mjs.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/modern/proxy-agent.mjs

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

dist/modern/setup-cpp.mjs

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

0 commit comments

Comments
 (0)