forked from FullHuman/purgecss
-
Notifications
You must be signed in to change notification settings - Fork 0
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
Showing
5 changed files
with
162 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,46 @@ | ||
# Contributor Covenant Code of Conduct | ||
|
||
## Our Pledge | ||
|
||
In the interest of fostering an open and welcoming environment, we as contributors and maintainers pledge to making participation in our project and our community a harassment-free experience for everyone, regardless of age, body size, disability, ethnicity, gender identity and expression, level of experience, 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 both within project spaces and in public spaces when an individual is representing the project or its community. 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. | ||
|
||
## Enforcement | ||
|
||
Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by contacting the project team at florielfedry@gmail.com. The project team will review and investigate all complaints, and will respond in a way that it deems appropriate to the circumstances. The project team 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 [http://contributor-covenant.org/version/1/4][version] | ||
|
||
[homepage]: http://contributor-covenant.org | ||
[version]: http://contributor-covenant.org/version/1/4/ |
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,13 @@ | ||
Before you open an issue, please check if a similar issue already exists or has been closed before. | ||
|
||
### When reporting a bug, please try to include the following: | ||
- [ ] A descriptive title | ||
- [ ] An *isolated* way to reproduce the behavior (example: GitHub repository with code isolated to the issue that anyone can clone to observe the problem) | ||
- [ ] What package and version you're using, and the platform(s) you're running it on | ||
- [ ] The behavior you expect to see, and the actual behavior | ||
|
||
### When you open an issue for a feature request, please add as much detail as possible: | ||
- [ ] A descriptive title | ||
- [ ] A description of the problem you're trying to solve, including *why* you think this is a problem | ||
- [ ] An overview of the suggested solution | ||
- [ ] If the feature changes current behavior, reasons why your solution is better |
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,24 @@ | ||
## Proposed changes | ||
|
||
Describe the big picture of your changes here to communicate to the maintainers why we should accept this pull request. If it fixes a bug or resolves a feature request, be sure to link to that issue. | ||
|
||
## Types of changes | ||
|
||
What types of changes does your code introduce? | ||
_Put an `x` in the boxes that apply_ | ||
|
||
- [ ] Bugfix (non-breaking change which fixes an issue) | ||
- [ ] New feature (non-breaking change which adds functionality) | ||
- [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected) | ||
|
||
## Checklist | ||
|
||
_Put an `x` in the boxes that apply. You can also fill these out after creating the PR. If you're unsure about any of them, don't hesitate to ask. We're here to help! This is simply a reminder of what we are going to look for before merging your code._ | ||
|
||
- [ ] Lint and unit tests pass locally with my changes | ||
- [ ] I have added tests that prove my fix is effective or that my feature works | ||
- [ ] I have added necessary documentation (if appropriate) | ||
|
||
## Further comments | ||
|
||
If this is a relatively large or complex change, kick off the discussion by explaining why you chose the solution you did and what alternatives you considered, etc... |
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,41 @@ | ||
## [Code of Conduct](./.github/CODE_OF_CONDUCT.md) | ||
|
||
FullHuman has adopted the Contributor Covenant Code of Conduct for all of its | ||
project. Please read the text so that you understand how to conduct while | ||
contributing to this project. | ||
|
||
## Semantic Versioning | ||
|
||
Purgecss use [SemVer](http://semver.org/) for versioning. | ||
|
||
## Sending a Pull Request | ||
|
||
**Before submitting a pull request,** please make sure the following is done: | ||
|
||
1. Fork [the repository](https://github.com/FullHuman/purgecss) | ||
and create your branch from `master`. | ||
2. If you've added code that should be tested, add tests! | ||
3. If you've changed APIs, update the documentation. | ||
4. Ensure the test suite passes (`npm test`). | ||
4. Make sure your code lints (`npm run lint`). | ||
|
||
### Development Workflow | ||
|
||
After cloning Purgecss, run `npm i` to fetch its dependencies. Then, you can run | ||
several commands: | ||
|
||
* `npm run dev` will build cjs and es module of all PurgeCSS packages in their `lib` folder and | ||
watch for changes. | ||
* `npm run lint` checks the code style. | ||
* `npm test` runs the complete test suite. | ||
* `npm test -- --watch` runs an interactive test watcher. | ||
* `npm test <pattern>` runs tests with matching filenames. | ||
* `npm run build` creates the cjs and es module of all Purgecss packages in their `lib` folder. | ||
|
||
Make sure that your pull request contains unit tests for any new functionality. | ||
This way we can ensure that we don't break your code in the future. | ||
|
||
### License | ||
|
||
This project is licensed under the MIT License - see the [LICENSE](LICENSE) file | ||
for details. |
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,38 @@ | ||
# PurgeCSS | ||
|
||
 | ||
 | ||
 | ||
 | ||
 | ||
 | ||
 | ||
 | ||
 | ||
 | ||
|
||
<p align="center"> | ||
<img src="https://i.imgur.com/UEiUiJ0.png" height="200" width="200" alt="PurgeCSS logo"/> | ||
</p> | ||
|
||
## What is PurgeCSS? | ||
|
||
When you are building a website, chances are that you are using a css framework like Bootstrap, Materializecss, Foundation, etc... But you will only use a small set of the framework and a lot of unused css styles will be included. | ||
|
||
This is where PurgeCSS comes into play. PurgeCSS analyzes your content and your css files. Then it matches the selectors used in your files with the one in your content files. It removes unused selectors from your css, resulting in smaller css files. | ||
|
||
## Packages | ||
|
||
This repository is a monorepo that we manage using [Lerna](https://github.com/lerna/lerna). That means that we actually publish [several packages](/packages) to npm from the same codebase, including: | ||
|
||
| Package | Version | Description | | ||
| ------------------------------------------------------------ | ------- | ------------------------------------------- | | ||
| [purgecss](/packages/purgecss) | | The core of PurgeCSS | | ||
| [postcss-purgecss](/packages/postcss-purgecss) | | PostCSS plugin for PurgeCSS | | ||
| [purgecss-webpack-plugin](/packages/purgecss-webpack-plugin) | | Webpack plugin for PurgeCSS | | ||
| [gulp-purgecss](/packages/gulp-purgecss) | | Gulp plugin for PurgeCSS | | ||
| [grunt-purgecss](/packages/grunt-purgecss) | | Grunt plugin for PurgeCSS | | ||
| [purgecss-from-html](/packages/purgecss-from-html) | | Html extractor for PurgeCSS | | ||
| [purgecss-from-js](/packages/purgecss-from-js) | | Js extractor for PurgeCSS | | ||
| [purgecss-from-pug](/packages/purgecss-from-pug) | | Pug extractor for PurgeCSS | | ||
| [purgecss-with-wordpress](/packages/purgecss-with-wordpress) | | Collection of whitelist items for WordPress | |