css_triggerjs
v0.0.3
Published
CSS_TriggerJS
Downloads
13
Readme
TriggerJS
TriggerJS is a simple, super lightweight JavaScript library built with no dependencies (Mocha, Chai, and JSDOM are used for testing purposes only). It is built with JavaScript only. It gives the developer simple but powerful tools to manage user interactions in HTML. It promotes the separation of concerns when it comes to the visual look of a page and user interactions. It can work with any CSS library.
Core
The core has the base functionality. With TriggerJs core you define a trigger and a target by specifying CSS selectors. When the trigger event is activated by the user, the callback is called with the target as one of the parameters. This allows you to do anything you want with the target.
TriggerToggle
The trigger toggle uses the trigger to toggle the target through an array of css classes. Examples of the power behind this feature is demonstrated with trigger-tree. trigger-tree is built for Solid.js using the trigger toggle.
Other Features
Currently TriggerToggle is the only non core feature we have. The potential for new features are unlimited. If you would like to help build the TriggerJS features please submit TriggerJS contributor issue.
Installation
Within a particular ecosystem, there may be a common way of installing things, such as using Yarn, NuGet, or Homebrew. However, consider the possibility that whoever is reading your README is a novice and would like more guidance. Listing specific steps helps remove ambiguity and gets people to using your project as quickly as possible. If it only runs in a specific context like a particular programming language version or operating system or has dependencies that have to be installed manually, also add a Requirements subsection.
Usage
Use examples liberally, and show the expected output if you can. It's helpful to have inline the smallest example of usage that you can demonstrate, while providing links to more sophisticated examples if they are too long to reasonably include in the README.
Support
Tell people where they can go to for help. It can be any combination of an issue tracker, a chat room, an email address, etc.
Roadmap
If you have ideas for releases in the future, it is a good idea to list them in the README.
Contributing
State if you are open to contributions and what your requirements are for accepting them.
For people who want to make changes to your project, it's helpful to have some documentation on how to get started. Perhaps there is a script that they should run or some environment variables that they need to set. Make these steps explicit. These instructions could also be useful to your future self.
You can also document commands to lint the code or run tests. These steps help to ensure high code quality and reduce the likelihood that the changes inadvertently break something. Having instructions for running tests is especially helpful if it requires external setup, such as starting a Selenium server for testing in a browser.
Authors and acknowledgment
Show your appreciation to those who have contributed to the project.
License
For open source projects, say how it is licensed.
Project status
If you have run out of energy or time for your project, put a note at the top of the README saying that development has slowed down or stopped completely. Someone may choose to fork your project or volunteer to step in as a maintainer or owner, allowing your project to keep going. You can also make an explicit request for maintainers.
Integrate with your tools
Test and Deploy
Use the built-in continuous integration in GitLab.