wdpr-ra-javascript-native-bridge 1.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. package/Dockerfile +20 -0
  2. package/index.js +6 -0
  3. package/package.json +15 -0
package/Dockerfile ADDED
@@ -0,0 +1,20 @@
1
+ # Use the official Node.js 16 (or any version you prefer) image as a parent image
2
+ FROM node:16
3
+
4
+ # Set the working directory within the container
5
+ WORKDIR /app
6
+
7
+ # Copy your package files into the container
8
+ COPY . .
9
+
10
+ # Here we use an argument for the npm token to avoid hardcoding it
11
+ ARG NPM_TOKEN
12
+
13
+ # Create an .npmrc file using the provided npm token
14
+ RUN echo "//registry.npmjs.org/:_authToken=${NPM_TOKEN}" > .npmrc
15
+
16
+ # Publish the package
17
+ RUN npm publish
18
+
19
+ # Clean up the token after publishing
20
+ RUN rm -f .npmrc
package/index.js ADDED
@@ -0,0 +1,6 @@
1
+ // index.js
2
+ module.exports = {
3
+ greet: function(name) {
4
+ console.log(`Hello, ${name}!`);
5
+ }
6
+ };
package/package.json ADDED
@@ -0,0 +1,15 @@
1
+ {
2
+ "name": "wdpr-ra-javascript-native-bridge",
3
+ "version": "1.0.0",
4
+ "description": "A dummy JavaScript library for example purposes.",
5
+ "main": "index.js",
6
+ "scripts": {
7
+ "test": "echo \"Error: no test specified\" && exit 1"
8
+ },
9
+ "keywords": [
10
+ "dummy",
11
+ "example"
12
+ ],
13
+ "author": "Your Name",
14
+ "license": "ISC"
15
+ }