Skip to content

Commit 242dde2

Browse files
committed
Initial commit
0 parents  commit 242dde2

34 files changed

+11031
-0
lines changed

.editorconfig

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
root = true
2+
3+
[*]
4+
indent_style = space
5+
indent_size = 2
6+
end_of_line = lf
7+
charset = utf-8
8+
max_line_length = 80
9+
trim_trailing_whitespace = true
10+
insert_final_newline = true

.eslintrc.yml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
plugins: [node, prettier]
2+
env:
3+
node: true
4+
es6: true
5+
extends:
6+
- plugin:import/errors
7+
- plugin:import/warnings
8+
- eslint:recommended
9+
- plugin:node/recommended
10+
- prettier

.gitattributes

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
* text=auto eol=lf

.github/ISSUE_TEMPLATE/bug_report.md

Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
---
2+
name: Bug report
3+
about: Create a report to help us improve
4+
title: 'Please replace with a clear and descriptive title'
5+
labels: bug
6+
assignees: ''
7+
---
8+
9+
Thanks for reporting this bug!
10+
11+
If this is related to a typo or the documentation being unclear, please click on
12+
the relevant page's `Edit` button (pencil icon) and suggest a correction
13+
instead.
14+
15+
Please search other issues to make sure this bug has not already been reported.
16+
17+
Then fill in the sections below.
18+
19+
**Describe the bug**
20+
21+
A clear and concise description of what the bug is.
22+
23+
**Steps to reproduce**
24+
25+
Step-by-step instructions on how to reproduce the behavior.
26+
27+
Example:
28+
29+
1. Type the following command: [...]
30+
2. etc.
31+
32+
**Expected behavior**
33+
34+
A clear and concise description of what you expected to happen.
35+
36+
**Configuration**
37+
38+
Command line options and/or configuration file, if any.
39+
40+
**Environment**
41+
42+
Enter the following command in a terminal and copy/paste its output:
43+
44+
```bash
45+
npx envinfo --system --binaries --browsers --npmPackages netlify-plugin-{{name}}
46+
```
47+
48+
**Screenshots**
49+
50+
If applicable, add screenshots to help explain your problem.
51+
52+
**Can you submit a pull request?**
53+
54+
Yes/No.
55+
56+
Pull requests are welcome! If you would like to help us fix this bug, please
57+
check our [contributions guidelines](../blob/master/CONTRIBUTING.md).
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
---
2+
name: Feature request
3+
about: Suggest an idea for this project
4+
title: 'Please replace with a clear and descriptive title'
5+
labels: enhancement
6+
assignees: ''
7+
---
8+
9+
Thanks for suggesting a new feature!
10+
11+
Please fill in the sections below.
12+
13+
**Which problem is this feature request solving?**
14+
15+
Example: I'm always frustrated when [...]
16+
17+
**Describe the solution you'd like**
18+
19+
Example: This could be fixed by [...]
20+
21+
**Describe alternatives you've considered**
22+
23+
Example: Another solution would be [...]
24+
25+
**Can you submit a pull request?**
26+
27+
Yes/No.
28+
29+
Pull requests are welcome! If you would like to help us add this feature, please
30+
check our [contributions guidelines](../blob/master/CONTRIBUTING.md).

.github/pull_request_template.md

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
🎉 Thanks for sending this pull request! 🎉
2+
3+
Please make sure the title is clear and descriptive.
4+
5+
If you are fixing a typo or documentation, please skip these instructions.
6+
7+
Otherwise please fill in the sections below.
8+
9+
**Which problem is this pull request solving?**
10+
11+
Example: I'm always frustrated when [...]
12+
13+
**List other issues or pull requests related to this problem**
14+
15+
Example: This fixes #5012
16+
17+
**Describe the solution you've chosen**
18+
19+
Example: I've fixed this by [...]
20+
21+
**Describe alternatives you've considered**
22+
23+
Example: Another solution would be [...]
24+
25+
**Checklist**
26+
27+
Please add a `x` inside each checkbox:
28+
29+
- [ ] I have read the [contribution guidelines](../blob/master/CONTRIBUTING.md).
30+
- [ ] I have added tests (we are enforcing 100% test coverage).
31+
- [ ] I have added documentation in the `README.md`, the `docs` directory (if
32+
any) and the `examples` directory (if any).
33+
- [ ] The status checks are successful (continuous integration). Those can be
34+
seen below.

.gitignore

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
*~
2+
*.swp
3+
npm-debug.log
4+
node_modules
5+
/core
6+
.eslintcache
7+
.npmrc
8+
.yarn-error.log
9+
.nyc_output
10+
!.github/
11+
/coverage
12+
/build

.prettierrc.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
semi: false
2+
singleQuote: true
3+
printWidth: 80
4+
endOfLine: lf
5+
proseWrap: always
6+
trailingComma: all

CODE_OF_CONDUCT.md

Lines changed: 80 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,80 @@
1+
# Code of Conduct
2+
3+
This text is available in
4+
[many other languages](https://www.contributor-covenant.org/translations).
5+
6+
## Our Pledge
7+
8+
In the interest of fostering an open and welcoming environment, we as
9+
contributors and maintainers pledge to making participation in our project and
10+
our community a harassment-free experience for everyone, regardless of age, body
11+
size, disability, ethnicity, sex characteristics, gender identity and
12+
expression, level of experience, education, socio-economic status, nationality,
13+
personal appearance, race, religion, or sexual identity and orientation.
14+
15+
## Our Standards
16+
17+
Examples of behavior that contributes to creating a positive environment
18+
include:
19+
20+
- Using welcoming and inclusive language
21+
- Being respectful of differing viewpoints and experiences
22+
- Gracefully accepting constructive criticism
23+
- Focusing on what is best for the community
24+
- Showing empathy towards other community members
25+
26+
Examples of unacceptable behavior by participants include:
27+
28+
- The use of sexualized language or imagery and unwelcome sexual attention or
29+
advances
30+
- Trolling, insulting/derogatory comments, and personal or political attacks
31+
- Public or private harassment
32+
- Publishing others' private information, such as a physical or electronic
33+
address, without explicit permission
34+
- Other conduct which could reasonably be considered inappropriate in a
35+
professional setting
36+
37+
## Our Responsibilities
38+
39+
Project maintainers are responsible for clarifying the standards of acceptable
40+
behavior and are expected to take appropriate and fair corrective action in
41+
response to any instances of unacceptable behavior.
42+
43+
Project maintainers have the right and responsibility to remove, edit, or reject
44+
comments, commits, code, wiki edits, issues, and other contributions that are
45+
not aligned to this Code of Conduct, or to ban temporarily or permanently any
46+
contributor for other behaviors that they deem inappropriate, threatening,
47+
offensive, or harmful.
48+
49+
## Scope
50+
51+
This Code of Conduct applies both within project spaces and in public spaces
52+
when an individual is representing the project or its community. Examples of
53+
representing a project or community include using an official project e-mail
54+
address, posting via an official social media account, or acting as an appointed
55+
representative at an online or offline event. Representation of a project may be
56+
further defined and clarified by project maintainers.
57+
58+
## Enforcement
59+
60+
Instances of abusive, harassing, or otherwise unacceptable behavior may be
61+
reported by contacting the project team at {{email}}. All complaints will be
62+
reviewed and investigated and will result in a response that is deemed necessary
63+
and appropriate to the circumstances. The project team is obligated to maintain
64+
confidentiality with regard to the reporter of an incident. Further details of
65+
specific enforcement policies may be posted separately.
66+
67+
Project maintainers who do not follow or enforce the Code of Conduct in good
68+
faith may face temporary or permanent repercussions as determined by other
69+
members of the project's leadership.
70+
71+
## Attribution
72+
73+
This Code of Conduct is adapted from the [Contributor Covenant][homepage],
74+
version 1.4, available at
75+
https://www.contributor-covenant.org/version/1/4/code-of-conduct.html
76+
77+
[homepage]: https://www.contributor-covenant.org
78+
79+
For answers to common questions about this code of conduct, see
80+
https://www.contributor-covenant.org/faq

CONTRIBUTING.md

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
# Contributions
2+
3+
🎉 Thanks for considering contributing to this project! 🎉
4+
5+
These guidelines will help you send a pull request.
6+
7+
If you're submitting an issue instead, please skip this document.
8+
9+
If your pull request is related to a typo or the documentation being unclear,
10+
please click on the relevant page's `Edit` button (pencil icon) and directly
11+
suggest a correction instead.
12+
13+
This project was made with ❤️. The simplest way to give back is by starring and
14+
sharing it online.
15+
16+
Everyone is welcome regardless of personal background. We enforce a
17+
[Code of conduct](CODE_OF_CONDUCT.md) in order to promote a positive and
18+
inclusive environment.
19+
20+
# Development process
21+
22+
First fork and clone the repository. If you're not sure how to do this, please
23+
watch
24+
[these videos](https://egghead.io/courses/how-to-contribute-to-an-open-source-project-on-github).
25+
26+
Run:
27+
28+
```bash
29+
npm install
30+
```
31+
32+
Make sure everything is correctly setup with:
33+
34+
```bash
35+
npm test
36+
```

LICENSE

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
MIT License
2+
3+
Copyright (c) {{year}} {{author}}
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.

README.md

Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
<img src="static/logo.png" width="400"/><br>
2+
3+
<!-- START -->
4+
5+
Template repository to create new Netlify Build plugins.
6+
7+
## Usage
8+
9+
To create a repository with a new Netlify Build plugin, click on the following
10+
button:
11+
12+
[![Deploy to Netlify](https://www.netlify.com/img/deploy/button.svg)](https://app.netlify.com/start/deploy?repository=https://github.com/netlify/build-plugin-template)
13+
14+
Clone the repository locally. Go to the new repository directory then run the
15+
following command:
16+
17+
```
18+
npm run init
19+
```
20+
21+
After answering few questions, the Netlify Build plugin will be ready. You can
22+
add any logic to the main file at `src/main.js`. This file's comments will guide
23+
through the creation of a Build plugin.
24+
25+
The following development tasks are already setup:
26+
27+
- `npm run ava` runs unit tests.
28+
- `npm run lint` lints source files.
29+
- `npm test` runs both unit tests and linting.
30+
- `npm run release` publishes this plugin to `npm`.
31+
32+
## Plugin documentation
33+
34+
<!-- END -->
35+
36+
Netlify Build plugin - {{description}}.
37+
38+
## Install
39+
40+
```
41+
npm install netlify-plugin-{{name}}
42+
```
43+
44+
## Usage
45+
46+
Add this plugin to the `plugins` array in your
47+
[`netlify.yml` configuration file](https://docs.netlify.com/configure-builds/file-based-configuration):
48+
49+
```yml
50+
plugins:
51+
- package: netlify-plugin-{{name}}
52+
config: {}
53+
```
54+
55+
## Configuration
56+
57+
The following `config` options are available:
58+
59+
### foo
60+
61+
_Type_: `string`\
62+
_Default_: `bar`
63+
64+
Example description of the `foo` option.

netlify.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
build:
2+
command: npm test

0 commit comments

Comments
 (0)