Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fork npm #480

Closed
wants to merge 4 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 17 additions & 0 deletions .github/workflows/publish-npm.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
name: Publish NPM
on:
release:
types: [created]
jobs:
publish-npm:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 18
registry-url: https://registry.npmjs.org/
- run: npm ci
- run: npm publish --access public
env:
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}
4 changes: 4 additions & 0 deletions .npmignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
.*
tests
*.iml
*.tgz
7 changes: 7 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
### Publication-only version of the [chariotsolutions/phonegap-nfc](https://github.com/chariotsolutions/phonegap-nfc) package with some early fixes. [![Latest Published Version](https://img.shields.io/npm/v/cordova-plugin-ns0m-nfc)](https://www.npmjs.com/package/cordova-plugin-ns0m-nfc)
```
cordova plugin add [email protected]
```

---

PhoneGap NFC Plugin
==========================

Expand Down
5 changes: 5 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

16 changes: 5 additions & 11 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
{
"name": "phonegap-nfc",
"name": "cordova-plugin-ns0m-nfc",
"version": "1.2.0",
"description": "Near Field Communication (NFC) Plugin. Read and write NDEF messages to NFC tags and share NDEF messages with peers.",
"cordova": {
"id": "phonegap-nfc",
"id": "cordova-plugin-ns0m-nfc",
"platforms": [
"android",
"wp8",
Expand All @@ -12,10 +12,8 @@
"ios"
]
},
"repository": {
"type": "git",
"url": "git+https://github.com/chariotsolutions/phonegap-nfc.git"
},
"repository": "github:ns0m/cordova-plugin-ns0m-nfc",
"bugs": "https://github.com/ns0m/cordova-plugin-ns0m-nfc/issues",
"keywords": [
"nfc",
"ndef",
Expand All @@ -28,9 +26,5 @@
"cordova-ios"
],
"author": "Don Coleman <[email protected]>",
"license": "MIT",
"bugs": {
"url": "https://github.com/chariotsolutions/phonegap-nfc/issues"
},
"homepage": "https://github.com/chariotsolutions/phonegap-nfc#readme"
"license": "MIT"
}
59 changes: 20 additions & 39 deletions plugin.xml
Original file line number Diff line number Diff line change
@@ -1,51 +1,45 @@
<?xml version="1.0" encoding="utf-8"?>
<plugin
xmlns="http://www.phonegap.com/ns/plugins/1.0"
xmlns:android="http://schemas.android.com/apk/res/android"
id="phonegap-nfc"
version="1.2.0">
<plugin xmlns="http://apache.org/cordova/ns/plugins/1.0"
xmlns:android="http://schemas.android.com/apk/res/android"
id="cordova-plugin-ns0m-nfc"
version="1.2.0">

<name>NFC</name>

<description>Near Field Communication (NFC) Plugin. Read and write NDEF messages to NFC tags and share NDEF messages with peers.</description>

<license>MIT</license>
<keywords>nfc, NFC, NDEF</keywords>
<repo>https://github.com/chariotsolutions/phonegap-nfc.git</repo>
<issue>https://github.com/chariotsolutions/phonegap-nfc/issues</issue>
<repo>https://github.com/ns0m/cordova-plugin-ns0m-nfc</repo>
<issue>https://github.com/ns0m/cordova-plugin-ns0m-nfc/issues</issue>

<platform name="android">
<js-module src="www/phonegap-nfc.js" name="NFC">
<runs />
</js-module>
<js-module src="www/phonegap-nfc.js" name="NFC">
<runs />
</js-module>

<platform name="android">
<config-file target="res/xml/config.xml" parent="/*">
<feature name="NfcPlugin">
<param name="android-package" value="com.chariotsolutions.nfc.plugin.NfcPlugin"/>
<param name="android-package" value="com.chariotsolutions.nfc.plugin.NfcPlugin" />
<param name="onload" value="true" />
</feature>
</config-file>

<source-file src="src/android/src/com/chariotsolutions/nfc/plugin/NfcPlugin.java"
target-dir="src/com/chariotsolutions/nfc/plugin"/>
target-dir="src/com/chariotsolutions/nfc/plugin" />
<source-file src="src/android/src/com/chariotsolutions/nfc/plugin/Util.java"
target-dir="src/com/chariotsolutions/nfc/plugin"/>
target-dir="src/com/chariotsolutions/nfc/plugin" />

<config-file target="AndroidManifest.xml" parent="/manifest">
<uses-permission android:name="android.permission.NFC"/>
<uses-feature android:name="android.hardware.nfc" android:required="false"/>
<uses-permission android:name="android.permission.NFC" />
<uses-feature android:name="android.hardware.nfc" android:required="false" />
</config-file>

</platform>

<platform name="wp8">
<js-module src="www/phonegap-nfc.js" name="NFC">
<runs />
</js-module>

<config-file target="config.xml" parent="/*">
<feature name="NfcPlugin">
<param name="wp-package" value="NfcPlugin"/>
<param name="wp-package" value="NfcPlugin" />
</feature>
</config-file>

Expand All @@ -55,18 +49,13 @@

<source-file src="src/windows-phone-8/Ndef.cs" />
<source-file src="src/windows-phone-8/NfcPlugin.cs" />

</platform>

<!-- windows -->
<platform name="windows">
<js-module src="www/phonegap-nfc.js" name="NFC">
<runs />
</js-module>

<config-file target="config.xml" parent="/*">
<feature name="NfcPlugin">
<param name="wp-package" value="NfcPlugin"/>
<param name="wp-package" value="NfcPlugin" />
</feature>
</config-file>

Expand All @@ -89,9 +78,6 @@
</platform>

<platform name="blackberry10">
<js-module src="www/phonegap-nfc.js" name="NFC">
<runs />
</js-module>
<!-- override defaults for BB10 -->
<js-module src="www/phonegap-nfc-blackberry.js" name="NFCBB10">
<runs />
Expand All @@ -107,10 +93,6 @@
</platform>

<platform name="ios">
<js-module src="www/phonegap-nfc.js" name="NFC">
<runs />
</js-module>

<config-file parent="/*" target="config.xml">
<feature name="NfcPlugin">
<param name="ios-package" value="NfcPlugin" />
Expand All @@ -121,16 +103,16 @@
<config-file parent="com.apple.developer.nfc.readersession.formats" platform="ios" target="*-Debug.plist">
<array>
<string>NDEF</string>
<string>TAG</string>
<string>TAG</string>
</array>
</config-file>
<config-file parent="com.apple.developer.nfc.readersession.formats" platform="ios" target="*-Release.plist">
<array>
<string>NDEF</string>
<string>TAG</string>
<string>TAG</string>
</array>
</config-file>

<header-file src="src/ios/NfcPlugin.h" />
<source-file src="src/ios/NfcPlugin.m" />

Expand All @@ -143,5 +125,4 @@
</config-file>
</platform>


</plugin>