JSPM

  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 1
  • Score
    100M100P100Q33105F
  • License MIT

Cpp.js sample library: simple cmake library

Package Exports

  • @cpp.js/sample-lib-cmake/cppjs.config.js

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (@cpp.js/sample-lib-cmake) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

@cpp.js/sample-lib-cmake

Cpp.js sample library: simple cmake library

NPM version License

Integration

Start by installing these package with the following command:

npm install @cpp.js/sample-lib-cmake

To enable the library, modify the cppjs.config.js file as shown below.

+import cmakeSample from '@cpp.js/sample-lib-cmake/cppjs.config.js';

export default {
    dependencies: [
+        cmakeSample
    ]
    paths: {
        config: import.meta.url,
    },
};

Usage

Below are the steps to use the library in your C++ or JavaScript code.

Usage in C++ Code

+#include <cppjs-lib-samplebasic-cmake/samplebasiccmake.h>

std::string Native::sample() {
+    return SampleBasicCmake::sample();
}

Usage in JavaScript Code (web, with plugin)

import { initCppJs, SampleBasicCmake } from '@cpp.js/sample-lib-cmake/cppjs-lib-samplebasic-cmake/samplebasiccmake.h';

await initCppJs();
console.log(SampleBasicCmake.sample());