Closed voltsonic closed 3 years ago
I should note that in src/RNAlarmNotifications.ts
I've added todo notes because the logic behind those do not make sense based on the comments given.
e.g. An item says it's required, but in the source code it has a default value that can set (follow the [at]see's below the todo note)
Also included a fix for the vibrate and play_sound defaults not setting correctly (essentially made it impossible to turn them off)
This is mentioned in issue #93
3931832 didn't affect javascript users, this fixed a typescript bug in my exporting, I had noticed I did not specify the default export namespace so that way ReactNativeAN
was also typeable from a project that this update is included into
Probably shouldn't include the dist directory?
The dist directory contains the .js code that react-native needs during run time to bridge to the mobile-os (so normal javascript rn projects can include and still be able to use it in their projects).
Typescript will actually compile the src/ to dist/ directory whenever changes wanna be made (not automatic but can be, this also makes it easier to upgrade certain js aspects by modifying the tsconfig.json file for easier future-proofing)
You can create typings ([at]types) alongside a project but from my understanding those are harder to maintain in sync when the core library is being updated. As it's hard to infer some types from js -> ts since types don't exist in the js ecosystem, I had to convert the js code to typescript for it to work properly.
I'm about to add another patch to this merge request with build dependencies and instructions added if this pull request is accepted by the project owners as your comment @laurent22 made me realize that wasn't in the package.json file as well as a decent explanation on how to compile from typescript to javascript!
Awesome, nice work. Let me know when i can merge the entire code.
I would say to make sure this file is formatted in a more friendly way? If it makes sense and works for now then that works and it's ready. (or if you'd like to just merge it into the main README.md, I also modified readme with just a link to the development file, as it's not too large)
However it does add the extra step of having to compile the typescript to javascript before each version release - I'm planning on doing some more updates to potentially add more features to this plugin so I can help w/ easing into that process if your not as familiar with a typescript bundle setup (apologies if ya are and disregard this if good to go!)
I also have not cloned anything being worked on in forks or branches outside master 1.7.1 here, so that would have to be updated to the typescript format but shouldn't be terribly difficult to do those and I wouldn't mind helping out where needed if needed
Apologies, lauren22 was correct and to actually remove the dist/
from the git repo since that only needs to published to npm and I was incorrect in thinking that the repo needed the built files in a typescript project as it doesn't -* just the tools and code to build the files are required (then the built files are published to npm only vs the source files)
Gimme a week at most and i'll patch up my merge request to be correct in this fashion (gonna set it up properly on a play project I've worked on with typescript before updating this one to make sure I clean it up properly).
Hola! So here's the deal, between open source and my day job and life and what not, I have a lot to manage, so I use a GitHub bot to automate a few things here and there. This particular GitHub bot is going to mark this as stale because it has not had recent activity for a while. It will be closed if no further activity occurs in a few days. Do not take this personally--seriously--this is a completely automated action. If this is a mistake, just make a comment, DM me, send a carrier pidgeon, or a smoke signal.
Auto-closing pull requests with a bot... nice. @emekalites, in case it's not obvious, there's no recent activity on this pull request (and on all the issues actually) because you're ignoring all of them. It's your project, you do whatever you want of course, but perhaps you should consider archiving it if you're not going to maintain it anymore.
@laurent22 i had to merge this. Its been a while i looked at this plugin because of my busy schedule. I don't know if you were able to do what you wanted to do:
Gimme a week at most and i'll patch up my merge request to be correct in this fashion (gonna set it up properly on a play project I've worked on with typescript before updating this one to make sure I clean it up properly).
I dont think archiving this project is wise since there's quite a few people using this library already.
Converted the project to a typescript project so it can be compatible with both javascript and typescript projects. Pretty sure I've converted everything and was able to decipher what was sent/returned in the functions.
Not only that but I created typings for the NativeModule RNAlarmNotification to make it easier for users to access the raw java side with typing help.
src/RNAlarmNotification.ts
represents the react methods passed thru from the java end toNativeModules.RNAlarmNotification
src/index.ts
is the originalindex.js
but converted into typescript compatible setup.