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

Initial migration of Javascript libraries #124

Merged

Conversation

5iver
Copy link
Member

@5iver 5iver commented May 22, 2019

Resolves #120.

Changes made to original JS libraries:

  1. Corrected paths for the new directory structure
  2. Changed helper.mainPath to automationPath + 'lib/javascript/core/'
  3. Changed the default logger to jsr223.javascript (I'd like to remove the jsr223, for Jython too, so this may be a good time to do it)
  4. Moved the README.md to Docs/Javascript/
  5. Renamed JSRule.js to rules.js
  6. Renamed helper.js to utils.js
  7. Split triggersAndConditions.js into triggers.js and conditions.js
  8. Renamed a couple example scripts
  9. Commented out imports in utils.js (helper.js) that are included in 'default' preset
  10. Misc cleanup

If you have helper libraries for more than one language, there will be more than one startup delay script. This may not be optimal, but doesn't hurt anything.

Signed-off-by: Scott Rushworth openhab@5iver.com

@5iver 5iver mentioned this pull request May 22, 2019
@Confectrician
Copy link

I would suggest to add issues for your listed suggestion points above.

We can than talk about or implemnt them in pieces.

@lewie
Copy link

lewie commented May 24, 2019

@openhab-5iver,
if you want, you can still use this formatting for the header:

@author Helmut Lehmeyer <helmut.lehmeyer@gmail.com> - initial contribution.

In "Changes made to original JS libraries:"
All other points are perfect.

In "Suggestions":
Unify what seems to you to make sense full! We want as much agreement as possible between the languages.
to 3) No "ON/OFF" is not added as things! This was an older Version I think, where I mapped the OnOffType class.

Scott Rushworth added 2 commits May 25, 2019 11:57
Signed-off-by: Scott Rushworth <openhab@5iver.com>
Signed-off-by: Scott Rushworth <openhab@5iver.com>
@5iver 5iver force-pushed the initial-migration-of-javascript-libraries branch 4 times, most recently from ba6e275 to b3d77c9 Compare May 25, 2019 18:34
Signed-off-by: Scott Rushworth <openhab@5iver.com>
@5iver 5iver force-pushed the initial-migration-of-javascript-libraries branch from b3d77c9 to 4244e0a Compare May 25, 2019 18:53
@5iver
Copy link
Member Author

5iver commented May 25, 2019

@lewie, I'd sent you an invite to the maintains team, but I see you have not accepted it yet. It would be nice if you cod do a review/approval, but that wouldn't be possible until that is done. I'll go ahead an merge this, and we can clean things up in PRs. I did not include the email address in the header, since there would be cleanup needed if/when the address changed and we can be contacted through GH or the forum. If this is an issue for you, we can change it later or discuss in #131.

@5iver 5iver merged commit e0e7d58 into openhab-scripters:master May 25, 2019
@lewie
Copy link

lewie commented May 26, 2019

@openhab-5iver,
great, thanks! The e-mail in the header also has disadvantages, let's omit it.

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.

Add Javascript libraries
3 participants