From c76e1aa880cdeb0433fb59e53d49cf06cad9d3a4 Mon Sep 17 00:00:00 2001 From: Brad Martin Date: Mon, 23 Apr 2018 12:11:44 -0500 Subject: [PATCH] clean up --- .gitignore | 2 +- .prettierrc | 8 ++++---- .vscode/settings.json | 9 +++++++++ CONTRIBUTING.md | 29 ----------------------------- README.md | 18 +++++------------- demo/app/main-page.xml | 19 +++++++++---------- demo/package.json | 2 +- src/.npmignore | 13 ++++++++++++- src/cardview-common.ts | 29 ++++++++++------------------- src/cardview.android.ts | 6 +++--- src/cardview.ios.ts | 10 +++++----- src/index.d.ts | 2 +- src/package.json | 18 ++++++++---------- src/scripts/build-native.js | 24 ++++++++++++++++++++++++ src/tsconfig.json | 2 +- 15 files changed, 93 insertions(+), 98 deletions(-) create mode 100644 .vscode/settings.json delete mode 100644 CONTRIBUTING.md create mode 100644 src/scripts/build-native.js diff --git a/.gitignore b/.gitignore index b18baaf..4897ff6 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,5 @@ *.js +!src/scripts/*.js *.js.map *.log *.d.ts @@ -10,6 +11,5 @@ demo/platforms demo/node_modules demo/.vscode node_modules -.vscode/ *.DS_Store package-lock.json \ No newline at end of file diff --git a/.prettierrc b/.prettierrc index d4df647..2cee17d 100644 --- a/.prettierrc +++ b/.prettierrc @@ -1,5 +1,5 @@ { - "singleQuote": true, - "semi": true, - "printWidth": 120 -} \ No newline at end of file + "singleQuote": true, + "semi": true, + "printWidth": 120 +} diff --git a/.vscode/settings.json b/.vscode/settings.json new file mode 100644 index 0000000..1a4522d --- /dev/null +++ b/.vscode/settings.json @@ -0,0 +1,9 @@ +{ + "files.watcherExclude": { + "**/.git/objects/**": true, + "**/.git/subtree-cache/**": true, + "**/platforms/**": true, + "**/hooks/**": true, + "**/node_modules/**": true + } +} \ No newline at end of file diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md deleted file mode 100644 index eb3c858..0000000 --- a/CONTRIBUTING.md +++ /dev/null @@ -1,29 +0,0 @@ -## Developing - -### Setup - -``` -npm install typescript -g -npm install -npm run build // you will see TypeScript warnings; you can ignore them -cd demo -npm install -tns platform add android -tns platform add ios - -tns run android -// or... -tns run ios -``` - -## Submitting Pull Requests - -**Please follow these basic steps to simplify pull request reviews - if you don't you'll probably just be asked to anyway.** - -* Please rebase your branch against the current master -* Make reference to possible [issues](https://github.com/bradmartin/nativescript-cardview/issues) on PR comment - -## Submitting bug reports - -* Please detail the affected platform and version -* Please be sure to state which version of node, npm, and NativeScript you're using \ No newline at end of file diff --git a/README.md b/README.md index 44ba102..6255812 100644 --- a/README.md +++ b/README.md @@ -55,6 +55,8 @@ Be sure to run a new build after adding plugins to avoid any issues. Here is a p ### Usage +_iOS note: Setting a background-color will help if you do not see the card on the page._ + ## Plain NativeScript IMPORTANT: _Make sure you include `xmlns:Card="nativescript-cardview"` on the Page element_ @@ -85,12 +87,12 @@ Be sure to run a new build after adding plugins to avoid any issues. Here is a p } ``` -## Angular NativeScript +## NativeScript + Angular -```TS +```typescript import { registerElement } from 'nativescript-angular/element-registry'; import { CardView } from 'nativescript-cardview'; -registerElement("CardView", () => CardView); +registerElement('CardView', () => CardView); ``` ```html @@ -168,10 +170,6 @@ shadowRadius = 1; | --------------------------------------- | --------------------------------------- | | ![Sample1](images/sample_card1_ios.png) | ![Sample2](images/sample_card3_ios.png) | -#### Contributing - -[Please follow here](https://github.com/bradmartin/nativescript-cardview/blob/master/CONTRIBUTING.md) - #### Contributors | [bradmartin](https://github.com/bradmartin) | [NathanWalker](https://github.com/NathanWalker) | [manijak](https://github.com/manijak) | [NathanaelA](https://github.com/NathanaelA) | [EddyVerbruggen](https://github.com/EddyVerbruggen) | [sis0k0](https://github.com/sis0k0) | @@ -181,9 +179,3 @@ shadowRadius = 1; | [vladimirnani](https://github.com/vladimirnani) | [DickSmith](https://github.com/DickSmith) | | :--------------------------------------------------------------------------------------------------------------------------------------: | :--------------------------------------------------------------------------------------------------------------------------------: | | [vladimirnani](https://github.com/vladimirnani) | [DickSmith](https://github.com/DickSmith) | - -## [nStudio, LLC](http://nstudio.io) - -[![nStudio](./images/nstudio-banner.png 'nStudio')](http://nStudio.io) - -Do you need assistance on your project or plugin? Contact the nStudio team anytime at to get up to speed with the best practices in mobile and web app development. diff --git a/demo/app/main-page.xml b/demo/app/main-page.xml index 170209e..725d8fa 100644 --- a/demo/app/main-page.xml +++ b/demo/app/main-page.xml @@ -1,16 +1,15 @@ - - + - - - -