nn-widgets 0.1.0

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.
@@ -0,0 +1 @@
1
+ {"root":["./src/index.ts","./src/types.ts","./src/withandroidwidget.ts","./src/withioswidget.ts"],"version":"5.9.3"}
package/publish.sh ADDED
@@ -0,0 +1,59 @@
1
+ #!/bin/bash
2
+
3
+ # Exit on error
4
+ set -e
5
+
6
+ echo "🔨 Step 1: Building the project..."
7
+ # Set CI=true to prevent watch mode
8
+ CI=true npm run build
9
+
10
+ if [ $? -eq 0 ]; then
11
+ echo "✅ Build completed successfully"
12
+ else
13
+ echo "❌ Build failed"
14
+ exit 1
15
+ fi
16
+
17
+ echo ""
18
+ echo "📦 Step 2: Incrementing version..."
19
+
20
+ # Get current version
21
+ CURRENT_VERSION=$(node -p "require('./package.json').version")
22
+ echo "Current version: $CURRENT_VERSION"
23
+
24
+ # Increment patch version
25
+ NEW_VERSION=$(node -e "
26
+ const v = '$CURRENT_VERSION'.split('.');
27
+ v[2] = parseInt(v[2]) + 1;
28
+ console.log(v.join('.'));
29
+ ")
30
+ echo "New version: $NEW_VERSION"
31
+
32
+ # Update package.json with new version
33
+ node -e "
34
+ const fs = require('fs');
35
+ const pkg = require('./package.json');
36
+ pkg.version = '$NEW_VERSION';
37
+ fs.writeFileSync('./package.json', JSON.stringify(pkg, null, 2) + '\n');
38
+ "
39
+
40
+ echo "✅ Version updated to $NEW_VERSION"
41
+
42
+ echo ""
43
+ echo "🚀 Step 3: Publishing to npm..."
44
+
45
+ # Publish to npm
46
+ npm publish
47
+
48
+ if [ $? -eq 0 ]; then
49
+ echo ""
50
+ echo "✅ Successfully published nn-widgets@$NEW_VERSION to npm!"
51
+ echo ""
52
+ echo "📝 Don't forget to:"
53
+ echo " 1. Commit the version bump"
54
+ echo " 2. Create a git tag: git tag v$NEW_VERSION"
55
+ echo " 3. Push: git push && git push --tags"
56
+ else
57
+ echo "❌ Failed to publish to npm"
58
+ exit 1
59
+ fi