diff --git a/.gitignore b/.gitignore
index 026cd9c..72d574a 100644
--- a/.gitignore
+++ b/.gitignore
@@ -4,18 +4,19 @@
*.js
*.js.map
*.log
+src/*.d.ts
+!src/index.d.ts
+!src/references.d.ts
!src/scripts/*.js
!seed-tests/*.js
seed-tests/seed-copy/**/*.*
seed-tests/seed-copy-new-git-repo/**/*.*
-demo/app/*.js
!demo/karma.conf.js
!demo/app/tests/*.js
demo/*.d.ts
!demo/references.d.ts
demo/lib
demo/platforms
-demo/node_modules
node_modules
publish/src
-publish/package
\ No newline at end of file
+publish/package
diff --git a/README.md b/README.md
index f8047bb..5c54370 100644
--- a/README.md
+++ b/README.md
@@ -1,6 +1,6 @@
# Develop a NativeScript plugin [](https://travis-ci.org/NativeScript/nativescript-plugin-seed)
-> This repo is heavily based on [@NathanWalker](https://github.com/NathanWalker)'s [Plugin Seed](https://github.com/NathanWalker/nativescript-plugin-seed). Thanks Nathan!
+> This repo is heavily based on [@NathanWalker](https://github.com/NathanWalker)'s [Plugin Seed](https://github.com/NathanWalker/nativescript-plugin-seed). Thanks, Nathan!
* [TL;DR](#TLDR)
@@ -28,7 +28,7 @@ The NativeScript plugin seed is built to be used as a starting point by NativeSc
2. `cd nativescript-yourplugin/src`
3. `npm run postclone`
4. `npm run demo.ios` or `npm run demo.android` to run the demo.
-5. In another command prompt/terminal `npm run plugin.tscwatch` to watch to typescript changes in the plugin and to autmatically apply them in the demo.
+5. In another command prompt/terminal `npm run plugin.tscwatch` to watch typescript changes in the plugin and to automatically apply them in the demo.
## Long Description
@@ -69,7 +69,7 @@ What does the seed give you out of the box?
* configure your plugin name - all files and classes in the seed will be renamed for you
* stub your plugin README.md file
* create a new repository for your plugin
- * npm link your plugin the demo app - this will install the plugin dependencies and will add a sym link to the plugin code in the demo project allowing you to do changes and review them in the demo without adding/removing the plugin every time you make a change. [Read more about npm link](https://docs.npmjs.com/cli/link). If you encounter an "EACCES" permission denied error, please fix you global npm permissions, which is perfectly explained [here](https://docs.npmjs.com/getting-started/fixing-npm-permissions).
+ * npm link your plugin the demo app - this will install the plugin dependencies and will add a symbolic link to the plugin code in the demo project allowing you to do changes and review them in the demo without adding/removing the plugin every time you make a change. [Read more about npm link](https://docs.npmjs.com/cli/link). If you encounter an "EACCES" permission denied error, please fix you global npm permissions, which is perfectly explained [here](https://docs.npmjs.com/getting-started/fixing-npm-permissions).
Now you can continue with the development of your plugin by using the [Development setup](#Developmentsetup) described below.
@@ -81,7 +81,7 @@ For easier development and debugging purposes continue with the following steps:
Now go and make a change to your plugin. It will be automatically applied to the demo project.
-NOTE: If you need to use a native library in your plugin or do some changes in Info.plist/AndroidManifest.xml, these cannot be applied to the demo project only by npm link. In such scenario you need to use `tns plugin add ../src` from the `demo` so that the native libraries and changes in the above mentioned files are applied in the demo. Then you can link again the code of your plugin in the demo by using `npm run plugin.link` from the `src`.
+NOTE: If you need to use a native library in your plugin or do some changes in Info.plist/AndroidManifest.xml, these cannot be applied to the demo project only by npm link. In such scenario, you need to use `tns plugin add ../src` from the `demo` so that the native libraries and changes in the above-mentioned files are applied in the demo. Then you can link again the code of your plugin in the demo by using `npm run plugin.link` from the `src`.
### Linking to CocoaPod or Android Arsenal plugins
@@ -116,7 +116,6 @@ Sometimes you may need to ensure plugin files are updated in the demo:
* Run `npm run plugin.prepare` will do a fresh build of the plugin then remove itself from the demo and add it back for assurance.
-
### Unittesting
The plugin seed automatically adds Jasmine-based unittest support to your plugin.
Open `demo/app/tests/tests.js` and adjust its contents so the tests become meaningful in the context of your plugin and its features.
@@ -143,7 +142,7 @@ If you just want to create a package, go to `publish` folder and execute `pack.s
### TravisCI
-The plugin structure comes with fully functional .travis.yml file that deploys the testing app on Android emulator and iOS simulator and as a subsequent step runs the tests from [UnitTesting section](#Unittesting). All you have to do, after cloning the repo and implementing your plugin and tests, is to sign up at [https://travis-ci.org/](https://travis-ci.org/). Then enable your plugin's repo on "https://travis-ci.org/profile/" and that's it. Next time a PR is opened or change is commited to a branch TravisCI will trigger a build testing the code.
+The plugin structure comes with a fully functional .travis.yml file that deploys the testing app on Android emulator and iOS simulator and as a subsequent step runs the tests from [UnitTesting section](#Unittesting). All you have to do, after cloning the repo and implementing your plugin and tests, is to sign up at [https://travis-ci.org/](https://travis-ci.org/). Then enable your plugin's repo on "https://travis-ci.org/profile/" and that's it. Next time a PR is opened or change is committed to a branch TravisCI will trigger a build testing the code.
To properly show current build status you will have to edit the badge at the start of the README.md file so it matches your repo, user and branch.
@@ -178,4 +177,3 @@ import * as app from 'application';
````
import * as app from 'tns-core-modules/application';
````
-
diff --git a/demo/app/main-page.ts b/demo/app/main-page.ts
index 1bca237..8ef1850 100644
--- a/demo/app/main-page.ts
+++ b/demo/app/main-page.ts
@@ -7,4 +7,4 @@ export function pageLoaded(args: observable.EventData) {
// Get the event sender
let page = args.object;
page.bindingContext = new HelloWorldModel();
-}
\ No newline at end of file
+}
diff --git a/demo/app/main-view-model.ts b/demo/app/main-view-model.ts
index cc9f297..b319e82 100644
--- a/demo/app/main-view-model.ts
+++ b/demo/app/main-view-model.ts
@@ -11,4 +11,4 @@ export class HelloWorldModel extends Observable {
this.yourPlugin = new YourPlugin();
this.message = this.yourPlugin.message;
}
-}
\ No newline at end of file
+}
diff --git a/demo/karma.conf.js b/demo/karma.conf.js
index 91d9c28..5d2286a 100644
--- a/demo/karma.conf.js
+++ b/demo/karma.conf.js
@@ -12,7 +12,7 @@ module.exports = function(config) {
// list of files / patterns to load in the browser
files: [
- 'app/**/*.js',
+ 'app/**/*.js'
],
diff --git a/demo/package.json b/demo/package.json
index 42f2c72..27ff070 100644
--- a/demo/package.json
+++ b/demo/package.json
@@ -25,6 +25,7 @@
"karma-nativescript-launcher": "^0.4.0",
"lazy": "1.0.11",
"nativescript-dev-typescript": "libs",
+ "tns-platform-declarations": "^3.1.0",
"typescript": "~2.3.0"
}
}
diff --git a/demo/references.d.ts b/demo/references.d.ts
new file mode 100644
index 0000000..1e5e961
--- /dev/null
+++ b/demo/references.d.ts
@@ -0,0 +1,2 @@
+///
+///
diff --git a/demo/tsconfig.json b/demo/tsconfig.json
index ed6d540..c9560fb 100644
--- a/demo/tsconfig.json
+++ b/demo/tsconfig.json
@@ -32,4 +32,4 @@
"platforms"
],
"compileOnSave": false
-}
\ No newline at end of file
+}
diff --git a/src/package.json b/src/package.json
index c779a61..531dcf7 100644
--- a/src/package.json
+++ b/src/package.json
@@ -20,9 +20,9 @@
"plugin.tscwatch": "npm run tsc -- -w",
"demo.ios": "npm i && npm run tsc && cd ../demo && tns run ios --syncAllFiles",
"demo.android": "npm i && npm run tsc && cd ../demo && tns run android --syncAllFiles",
- "demo.reset": "cd ../demo && rm -rf platforms && cd ../src",
- "plugin.prepare": "npm run tsc && cd ../demo && tns plugin remove nativescript-yourplugin && tns plugin add ../src && cd ../src",
- "clean": "rm -rf node_modules && cd ../demo && rm -rf hooks node_modules platforms && cd ../src && npm run plugin.link"
+ "demo.reset": "cd ../demo && rm -rf platforms",
+ "plugin.prepare": "npm run tsc && cd ../demo && tns plugin remove nativescript-yourplugin && tns plugin add ../src",
+ "clean": "rimraf node_modules && cd ../demo && rimraf hooks node_modules platforms && cd ../src && npm run plugin.link"
},
"keywords": [
"NativeScript",
@@ -53,4 +53,4 @@
},
"dependencies": {},
"bootstrapper": "nativescript-plugin-seed"
-}
\ No newline at end of file
+}
diff --git a/src/tsconfig.json b/src/tsconfig.json
index 0e5c6fc..2c33e90 100644
--- a/src/tsconfig.json
+++ b/src/tsconfig.json
@@ -23,4 +23,4 @@
"node_modules"
],
"compileOnSave": false
-}
\ No newline at end of file
+}