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

feat(jins-meme): add support for jins meme smart glasses #1212

Merged
merged 16 commits into from
Mar 22, 2017
Merged

feat(jins-meme): add support for jins meme smart glasses #1212

merged 16 commits into from
Mar 22, 2017

Conversation

lora-reames
Copy link
Contributor

@lora-reames lora-reames commented Mar 22, 2017

lora-reames and others added 11 commits March 21, 2017 11:58
(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'.
merge joshbabb/ionic-native into blyncsync/ionic-native
@rgbsuede
Copy link
Contributor

Please squash this into one commit with message:

feat(jins-meme): add support for jins meme smart glasses

If/when merging :)

@lora-reames lora-reames changed the title (feat) add support for jins meme smart glasses feat(jins-meme): add support for jins meme smart glasses Mar 22, 2017
* ```
* import { JinsMeme } from 'ionic-native';
*
* JinsMeme.functionName('Hello', 123)
Copy link
Collaborator

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';
Copy link
Collaborator

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
Copy link
Collaborator

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
Copy link
Collaborator

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
Copy link
Collaborator

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; }

/**
Copy link
Collaborator

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; }
Copy link
Collaborator

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.
Copy link
Collaborator

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> {
Copy link
Collaborator

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) => {
Copy link
Collaborator

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...

@ihadeed
Copy link
Collaborator

ihadeed commented Mar 22, 2017

Thanks for submitting a PR.

Please review the changes requested.

Also, please run npm run lint or gulp lint to review and fix any code style issues.

Copy link
Contributor

@rgbsuede rgbsuede left a 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!

@ihadeed ihadeed merged commit 9c88cfb into danielsogl:master Mar 22, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants