-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
feat(jins-meme): add support for jins meme smart glasses #1212
Conversation
(no-unused-variable) @ionic-native/plugins/jins-meme/index.ts[1, 10]: Unused import: 'Injectable' stream.js:74 throw er; // Unhandled stream error in pipe. ^ Error: Failed to lint: @ionic-native/plugins/jins-meme/index.ts [1, 10]: Unused import: 'Injectable'.
as per #1210
Jins meme
Feature jins meme
Revert "Feature jins meme"
merge joshbabb/ionic-native into blyncsync/ionic-native
Please squash this into one commit with message:
If/when merging :) |
* ``` | ||
* import { JinsMeme } from 'ionic-native'; | ||
* | ||
* JinsMeme.functionName('Hello', 123) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please replace this usage block with actual usage example.
Also, I notice you're using the old template from Ionic Native 2.x.
Usage should look like:
import { JinsMeme } from '@ionic-native/jins-meme';
constructor(private jinsMeme: JinsMeme) { }
...
this.jinsMeme.functionName()
.then(...)
.catch(...);
See how other plugins are documented.
* | ||
* @usage | ||
* ``` | ||
* import { JinsMeme } from 'ionic-native'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Package name should be @ionic-native/jins-meme
declare var cordova: any; | ||
|
||
/** | ||
* @name JinsMeme |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Name should be Jins Meme
with a space between the two words
plugin: 'JinsMemeSDK-Plugin-Cordova', // npm package name, example: cordova-plugin-camera | ||
pluginRef: 'cordova.plugins.JinsMemePlugin', // the variable reference to call the plugin, example: navigator.geolocation | ||
repo: 'https://github.com/jins-meme/JinsMemeSDK-Plugin-Cordova.git', // the github repository URL for the plugin | ||
install: '' // OPTIONAL install command, in case the plugin requires variables |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remove this line since there is no custom install command needed
*/ | ||
@Plugin({ | ||
pluginName: 'JinsMeme', | ||
plugin: 'JinsMemeSDK-Plugin-Cordova', // npm package name, example: cordova-plugin-camera |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remove the documentation beside this line, and the following 3 lines.
@Cordova() | ||
static disconnect(): Promise<any> { return; } | ||
|
||
/** |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remove white-space before this comment block, apply to other occurrences as well.
*@returns {Promise<any>} | ||
*/ | ||
@Cordova() | ||
static setAppClientID(appClientId: string, clientSecret: string): Promise<any> { return; } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
All methods should not be static. Please remove the static
keyword from all methods below.
DEVELOPER.md
Outdated
@@ -110,7 +110,7 @@ The `@Cordova` decorator has a few more options now. | |||
|
|||
### Testing your changes | |||
|
|||
You need to run `npm run build` in the `ionic-native` project, this will create a `dist` directory. Then, you must go to your ionic application folder and replace your current `node_modules/ionic-native/dist/` with the newly generated one. | |||
You need to run `npm run build` in the `ionic-native` project, this will create a `dist/packages-dist` directory. Then, you must go to your ionic application folder and replace your current `node_modules/@ionic-native/` with the newly generated `dist/packages-dist/@ionic-native/` folder. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I prefer if this commit is removed from the PR.
Ideally a PR should be to modify/add one thing.
* @param {string} target | ||
*/ | ||
// @Cordova({observable: true}) | ||
static connect(target: string): Observable<any> { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add the following decorator for this method:
@CordovaCheck({
observable: true
})
This will ensure that the plugin is installed and available before attempting to run your custom code. CordovaCheck
should be imported from @ionic-native/core
*/ | ||
// @Cordova({observable: true}) | ||
static connect(target: string): Observable<any> { | ||
return new Observable<any> ((observer: any) => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remove white-space between <any>
and ((observer...
Thanks for submitting a PR. Please review the changes requested. Also, please run |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As of BlyncSync@e86b462 I have made all of these changes!
https://jins-meme.com/en/
https://jins-meme.github.io/sdkdoc/en/