1.0.2 • Published 9 months ago

@cpp.js/plugin-metro v1.0.2

Weekly downloads
-
License
MIT
Repository
github
Last release
9 months ago

@cpp.js/plugin-metro

Cpp.js Metro plugin
A tool for seamless C++ integration with the Metro bundler.

Integration

To integrate cpp.js into your project using Metro as a bundler, you can utilize the @cpp.js/plugin-metro plugin. Start by installing these package with the following command:

NPM

npm install @cpp.js/plugin-metro --save-dev

or YARN

yarn add @cpp.js/plugin-metro --dev

or PNPM

pnpm add @cpp.js/plugin-metro --save-dev

or BUN

bun add @cpp.js/plugin-metro --dev

To enable the plugin, modify the metro.config.js file as shown below.

React Native

const {getDefaultConfig, mergeConfig} = require('@react-native/metro-config');
+const CppjsMetroPlugin = require('@cpp.js/plugin-metro');

/**
 * Metro configuration
 * https://reactnative.dev/docs/metro
 *
 * @type {import('metro-config').MetroConfig}
 */
-const config = {};
+const config = {
+    ...CppjsMetroPlugin(getDefaultConfig(__dirname)),
+};

module.exports = mergeConfig(getDefaultConfig(__dirname), config);

Expo

// Learn more https://docs.expo.io/guides/customizing-metro
const { getDefaultConfig } = require('expo/metro-config');
+const { mergeConfig } = require('metro-config');
+const CppjsMetroPlugin = require('@cpp.js/plugin-metro');

/** @type {import('expo/metro-config').MetroConfig} */
const config = getDefaultConfig(__dirname);

+const newConfig = {
+    ...CppjsMetroPlugin(config),
+};

-module.exports = config;
+module.exports = mergeConfig(config, newConfig);
1.0.2

9 months ago

1.0.1

9 months ago

1.0.0

9 months ago

1.0.0-beta.22

11 months ago

1.0.0-beta.23

11 months ago

1.0.0-beta.20

11 months ago

1.0.0-beta.21

11 months ago

1.0.0-beta.28

11 months ago

1.0.0-beta.29

11 months ago

1.0.0-beta.26

11 months ago

1.0.0-beta.27

11 months ago

1.0.0-beta.24

11 months ago

1.0.0-beta.25

11 months ago

1.0.0-beta.33

10 months ago

1.0.0-beta.34

10 months ago

1.0.0-beta.31

10 months ago

1.0.0-beta.32

10 months ago

1.0.0-beta.30

10 months ago

1.0.0-beta.37

10 months ago

1.0.0-beta.38

9 months ago

1.0.0-beta.35

10 months ago

1.0.0-beta.36

10 months ago

1.0.0-beta.4

12 months ago

1.0.0-beta.3

12 months ago

1.0.0-beta.2

12 months ago

1.0.0-beta.1

12 months ago