Skip to content
This repository was archived by the owner on May 22, 2024. It is now read-only.

Commit 6a59de6

Browse files
committed
feat: version 3 release
Manifest format changed, worker re-written, contribution guide, image fingerprinting + renaming, temporary files. See the CHANGELOG for a full list of changes. BREAKING CHANGE: The format of the manfiest.json file has changed, some configuration options have been renamed to be shorter and simpler.
1 parent 03af191 commit 6a59de6

32 files changed

+2241
-1345
lines changed

.github/CODE_OF_CONDUCT.md

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

.github/CONTRIBUTING.md

Lines changed: 56 additions & 62 deletions
Original file line numberDiff line numberDiff line change
@@ -1,85 +1,79 @@
11
# Contributing
22

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-
## Changelog
3+
**Working on your first Pull Request?** You can learn how from this *free* series [How to Contribute to an Open Source Project on GitHub](https://egghead.io/courses/how-to-contribute-to-an-open-source-project-on-github)
74

8-
This project maintains a human-written changelog. It's easy to maintain, please make sure that
9-
you update it with every commit that produces noticeable modification!
10-
11-
## Pull Request Process
5+
When contributing to this repository, please first discuss the change you wish to make via issue,
6+
email, or any other method with the owners of this repository before making a change. You wouldn't
7+
want your work to be for nothing if the change was already being implemented, would you?
128

13-
1. Run the tests and verify that your work adheres to the project's guidelines.
14-
2. Update the README if necessary and make sure that you correctly updated the CHANGELOG.
15-
3. Submit a Pull Request.
16-
4. \[MAINTAINER\] Merge and Squash the PR respecting
17-
[Conventional Commits](https://www.conventionalcommits.org/). Commitizen is recommended.
18-
5. \[MAINTAINER\] Push the changes to origin. Travis CI will test the build and deploy automatically
19-
to NPM if necessary.
9+
## Make your own personal copy
2010

21-
## Code of Conduct
11+
Fork and clone the repository to your computer with git.
2212

23-
### Our Pledge
13+
The source files are found under `src/`. You may make any changes, commit them, and generally do what you like in your own personal copy.
2414

25-
In the interest of fostering an open and welcoming environment, we as contributors and maintainers
26-
pledge to making participation in our project and our community a harassment-free experience for
27-
everyone, regardless of age, body size, disability, ethnicity, gender identity and expression, level
28-
of experience, nationality, personal appearance, race, religion, or sexual identity and orientation.
15+
There are a few scripts to you to help you out:
2916

30-
### Our Standards
17+
```bash
18+
$ npm test
19+
$ npm run watch # live compilation
20+
$ npm run build # final build
21+
$ npm run fix # linting and style fixing
22+
$ npm run reset # reset to the last commit, and lose changes!
23+
```
3124

32-
Examples of behavior that contributes to creating a positive environment include:
25+
## Contributing back to RIB
3326

34-
- Using welcoming and inclusive language
35-
- Being respectful of differing viewpoints and experiences
36-
- Gracefully accepting constructive criticism
37-
- Focusing on what is best for the community
38-
- Showing empathy towards other community members
27+
- Fork the repository
28+
- Make your awesome changes
29+
- Update the CHANGELOG and README
30+
- Run tests, make sure they pass
31+
- Use sensible commit messages
32+
- We recommend [commitizen](https://github.com/commitizen/cz-cli), it's what we use
33+
- If your commits don't follow [Conventional Commits](https://www.conventionalcommits.org/), we will squash and rename them
34+
- Include any issue numbers in the message
35+
- Submit a Pull Request
36+
- Try to follow the given template
37+
- Add a good description of your changes
38+
- Don't add too many commits...
39+
- A PR should only address one issue/feature
3940

40-
Examples of unacceptable behavior by participants include:
41+
### Changelog
4142

42-
- The use of sexualized language or imagery and unwelcome sexual attention or advances
43-
- Trolling, insulting/derogatory comments, and personal or political attacks
44-
- Public or private harassment
45-
- Publishing others' private information, such as a physical or electronic address, without explicit
46-
permission
47-
- Other conduct which could reasonably be considered inappropriate in a professional setting
43+
This project maintains a human-written changelog. It's easy to maintain, please make sure that you
44+
update it with every commit that produces noticeable modification! It follows the
45+
[Keep a Changelog](https://keepachangelog.com) format.
4846

49-
### Our Responsibilities
47+
### Testing
5048

51-
Project maintainers are responsible for clarifying the standards of acceptable behavior and are
52-
expected to take appropriate and fair corrective action in response to any instances of unacceptable
53-
behavior.
49+
Contributions must pass style and unit tests. The deployment process ia handled by Travis CI, and any non-compliant commits will be rejected.
5450

55-
Project maintainers have the right and responsibility to remove, edit, or reject comments, commits,
56-
code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct, or
57-
to ban temporarily or permanently any contributor for other behaviors that they deem inappropriate,
58-
threatening, offensive, or harmful.
51+
```bash
52+
$ npm test
53+
```
5954

60-
### Scope
55+
### The Pull Request
6156

62-
This Code of Conduct applies both within project spaces and in public spaces when an individual is
63-
representing the project or its community. Examples of representing a project or community include
64-
using an official project e-mail address, posting via an official social media account, or acting as
65-
an appointed representative at an online or offline event. Representation of a project may be
66-
further defined and clarified by project maintainers.
57+
1. Run the tests and verify that your work adheres to the project's guidelines.
58+
2. Update the README if necessary and make sure that you correctly updated the CHANGELOG.
59+
3. Submit a Pull Request using the template provided and a easily-understandable description.
6760

68-
### Enforcement
61+
Our commits follow the [Conventional Commits](https://www.conventionalcommits.org/) format. Your
62+
change should only concern itself with a single feature or bug fix, and if possible, the commit
63+
should adhere to the conventional commit standard. A fantastic tool for committing is
64+
[commitizen](https://github.com/commitizen/cz-cli), which is configured to work with this
65+
repository.
6966

70-
Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by contacting
71-
the project team at [INSERT EMAIL ADDRESS]. All complaints will be reviewed and investigated and
72-
will result in a response that is deemed necessary and appropriate to the circumstances. The project
73-
team is obligated to maintain confidentiality with regard to the reporter of an incident. Further
74-
details of specific enforcement policies may be posted separately.
67+
If the commits are not compliant with Conventional Commit, don't worry, they will be squashed and
68+
properly tagged by a maintainer.
7569

76-
Project maintainers who do not follow or enforce the Code of Conduct in good faith may face
77-
temporary or permanent repercussions as determined by other members of the project's leadership.
70+
### [MAINTAINER] Merge
7871

79-
### Attribution
72+
Once the Pull Request has passed the checks, it may be merged into `develop` or `master`. If the
73+
commits do not follow conventional commits, a squash merge is necessary with a compliant commit
74+
message.
8075

81-
This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4, available at
82-
[http://contributor-covenant.org/version/1/4][version]
76+
### [AUTOMATIC] Deployment
8377

84-
[homepage]: http://contributor-covenant.org
85-
[version]: http://contributor-covenant.org/version/1/4/
78+
Deployment is automatically handled by Travis CI whenever changes are pushed to the `master` branch
79+
that pass the repository tests.

.vscode/launch.json

Lines changed: 14 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,32 @@
11
{
22
"version": "0.2.0",
3-
"configurations": [{
3+
"configurations": [
4+
{
5+
"type": "node",
6+
"request": "attach",
7+
"name": "Attach",
8+
},
9+
{
410
"type": "node",
511
"request": "launch",
612
"name": "Debug Project",
7-
// we test in `build` to make cleanup fast and easy
8-
"cwd": "${workspaceFolder}/dist",
13+
// we test in `dist` to make cleanup fast and easy
14+
"cwd": "${workspaceFolder}",
915
// Replace this with your project root. If there are multiple, you can
1016
// automatically run the currently visible file with: "program": ${file}"
11-
"program": "${workspaceFolder}/src/cli/cli.ts",
12-
// "args": ["--no-install"],
17+
"program": "${workspaceFolder}/bin/index.js",
18+
"args": ["-i", "in", "-o", "out", "--threads", "1"],
1319
"outFiles": ["${workspaceFolder}/dist/main/**/*.js"],
1420
"skipFiles": [
1521
"<node_internals>/**/*.js",
1622
"${workspaceFolder}/node_modules/**/*.js"
1723
],
1824
"preLaunchTask": "npm: build",
19-
"stopOnEntry": true,
25+
"stopOnEntry": false,
2026
"smartStep": true,
27+
"autoAttachChildProcesses": true,
2128
"runtimeArgs": ["--nolazy"],
22-
"env": {
23-
"TYPESCRIPT_STARTER_REPO_URL": "${workspaceFolder}"
24-
},
25-
"console": "externalTerminal"
29+
"outputCapture": "std"
2630
},
2731
{
2832
"type": "node",

CHANGELOG.md

Lines changed: 52 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,22 +7,67 @@ adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
77

88
## [Unreleased]
99

10+
## [3.0.0] - 2019.04-02
11+
12+
The third major update that involved a rewrite of the worker thread. The image export system is now
13+
more modular and customizable, making it easier to add "filters" in the future to modify image
14+
streams.
15+
16+
This update introduces BREAKING CHANGES to the manifest file and program errors.
17+
18+
### Added
19+
20+
- Image fingerprinting! Don't rely on names anymore for resolution, but on a checksum of the
21+
original image!
22+
- Temporary files when exporting, less chance of conflicts and overwriting, with negligible
23+
performance cost
24+
- Better and safer cleanup in case of failed exports
25+
- Custom file naming using template literals!
26+
- A better code-based error system
27+
- Visual Studio Code debug scripts for node `--inspect` debugging (instead of console logging)
28+
- Typescript interface exports
29+
- Code of Conduct + better contributing guide
30+
- Short file header
31+
32+
### Changed
33+
34+
- Rewrote the worker thread to use functions instead of classes, separated into more files, making
35+
the worker more modular and upgradable in the future.
36+
- The format of the manifest file
37+
- Faster immutable-based undefined value removal (`removeUndefined` replaced with
38+
`withoutUndefined`)
39+
- Major README rewrite to document the new changes
40+
- Updated dependencies
41+
42+
### Removed
43+
44+
- `WebPictureStyles.ts`, its code was already merged with the react example.
45+
46+
## [2.1.2] - 2019-03-29
47+
1048
### Fixed
1149

1250
- Forgot the `bin` field in package.json, CLI is now usable
1351

52+
## [2.1.1] - 2019-03-23
53+
54+
### Fixed
55+
56+
- WebP optimization
57+
- Typos
58+
1459
## [2.1.0] - 2019-03-23
1560

16-
`imagemin-webp` integration was scrapped as the binary seems to be buggy.
17-
The cwebp-bin would corrupt images with alpha channels, probably due to an incompatibility with `libvips`.
61+
`imagemin-webp` integration was scrapped as the binary seems to be buggy. The cwebp-bin would
62+
corrupt images with alpha channels, probably due to an incompatibility with `libvips`.
1863

1964
Instead, the quality for `libvips` WebP was reduced to match `imagemin-webp` sizes (q=70).
2065

2166
### Added
2267

2368
- Better WebP optimization
2469
- TIFF support
25-
- `convertToCodec` option, for codec conversion
70+
- `convertFormat` option, for codec conversion
2671
- `exportOriginal` option, for only WebP exports
2772
- More Typescript typings
2873
- Better error codes + documentation
@@ -144,7 +189,10 @@ not fork the project and submit a Pull Request?
144189

145190
First release
146191

147-
[unreleased]: https://github.com/marcuscemes/responsive-image-builder/compare/v2.1.0...HEAD
192+
[unreleased]: https://github.com/marcuscemes/responsive-image-builder/compare/v3.0.0...HEAD
193+
[3.0.0]: https://github.com/marcuscemes/responsive-image-builder/compare/v2.1.2...v3.0.0
194+
[2.1.2]: https://github.com/marcuscemes/responsive-image-builder/compare/v2.1.1...v2.1.2
195+
[2.1.1]: https://github.com/marcuscemes/responsive-image-builder/compare/v2.1.0...v2.1.1
148196
[2.1.0]: https://github.com/marcuscemes/responsive-image-builder/compare/v2.0.5...v2.1.0
149197
[2.0.5]: https://github.com/marcuscemes/responsive-image-builder/compare/v2.0.4...v2.0.5
150198
[2.0.4]: https://github.com/marcuscemes/responsive-image-builder/compare/v2.0.3...v2.0.4

0 commit comments

Comments
 (0)