Skip to content

Commit

Permalink
Update markdown files to comply with standards
Browse files Browse the repository at this point in the history
Fixes #168
  • Loading branch information
Markus Oberlehner committed Apr 13, 2018
1 parent cd0ecf5 commit 1271882
Show file tree
Hide file tree
Showing 8 changed files with 113 additions and 0 deletions.
6 changes: 6 additions & 0 deletions CODE_OF_CONDUCT.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
# 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
Expand All @@ -21,19 +23,23 @@ Examples of unacceptable behavior by participants include:
- 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 [email protected]. 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
Expand Down
11 changes: 11 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
# node-sass-magic-importer

[![Patreon](https://img.shields.io/badge/patreon-donate-blue.svg)](https://www.patreon.com/maoberlehner)
[![Donate](https://img.shields.io/badge/Donate-PayPal-blue.svg)](https://paypal.me/maoberlehner)
[![Build Status](https://travis-ci.org/maoberlehner/node-sass-magic-importer.svg?branch=master)](https://travis-ci.org/maoberlehner/node-sass-magic-importer)
Expand All @@ -13,33 +14,43 @@ The node-sass-magic-importer project consists of multiple [node-sass costum impo
- `@import '[variables, mixins] from menu.scss';` imports only Sass variables (e.g. `$menu-height`) and mixins (e.g. `@mixin menu-item()`) but no selectors.

## Packages

The node-sass-magic-importer repository is managed as a [monorepo](https://medium.com/@maoberlehner/monorepos-in-the-wild-33c6eb246cb9) that is composed of many npm packages.

### [node-sass-magic-importer](https://github.com/maoberlehner/node-sass-magic-importer/tree/master/packages/node-sass-magic-importer)

The [node-sass-magic-importer package](https://github.com/maoberlehner/node-sass-magic-importer/tree/master/packages/node-sass-magic-importer) combines the functionality of all the other importers maintained in this package.

### [node-sass-selector-importer](https://github.com/maoberlehner/node-sass-magic-importer/tree/master/packages/node-sass-selector-importer)

By using the [node-sass-selector-importer](https://github.com/maoberlehner/node-sass-magic-importer/tree/master/packages/node-sass-selector-importer) it is possible to import only specific selectors from a Sass file. This enables you to take exactly the bits and pieces you really need from huge one size fits all CSS frameworks, instead of having to import the entire framework or at least some component from which you may only need one class.

### [node-sass-filter-importer](https://github.com/maoberlehner/node-sass-magic-importer/tree/master/packages/node-sass-filter-importer)

The [node-sass-filter-importer](https://github.com/maoberlehner/node-sass-magic-importer/tree/master/packages/node-sass-filter-importer) package allows you to filter certain types of nodes from a Sass file. That way it is possible to import – for example – only variables of a Sass file. Other possibilities are to only import only mixins or class selectors.

### [node-sass-glob-importer](https://github.com/maoberlehner/node-sass-magic-importer/tree/master/packages/node-sass-glob-importer)

Globbing allows pattern matching operators to be used to match multiple files at once. The [node-sass-glob-importer](https://github.com/maoberlehner/node-sass-magic-importer/tree/master/packages/node-sass-glob-importer) allows you to use glob syntax in Sass imports.

### [node-sass-once-importer](https://github.com/maoberlehner/node-sass-magic-importer/tree/master/packages/node-sass-once-importer)

The [node-sass-once-importer](https://github.com/maoberlehner/node-sass-magic-importer/tree/master/packages/node-sass-once-importer) package changes the Sass import logic to import files only once. If the same file is imported in multiple `@import` statements, this package will ignore subsequent imports of the same file.

### [node-sass-package-importer](https://github.com/maoberlehner/node-sass-magic-importer/tree/master/packages/node-sass-package-importer)

To easily import Sass files from packages inside your `node_modules` directory the [node-sass-package-importer](https://github.com/maoberlehner/node-sass-magic-importer/tree/master/packages/node-sass-package-importer) automatically resolves the paths of packages installed with npm.

## About

### Author

Markus Oberlehner
Website: https://markus.oberlehner.net
Twitter: https://twitter.com/MaOberlehner
PayPal.me: https://paypal.me/maoberlehner
Patreon: https://www.patreon.com/maoberlehner

### License

MIT
14 changes: 14 additions & 0 deletions packages/node-sass-filter-importer/README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
# node-sass-filter-importer

[![Patreon](https://img.shields.io/badge/patreon-donate-blue.svg)](https://www.patreon.com/maoberlehner)
[![Donate](https://img.shields.io/badge/Donate-PayPal-blue.svg)](https://paypal.me/maoberlehner)
[![Build Status](https://travis-ci.org/maoberlehner/node-sass-magic-importer.svg?branch=master)](https://travis-ci.org/maoberlehner/node-sass-magic-importer)
Expand All @@ -8,6 +9,7 @@
Filter certain elements from SCSS code.

## Usage

```js
const sass = require('node-sass');
const filterImporter = require('node-sass-filter-importer');
Expand Down Expand Up @@ -38,6 +40,7 @@ $variable2: 'value';
```

### Filters

- **at-rules**: `@media`, `@supports`, `@mixin`,...
- **functions**: `@function`
- **mixins**: `@mixin`
Expand All @@ -47,6 +50,7 @@ $variable2: 'value';
- **make-your-own**: Define custom filters

### Options

In the example below you can see the default configuration options.

- `customFilters`: Define custom node filters.
Expand Down Expand Up @@ -125,6 +129,7 @@ sass.render({
```

### webpack

```js
// webpack.config.js
const filterImporter = require('node-sass-filter-importer');
Expand Down Expand Up @@ -157,30 +162,39 @@ module.exports = {
```

### CLI

```bash
node-sass --importer node_modules/node-sass-filter-importer/dist/cli.js -o dist src/index.scss
```

## Upgrade from 1.x.x to 5.x.x

It is not possible anymore to set the `includePaths` option when initializing the importer. Use the [node-sass includePaths option](https://github.com/sass/node-sass#includepaths) instead.

## Why is there no 2.x, 3.x or 4.x version?

This module is maintained in [one repository](https://github.com/maoberlehner/node-sass-magic-importer) together with multiple other node-sass custom importers. The node-sass-magic-importer repository is using a [monorepo approach](https://medium.com/@maoberlehner/monorepos-in-the-wild-33c6eb246cb9) with fixed versions for all packages. The projects maintained in the node-sass-magic-importer monorepo started out as separate repositories with separate versioning, so when they were integrated into the monorepo, the versions of all projects were raised to 5.0.0 and are in sync since then.

## node-sass-magic-importer

This module is powered by [node-sass-magic-importer](https://github.com/maoberlehner/node-sass-magic-importer).

## Known issues

### Multi level filtering

Filtering goes only one level deep. This means, if you're importing a file with filtering which is importing other files, those files are not filtered but imported as is. On a technical level, there is no good solution for this problem. One possibility would be to just pass the filters to all imports in the line but this carries the risk of filtering nodes on which one of the imported files might depend and therefore break the import. I might add this as an optional feature (which can be activated on demand) in the future – let me know if you're interested in multi level filter imports.

## About

### Author

Markus Oberlehner
Website: https://markus.oberlehner.net
Twitter: https://twitter.com/MaOberlehner
PayPal.me: https://paypal.me/maoberlehner
Patreon: https://www.patreon.com/maoberlehner

### License

MIT
10 changes: 10 additions & 0 deletions packages/node-sass-glob-importer/README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
# node-sass-glob-importer

[![Patreon](https://img.shields.io/badge/patreon-donate-blue.svg)](https://www.patreon.com/maoberlehner)
[![Donate](https://img.shields.io/badge/Donate-PayPal-blue.svg)](https://paypal.me/maoberlehner)
[![Build Status](https://travis-ci.org/maoberlehner/node-sass-magic-importer.svg?branch=master)](https://travis-ci.org/maoberlehner/node-sass-magic-importer)
Expand All @@ -15,6 +16,7 @@ Globbing allows pattern matching operators to be used to match multiple files at
```

## Usage

```js
const sass = require('node-sass');
const globImporter = require('node-sass-glob-importer');
Expand All @@ -27,6 +29,7 @@ sass.render({
```

### webpack

```js
// webpack.config.js
const globImporter = require('node-sass-glob-importer');
Expand Down Expand Up @@ -59,26 +62,33 @@ module.exports = {
```

### CLI

```bash
node-sass --importer node_modules/node-sass-glob-importer/dist/cli.js -o dist src/index.scss
```

## Upgrade from 3.x.x to 5.x.x

It is not possible anymore to set the `includePaths` option when initializing the importer. Use the [node-sass includePaths option](https://github.com/sass/node-sass#includepaths) instead.

## Why is there no 4.x version?

This module is maintained in [one repository](https://github.com/maoberlehner/node-sass-magic-importer) together with multiple other node-sass custom importers. The node-sass-magic-importer repository is using a [monorepo approach](https://medium.com/@maoberlehner/monorepos-in-the-wild-33c6eb246cb9) with fixed versions for all packages. The projects maintained in the node-sass-magic-importer monorepo started out as separate repositories with separate versioning, so when they were integrated into the monorepo, the versions of all projects were raised to 5.0.0 and are in sync since then.

## node-sass-magic-importer

This module is powered by [node-sass-magic-importer](https://github.com/maoberlehner/node-sass-magic-importer).

## About

### Author

Markus Oberlehner
Website: https://markus.oberlehner.net
Twitter: https://twitter.com/MaOberlehner
PayPal.me: https://paypal.me/maoberlehner
Patreon: https://www.patreon.com/maoberlehner

### License

MIT
Loading

0 comments on commit 1271882

Please sign in to comment.