Skip to content

Commit e56a6ed

Browse files
committed
Improve README
1 parent 71c1340 commit e56a6ed

File tree

2 files changed

+93
-18
lines changed

2 files changed

+93
-18
lines changed

CONTRIBUTING.md

Lines changed: 79 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,80 @@
1+
# Contributing
12

3+
When contributing to this repository, please first discuss the change you wish to make via issue,
4+
email, or any other method with the owners of this repository before making a change.
5+
6+
Please note we have a code of conduct, please follow it in all your interactions with the project.
7+
8+
9+
## Pull Request Process
10+
11+
1. Ensure any install or build dependencies are removed before the end of the layer when doing a build.
12+
2. Update the README.md with details of changes to reflect important changes (new options, changed API, etc).
13+
3. Regenerate dist assets using production env: `npm run prod`.
14+
15+
### Compiling Assets
16+
17+
```bash
18+
# Compile and minify your assets:
19+
npm run prod
20+
21+
# Compile your assets for local development:
22+
npm run dev
23+
24+
# Run the NPM "watch" command to auto-compile your assets when they are changed:
25+
npm run watch
26+
```
27+
28+
## Code of Conduct
29+
30+
### Our Pledge
31+
32+
In the interest of fostering an open and welcoming environment, we as
33+
contributors and maintainers pledge to making participation in our project and
34+
our community a harassment-free experience for everyone, regardless of age, body
35+
size, disability, ethnicity, gender identity and expression, level of experience,
36+
nationality, personal appearance, race, religion, or sexual identity and
37+
orientation.
38+
39+
40+
### Our Standards
41+
42+
Examples of behavior that contributes to creating a positive environment
43+
include:
44+
45+
* Using welcoming and inclusive language
46+
* Being respectful of differing viewpoints and experiences
47+
* Gracefully accepting constructive criticism
48+
* Focusing on what is best for the community
49+
* Showing empathy towards other community members
50+
51+
Examples of unacceptable behavior by participants include:
52+
53+
* The use of sexualized language or imagery and unwelcome sexual attention or advances
54+
* Trolling, insulting/derogatory comments, and personal or political attacks
55+
* Public or private harassment
56+
* Publishing others' private information, such as a physical or electronic address, without explicit permission
57+
* Other conduct which could reasonably be considered inappropriate in a professional setting
58+
59+
60+
### Our Responsibilities
61+
62+
Project maintainers are responsible for clarifying the standards of acceptable
63+
behavior and are expected to take appropriate and fair corrective action in
64+
response to any instances of unacceptable behavior.
65+
66+
Project maintainers have the right and responsibility to remove, edit, or
67+
reject comments, commits, code, wiki edits, issues, and other contributions
68+
that are not aligned to this Code of Conduct, or to ban temporarily or
69+
permanently any contributor for other behaviors that they deem inappropriate,
70+
threatening, offensive, or harmful.
71+
72+
73+
### Scope
74+
75+
This Code of Conduct applies both within project spaces and in public spaces
76+
when an individual is representing the project or its community. Examples of
77+
representing a project or community include using an official project e-mail
78+
address, posting via an official social media account, or acting as an appointed
79+
representative at an online or offline event. Representation of a project may be
80+
further defined and clarified by project maintainers.

README.md

Lines changed: 14 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,13 @@
33
[![Latest Stable Version](https://poser.pugx.org/interaction-design-foundation/nova-html-code-field/v/stable)](https://packagist.org/packages/interaction-design-foundation/nova-html-code-field)
44
[![Total Downloads](https://poser.pugx.org/interaction-design-foundation/nova-html-code-field/downloads)](https://packagist.org/packages/interaction-design-foundation/nova-html-code-field)
55

6-
![image](https://github.com/InteractionDesignFoundation/nova-html-code-field/blob/main/resources/img/[email protected])
7-
6+
Sometimes you need an option to write a raw HTML and have a real-time preview for it.
7+
This package provides such ability. Under the hood this package uses iframe for HTML code your write,
8+
so Nova styles will not leak to the preview. Additionally, you can provide URLs to your custom CSS file
9+
and thus your HTML preview will be very close to the final result.
810

9-
## ToDo
11+
![image](https://github.com/InteractionDesignFoundation/nova-html-code-field/blob/main/resources/img/[email protected])
1012

11-
1. Add HTML validator (https://www.npmjs.com/package/html-validator)
12-
1. Add toolbar
13-
1. Optimize a preview: re-render only changed node
1413

1514
## Installation
1615

@@ -34,7 +33,7 @@ public function fields()
3433

3534
### Options
3635

37-
- `->styles(array array $stylesUrls)`: optional, you can inject your custom css files.
36+
- `->styles(array $stylesUrls)`: optional, you can inject your custom css files.
3837
- `->previewTemplate(string | \Closure $template)`: optional, wrap editable code to have even better preview.
3938

4039
Full example:
@@ -48,23 +47,20 @@ HtmlCode::make('HTML content')
4847

4948
Please see [Releases](https://github.com/InteractionDesignFoundation/nova-unlayer-field/releases) for more information on what has changed recently.
5049

50+
5151
## Contributing
5252

5353
Please see [CONTRIBUTING](CONTRIBUTING.md) for details.
5454

55-
### Compiling Assets
5655

57-
```bash
58-
# Compile and minify your assets:
59-
npm run prod
56+
## License
6057

61-
# Compile your assets for local development:
62-
npm run dev
58+
The MIT License (MIT). Please see [License File](LICENSE) for more information.
6359

64-
# Run the NPM "watch" command to auto-compile your assets when they are changed:
65-
npm run watch
66-
```
6760

68-
## License
61+
## ToDo
62+
63+
1. Add toolbar
64+
1. Add HTML validator (https://www.npmjs.com/package/html-validator)
65+
1. Optimize a preview: re-render only changed node
6966

70-
The MIT License (MIT). Please see [License File](LICENSE) for more information.

0 commit comments

Comments
 (0)