-
-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit c4256b2
Showing
22 changed files
with
13,124 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
{ | ||
"presets": ["@babel/preset-react", "@babel/preset-env"] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
# editorconfig.org | ||
root = true | ||
|
||
[*] | ||
indent_style = space | ||
indent_size = 4 | ||
end_of_line = lf | ||
charset = utf-8 | ||
trim_trailing_whitespace = true | ||
insert_final_newline = true | ||
|
||
[package.json] | ||
indent_style = space | ||
indent_size = 2 | ||
|
||
[.travis.yml] | ||
indent_style = space | ||
indent_size = 2 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
{ | ||
"extends": ["nfl", "prettier"], | ||
"env": { | ||
"browser": true, | ||
"mocha": true, | ||
"es6": true | ||
}, | ||
"globals": { | ||
"expect": false, | ||
"sinon": false | ||
}, | ||
"plugins": ["prettier"], | ||
"rules": { | ||
"prettier/prettier": [ | ||
"error", | ||
{ | ||
"printWidth": 80, | ||
"tabWidth": 4, | ||
"singleQuote": false, | ||
"trailingComma": "none", | ||
"bracketSpacing": false, | ||
"semi": true, | ||
"useTabs": false, | ||
"parser": "babylon", | ||
"jsxBracketSameLine": false | ||
} | ||
] | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
.DS_Store | ||
.eslintcache | ||
.idea | ||
coverage | ||
es | ||
lib | ||
node_modules | ||
npm-debug.log |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
.arcconfig | ||
.babelrc | ||
.editorconfig | ||
.eslintrc | ||
.gitignore | ||
.nvmrc | ||
*.yml | ||
AUTHORS | ||
CHANGELOG.md | ||
CODE_OF_CONDUCT.md | ||
CONTRIBUTE.md | ||
rollup.config.js | ||
coverage | ||
karma.config.js | ||
test/ | ||
node_modules/ | ||
src/ | ||
travis.yml | ||
rollup.config.js |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
Lawrence McDaniel <[email protected]> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
## 0.1.0 (November 22, 2021) | ||
|
||
- Initial public release to [npmjs.com](https://www.npmjs.com/package/react-mdr) | ||
|
||
## 0.1.1 (November 23, 2021) | ||
- Build test and lint documentation. | ||
|
||
## 0.1.3 (November 23, 2021) | ||
- Renamed to react-mdr |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,80 @@ | ||
# Code of Conduct | ||
|
||
## Our Pledge | ||
|
||
In the interest of fostering an open and welcoming environment, we as | ||
contributors and maintainers pledge to make participation in our project and | ||
our community a harassment-free experience for everyone, regardless of age, body | ||
size, disability, ethnicity, sex characteristics, gender identity and expression, | ||
level of experience, education, socio-economic status, nationality, personal | ||
appearance, race, religion, or sexual identity and orientation. | ||
|
||
## Our Standards | ||
|
||
Examples of behavior that contributes to creating a positive environment | ||
include: | ||
|
||
- Using welcoming and inclusive language | ||
- Being respectful of differing viewpoints and experiences | ||
- Gracefully accepting constructive criticism | ||
- Focusing on what is best for the community | ||
- Showing empathy towards other community members | ||
|
||
Examples of unacceptable behavior by participants include: | ||
|
||
- The use of sexualized language or imagery and unwelcome sexual attention or | ||
advances | ||
- Trolling, insulting/derogatory comments, and personal or political attacks | ||
- Public or private harassment | ||
- Publishing others' private information, such as a physical or electronic | ||
address, without explicit permission | ||
- Other conduct which could reasonably be considered inappropriate in a | ||
professional setting | ||
|
||
## Our Responsibilities | ||
|
||
Project maintainers are responsible for clarifying the standards of acceptable | ||
behavior and are expected to take appropriate and fair corrective action in | ||
response to any instances of unacceptable behavior. | ||
|
||
Project maintainers have the right and responsibility to remove, edit, or | ||
reject comments, commits, code, wiki edits, issues, and other contributions | ||
that are not aligned to this Code of Conduct, or to ban temporarily or | ||
permanently any contributor for other behaviors that they deem inappropriate, | ||
threatening, offensive, or harmful. | ||
|
||
## Scope | ||
|
||
This Code of Conduct applies within all project spaces, and it also applies when | ||
an individual is representing the project or its community in public spaces. | ||
Examples of representing a project or community include using an official | ||
project e-mail address, posting via an official social media account, or acting | ||
as an appointed representative at an online or offline event. Representation of | ||
a project may be further defined and clarified by project maintainers. | ||
|
||
This Code of Conduct also applies outside the project spaces when there is a | ||
reasonable belief that an individual's behavior may have a negative impact on | ||
the project or its community. | ||
|
||
## Enforcement | ||
|
||
Instances of abusive, harassing, or otherwise unacceptable behavior may be | ||
reported by contacting the project lead at <[email protected]>. All | ||
complaints will be reviewed and investigated and will result in a response that | ||
is deemed necessary and appropriate to the circumstances. The project lead is | ||
obligated to maintain confidentiality with regard to the reporter of an incident. | ||
Further details of specific enforcement policies may be posted separately. | ||
|
||
Project maintainers who do not follow or enforce the Code of Conduct in good | ||
faith may face temporary or permanent repercussions as determined by other | ||
members of the project's leadership. | ||
|
||
## Attribution | ||
|
||
This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4, | ||
available at https://www.contributor-covenant.org/version/1/4/code-of-conduct.html | ||
|
||
[homepage]: https://www.contributor-covenant.org | ||
|
||
For answers to common questions about this code of conduct, see | ||
https://www.contributor-covenant.org/faq |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,105 @@ | ||
# How to Contribute | ||
|
||
Hopefully this document makes the process for contributing clear and answers some questions that you may have. | ||
|
||
## Code of Conduct | ||
|
||
We have adopted the [Contributor Covenant](https://www.contributor-covenant.org/) as our Code of Conduct, and we expect project participants to adhere to it. Please read the full text so that you can understand what actions will and will not be tolerated. | ||
|
||
## Open Development | ||
|
||
All work on React Matrix Raining Letters ("MRL") happens directly on [GitHub](https://github.com/lpm0073/react-mdr/). Both core team members and external contributors send pull requests which go through the same review process. | ||
|
||
## Semantic Versioning | ||
|
||
React MRL follows [semantic versioning](https://semver.org/). We release patch versions for critical bugfixes, minor versions for new features or non-essential changes, and major versions for any breaking changes. When we make breaking changes, we also introduce deprecation warnings in a minor version so that our users learn about the upcoming changes and migrate their code in advance. | ||
|
||
Every significant change is documented in the [changelog file](./CHANGELOG.md). | ||
|
||
## Branch Organization | ||
|
||
Submit all changes directly to the main branch. We don’t use separate branches for development or for upcoming releases. We do our best to keep main in good shape, with all tests passing. | ||
|
||
Code that lands in main must be compatible with the latest stable release. It may contain additional features, but no breaking changes. We should be able to release a new minor version from the tip of main at any time. | ||
|
||
## Bugs | ||
|
||
**Where to Find Known Issues** | ||
|
||
We are using [GitHub Issues](https://github.com/lpm0073/react-mdr/issues) for our public bugs. We keep a close eye on this and try to make it clear when we have an internal fix in progress. Before filing a new task, try to make sure your problem doesn’t already exist. | ||
|
||
**Reporting New Issues** | ||
|
||
The best way to get your bug fixed is to provide a reduced test case. This JSFiddle template is a great starting point. | ||
|
||
## How to Get in Touch | ||
|
||
Main contact: [Lawrence McDaniel](https://lawrencemcdaniel.com/contact) | ||
|
||
## Proposing a Change | ||
|
||
If you intend to change the public API, or make any non-trivial changes to the implementation, we recommend [filing an issue](https://github.com/lpm0073/react-mdr/issues/new). This lets us reach an agreement on your proposal before you put significant effort into it. | ||
|
||
If you’re only fixing a bug, it’s fine to submit a pull request right away but we still recommend to file an issue detailing what you’re fixing. This is helpful in case we don’t accept that specific fix but want to keep track of the issue. | ||
|
||
## Style Guide | ||
|
||
We use an automatic code formatter called Prettier. Run yarn prettier after making any changes to the code. | ||
|
||
Then, our linter will catch most issues that may exist in your code. You can check the status of your code styling by simply running yarn linc. | ||
|
||
However, there are still some styles that the linter cannot pick up. If you are unsure about something, looking at Airbnb’s Style Guide will guide you in the right direction. | ||
|
||
## Request for Comments (RFC) | ||
|
||
Many changes, including bug fixes and documentation improvements can be implemented and reviewed via the normal GitHub pull request workflow. | ||
|
||
Some changes though are “substantial”, and we ask that these be put through a bit of a design process and produce a consensus among the contributor team. | ||
|
||
The “RFC” (request for comments) process is intended to provide a consistent and controlled path for new features to enter the project. You can contribute by visiting the rfcs repository. | ||
|
||
## License | ||
|
||
By contributing to React MRL, you agree that your contributions will be licensed under its [MIT license](./LICENSE). | ||
|
||
## Development setup | ||
|
||
This is a helpful article on explains much of the tooling of this repo: https://dev.to/jimjunior/how-to-create-an-npm-library-from-react-components-2m2 | ||
|
||
Following are docs on how to locally symlink your repo to your local npm evironment, which enables you to test locally, before you publish: https://docs.npmjs.com/cli/v8/commands/npm-link | ||
|
||
And, if you need, how to unlink: https://stackoverflow.com/questions/19094630/how-do-i-uninstall-a-package-installed-using-npm-link | ||
|
||
|
||
```bash | ||
git clone https://github.com/lpm0073/react-mdr.git | ||
cd react-mdr | ||
yarn build | ||
``` | ||
|
||
If you want to rebuild fresh... | ||
|
||
```bash | ||
npm install rollup --save-dev | ||
npm install @babel/cli @babel/core @babel/preset-env @babel/preset-react @rollup/plugin-babel --save-dev | ||
npm install rollup-plugin-styles autoprefixer --save-dev | ||
npm install @babel/runtime | ||
npm install @babel/plugin-transform-runtime --save-dev | ||
npm install rollup-plugin-sourcemaps --save-dev | ||
``` | ||
|
||
## Create a new release | ||
|
||
```bash | ||
# 1.) increment package.json "version", on or around row 4. | ||
vim ./package.json | ||
|
||
# 2.) Add to ./CHANGELOG.md | ||
vim ./CHANGELOG.md | ||
|
||
# 3.) excecute the build script, which calls rollup/babel to rebuild the files in dist/ | ||
npm run build | ||
|
||
# 4.) create a new semantic release in github.com | ||
https://github.com/lpm0073/react-mdr/releases | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
MIT License | ||
|
||
Copyright (c) Lawrence P. McDaniel <[email protected]> | ||
|
||
Permission is hereby granted, free of charge, to any person obtaining a copy | ||
of this software and associated documentation files (the "Software"), to deal | ||
in the Software without restriction, including without limitation the rights | ||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
copies of the Software, and to permit persons to whom the Software is | ||
furnished to do so, subject to the following conditions: | ||
|
||
The above copyright notice and this permission notice shall be included in all | ||
copies or substantial portions of the Software. | ||
|
||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE | ||
SOFTWARE. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
# [Matrix Digital Rain Effect for ReactJS](https://www.npmjs.com/package/react-mdr) · [![GitHub license](https://img.shields.io/badge/license-MIT-blue.svg)](https://github.com/facebook/react/blob/main/LICENSE) [![npm version](https://img.shields.io/npm/v/react-mdr.svg?style=flat)](https://www.npmjs.com/package/react-mdr) [![code style: prettier](https://img.shields.io/badge/code_style-prettier-ff69b4.svg?style=flat-square)](https://github.com/prettier/prettier) [![PRs Welcome](https://img.shields.io/badge/PRs-welcome-brightgreen.svg)](https://github.com/lpm0073/react-mdr/pulls) | ||
|
||
[![Hack.d Lawrence McDaniel](https://img.shields.io/badge/hack.d-Lawrence%20McDaniel-orange.svg)](https://lawrencemcdaniel.com) | ||
|
||
**React Matrix Digital Rain Effect** gives you your favorite Matrix movie screen effect in the form of a React component. The source originates from an October 2021 blog article written by [Adam Nagy](https://www.youtube.com/c/JavascriptAcademyOfficial), ["Matrix raining code effect using JavaScript"](https://dev.to/javascriptacademy/matrix-raining-code-effect-using-javascript-4hep). | ||
|
||
- **Lightweight:** The active code in this repository is less than 100 lines. It uses a canvas for rendering, which should ensure that it is both performant and that it works in most browsers. | ||
- **Use Anywhere:** The `<MatrixRainingLetters />` component tag can be placed anywhere in your jsx return function. It accepts custom classes and responds normally to CSS styling. | ||
|
||
### Screenshot | ||
<img width="1221" alt="screenshot" src="https://user-images.githubusercontent.com/1178819/143112334-85cfd56c-cbb5-4302-ae90-1e4f7da82316.png"> | ||
|
||
### Screencast | ||
|
||
https://user-images.githubusercontent.com/1178819/142886923-3b558b62-9695-42f0-8efc-fc457d361a83.mp4 | ||
|
||
## Installation | ||
|
||
```bash | ||
npm i react-mdr | ||
``` | ||
|
||
## Code Sample | ||
|
||
```jsx | ||
import { MatrixRainingLetters } from "react-mdr"; | ||
|
||
function Foo() { | ||
return ( | ||
<React.Fragment> | ||
<MatrixRainingLetters key="foo-bar" custom_class="m-0 p-0" /> | ||
</React.Fragment> | ||
); | ||
} | ||
``` | ||
|
||
## Contributing | ||
|
||
Development of React Matrix Digital Rain Effect happens in the open on [GitHub](https://github.com/lpm0073/react-mdr/), and we are grateful to the community for contributing bugfixes and improvements. You can improve it by sending pull requests to [this repository](https://github.com/lpm0073/react-mdr/). Review [this guide](./CONTRIBUTE.md) for the gist of our development process, how to propose bugfixes and improvements. | ||
|
||
### License | ||
|
||
React Matrix Digital Rain Effect is [MIT licensed](./LICENSE). |
Oops, something went wrong.