-
-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit 347b525
Showing
205 changed files
with
34,512 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
# This file is used by the build system to adjust CSS and JS output to support the specified browsers below. | ||
# For additional information regarding the format and rule options, please see: | ||
# https://github.com/browserslist/browserslist#queries | ||
|
||
# For the full list of supported browsers by the Angular framework, please see: | ||
# https://angular.io/guide/browser-support | ||
|
||
# You can see what browsers were selected by your queries by running: | ||
# npx browserslist | ||
|
||
last 1 Chrome version | ||
last 1 Firefox version | ||
last 2 Edge major versions | ||
last 2 Safari major versions | ||
last 2 iOS major versions | ||
Firefox ESR | ||
not IE 11 # Angular supports IE 11 only as an opt-in. To opt-in, remove the 'not' prefix on this line. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
# Editor configuration, see https://editorconfig.org | ||
root = true | ||
|
||
[*] | ||
charset = utf-8 | ||
indent_style = space | ||
indent_size = 2 | ||
insert_final_newline = true | ||
trim_trailing_whitespace = true | ||
|
||
[*.ts] | ||
quote_type = single | ||
|
||
[*.md] | ||
max_line_length = off | ||
trim_trailing_whitespace = false |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
{ | ||
"root": true, | ||
"ignorePatterns": ["projects/**/*"], | ||
"overrides": [ | ||
{ | ||
"files": ["*.ts"], | ||
"parserOptions": { | ||
"project": ["tsconfig.json", "e2e/tsconfig.json"], | ||
"createDefaultProgram": true | ||
}, | ||
"extends": [ | ||
"plugin:@angular-eslint/ng-cli-compat", | ||
"plugin:@angular-eslint/ng-cli-compat--formatting-add-on", | ||
"plugin:@angular-eslint/template/process-inline-templates" | ||
], | ||
"rules": { | ||
"@angular-eslint/component-class-suffix": [ | ||
"error", | ||
{ | ||
"suffixes": ["Page", "Component"] | ||
} | ||
], | ||
"@angular-eslint/component-selector": [ | ||
"error", | ||
{ | ||
"type": "element", | ||
"prefix": "app", | ||
"style": "kebab-case" | ||
} | ||
], | ||
"@angular-eslint/directive-selector": [ | ||
"error", | ||
{ | ||
"type": "attribute", | ||
"prefix": "app", | ||
"style": "camelCase" | ||
} | ||
] | ||
} | ||
}, | ||
{ | ||
"files": ["*.html"], | ||
"extends": ["plugin:@angular-eslint/template/recommended"], | ||
"rules": {} | ||
} | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
{ | ||
"projects": { | ||
"default": "capacitor-nfc-plugin-demo" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
# To get started with Dependabot version updates, you'll need to specify which | ||
# package ecosystems to update and where the package manifests are located. | ||
# Please see the documentation for all configuration options: | ||
# https://help.github.com/github/administering-a-repository/configuration-options-for-dependency-updates | ||
|
||
version: 2 | ||
updates: | ||
- package-ecosystem: "npm" | ||
directory: "/" | ||
schedule: | ||
interval: "monthly" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,162 @@ | ||
name: CI | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
paths-ignore: | ||
- "**.md" | ||
pull_request: | ||
paths-ignore: | ||
- "**.md" | ||
workflow_dispatch: | ||
|
||
env: | ||
NODE_VERSION: 16 | ||
JAVA_VERSION: 11 | ||
|
||
jobs: | ||
build: | ||
name: Build web assets | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
- name: Set up Node.js ${{ env.NODE_VERSION }} | ||
uses: actions/setup-node@v2 | ||
with: | ||
node-version: ${{ env.NODE_VERSION }} | ||
- name: Set npm access token for GitHub registry | ||
run: echo "//npm.pkg.github.com/:_authToken=${{ secrets.NPM_TOKEN }}" >> .npmrc | ||
- name: Install Node.js dependencies | ||
run: npm ci | ||
- name: Build web assets | ||
run: npm run build | ||
- name: Upload artifacts | ||
if: github.ref == 'refs/heads/main' | ||
uses: actions/upload-artifact@v2 | ||
with: | ||
name: www | ||
path: www | ||
android: | ||
if: ${{ false }} | ||
name: Build Android platform | ||
runs-on: ubuntu-latest | ||
needs: [build] | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
- name: Download artifacts | ||
uses: actions/download-artifact@v2 | ||
with: | ||
name: www | ||
path: www | ||
- name: Set up Node.js ${{ env.NODE_VERSION }} | ||
uses: actions/setup-node@v2 | ||
with: | ||
node-version: ${{ env.NODE_VERSION }} | ||
- name: Set npm access token for GitHub registry | ||
run: echo "//npm.pkg.github.com/:_authToken=${{ secrets.NPM_TOKEN }}" >> .npmrc | ||
- name: Install Node.js dependencies | ||
run: npm ci | ||
- name: Set up JDK ${{ env.JAVA_VERSION }} | ||
uses: actions/setup-java@v1 | ||
with: | ||
java-version: ${{ env.JAVA_VERSION }} | ||
- name: Copy web assets to native platform | ||
run: npx ionic capacitor copy android --no-build | ||
- name: Update native platform | ||
run: npx ionic capacitor update android | ||
- name: Build with Gradle | ||
working-directory: android | ||
run: ./gradlew build | ||
ios: | ||
if: ${{ false }} | ||
name: Build iOS platform | ||
runs-on: macos-latest | ||
needs: [build] | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
- name: Download artifacts | ||
uses: actions/download-artifact@v2 | ||
with: | ||
name: www | ||
path: www | ||
- name: Set up Node.js ${{ env.NODE_VERSION }} | ||
uses: actions/setup-node@v2 | ||
with: | ||
node-version: ${{ env.NODE_VERSION }} | ||
- name: Set npm access token for GitHub registry | ||
run: echo "//npm.pkg.github.com/:_authToken=${{ secrets.NPM_TOKEN }}" >> .npmrc | ||
- name: Install Node.js dependencies | ||
run: npm ci | ||
- name: Copy web assets to native platform | ||
run: npx ionic capacitor copy ios --no-build | ||
- name: Update native platform | ||
run: npx ionic capacitor update ios | ||
- name: Build and archive with xcodebuild | ||
working-directory: ios | ||
run: xcodebuild | ||
-workspace App/App.xcworkspace | ||
-scheme App | ||
-archivePath App/build/App.xarchive | ||
clean build archive | ||
CODE_SIGN_IDENTITY="" | ||
CODE_SIGNING_REQUIRED=NO | ||
CODE_SIGNING_ALLOWED="NO" | ||
CODE_SIGN_ENTITLEMENTS="" | ||
lint: | ||
name: Lint | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
- name: Set up Node.js ${{ env.NODE_VERSION }} | ||
uses: actions/setup-node@v2 | ||
with: | ||
node-version: ${{ env.NODE_VERSION }} | ||
- name: Set npm access token for GitHub registry | ||
run: echo "//npm.pkg.github.com/:_authToken=${{ secrets.NPM_TOKEN }}" >> .npmrc | ||
- name: Install Node.js dependencies | ||
run: npm ci | ||
- name: Run ESLint and Prettier | ||
run: npm run lint | ||
test: | ||
if: ${{ false }} | ||
name: Test | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
- name: Set up Node.js ${{ env.NODE_VERSION }} | ||
uses: actions/setup-node@v2 | ||
with: | ||
node-version: ${{ env.NODE_VERSION }} | ||
- name: Install dependencies | ||
run: npm ci | ||
- name: Run unit tests | ||
run: npm run test:ci | ||
deploy: | ||
if: github.ref == 'refs/heads/main' | ||
name: Deploy to server | ||
runs-on: ubuntu-latest | ||
needs: [build, lint] | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
- name: Download artifacts | ||
uses: actions/download-artifact@v2 | ||
with: | ||
name: www | ||
path: www | ||
- name: Copy files to server | ||
uses: appleboy/[email protected] | ||
with: | ||
host: ${{ secrets.DEPLOY_SSH_HOST }} | ||
username: ${{ secrets.DEPLOY_SSH_USERNAME }} | ||
password: ${{ secrets.DEPLOY_SSH_PASSWORD }} | ||
port: ${{ secrets.DEPLOY_SSH_PORT }} | ||
source: www | ||
target: ${{ secrets.DEPLOY_DIR }} | ||
rm: true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
# Specifies intentionally untracked files to ignore when using Git | ||
# http://git-scm.com/docs/gitignore | ||
|
||
*~ | ||
*.sw[mnpcod] | ||
.tmp | ||
*.tmp | ||
*.tmp.* | ||
*.sublime-project | ||
*.sublime-workspace | ||
.DS_Store | ||
Thumbs.db | ||
UserInterfaceState.xcuserstate | ||
$RECYCLE.BIN/ | ||
|
||
*.log | ||
log.txt | ||
npm-debug.log* | ||
|
||
/.angular | ||
/.idea | ||
/.ionic | ||
/.sass-cache | ||
/.sourcemaps | ||
/.versions | ||
/.vscode | ||
/coverage | ||
/dist | ||
/node_modules | ||
/platforms | ||
/plugins | ||
/www | ||
|
||
# Firebase | ||
.firebase |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
@capawesome-team:registry=https://npm.pkg.github.com | ||
save-exact=true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
{ | ||
"arrowParens": "avoid", | ||
"bracketSpacing": true, | ||
"quoteProps": "as-needed", | ||
"semi": true, | ||
"trailingComma": "all", | ||
"overrides": [ | ||
{ | ||
"files": "*.json", | ||
"options": { | ||
"printWidth": 1 | ||
} | ||
} | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
# capacitor-nfc-demo | ||
|
||
## Development 💻 | ||
|
||
### Prerequisites | ||
|
||
- Install [Node.js](https://nodejs.org) which includes [Node Package Manager](https://www.npmjs.com/get-npm) | ||
- Android development: Install [Android Studio](https://developer.android.com/studio) | ||
- iOS development: Install [XCode](https://apps.apple.com/de/app/xcode/id497799835?mt=12) | ||
|
||
### Getting Started | ||
|
||
```bash | ||
# Clone this repository | ||
$ git clone https://github.com/pkglab/capacitor-nfc-demo.git | ||
|
||
# Change to the root directory of the project | ||
$ cd capacitor-nfc-demo | ||
|
||
# Install all dependencies | ||
$ npm i | ||
|
||
# Run the web app | ||
$ npm run start | ||
|
||
# Run the Android app | ||
$ npx ionic cap sync android | ||
$ npx ionic cap run android | ||
|
||
# Run the iOS app | ||
$ npx ionic cap sync ios | ||
$ npx ionic cap run ios | ||
``` | ||
|
||
This project uses [Ionic](https://ionicframework.com/) as app development platform and the [Ionic CLI](https://ionicframework.com/docs/cli). | ||
|
||
### Commands | ||
|
||
- `npm run start` - Start the app | ||
- `npm run build` - Build the app | ||
- `npm run lint` - Lint the project | ||
- `npm run fmt` - Format the project | ||
- `npm run test` - Run unit tests | ||
|
||
### Folder Structure | ||
|
||
``` | ||
. | ||
└── root | ||
└── src | ||
├── app | ||
│ ├── config - Configuration files with consistent configurations across all environments | ||
│ ├── core - The core module that includes singleton services and other features with only one instance per application | ||
│ ├── modules - Modules that deliver a user experience dedicated to a particular feature or application domain | ||
│ └── shared - Modules that make a component, directive, or pipe available to external modules. | ||
├── assets | ||
├── environments | ||
└── tests | ||
``` |
Oops, something went wrong.