Skip to content

Extract CSS to css file/files #6

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from

Conversation

michalkvasnicak
Copy link
Owner

  • accumulate imported styles
  • save accumulated styles to single css file or multiple css files

According to #5

themouette pushed a commit to themouette/babel-plugin-css-modules-transform that referenced this pull request Aug 1, 2016
Fixes michalkvasnicak#5
Replaces michalkvasnicak#6

It is helpful to release a library that uses css-modules.

To combine all css files in a single file, give its name:

```
{
    "plugins": [
        [
            "css-modules-transform", {
                "extractCss": "./dist/stylesheets/combined.css"
            }
        ]
    ]
}
```

To extract all files in a single directory, give an object:

```
{
    "plugins": [
        [
            "css-modules-transform", {
                "extractCss": {
                    dir: "./dist/stylesheets/",
                    relativeRoot: "./src/",
                    filename: "[path]/[name].css"
                }
            }
        ]
    ]
}
```
themouette pushed a commit to themouette/babel-plugin-css-modules-transform that referenced this pull request Aug 1, 2016
Fixes michalkvasnicak#5
Replaces michalkvasnicak#6

It is helpful to release a library that uses css-modules.

To combine all css files in a single file, give its name:

```
{
    "plugins": [
        [
            "css-modules-transform", {
                "extractCss": "./dist/stylesheets/combined.css"
            }
        ]
    ]
}
```

To extract all files in a single directory, give an object:

```
{
    "plugins": [
        [
            "css-modules-transform", {
                "extractCss": {
                    dir: "./dist/stylesheets/",
                    relativeRoot: "./src/",
                    filename: "[path]/[name].css"
                }
            }
        ]
    ]
}
```
themouette pushed a commit to themouette/babel-plugin-css-modules-transform that referenced this pull request Aug 1, 2016
Fixes michalkvasnicak#5
Replaces michalkvasnicak#6

It is helpful to release a library that uses css-modules.

To combine all css files in a single file, give its name:

```
{
    "plugins": [
        [
            "css-modules-transform", {
                "extractCss": "./dist/stylesheets/combined.css"
            }
        ]
    ]
}
```

To extract all files in a single directory, give an object:

```
{
    "plugins": [
        [
            "css-modules-transform", {
                "extractCss": {
                    dir: "./dist/stylesheets/",
                    relativeRoot: "./src/",
                    filename: "[path]/[name].css"
                }
            }
        ]
    ]
}
```
themouette pushed a commit to themouette/babel-plugin-css-modules-transform that referenced this pull request Aug 1, 2016
Fixes michalkvasnicak#5
Replaces michalkvasnicak#6

It is helpful to release a library that uses css-modules.

To combine all css files in a single file, give its name:

```
{
    "plugins": [
        [
            "css-modules-transform", {
                "extractCss": "./dist/stylesheets/combined.css"
            }
        ]
    ]
}
```

To extract all files in a single directory, give an object:

```
{
    "plugins": [
        [
            "css-modules-transform", {
                "extractCss": {
                    dir: "./dist/stylesheets/",
                    relativeRoot: "./src/",
                    filename: "[path]/[name].css"
                }
            }
        ]
    ]
}
```
themouette pushed a commit to themouette/babel-plugin-css-modules-transform that referenced this pull request Aug 1, 2016
Fixes michalkvasnicak#5
Replaces michalkvasnicak#6

It is helpful to release a library that uses css-modules.

To combine all css files in a single file, give its name:

```
{
    "plugins": [
        [
            "css-modules-transform", {
                "extractCss": "./dist/stylesheets/combined.css"
            }
        ]
    ]
}
```

To extract all files in a single directory, give an object:

```
{
    "plugins": [
        [
            "css-modules-transform", {
                "extractCss": {
                    dir: "./dist/stylesheets/",
                    relativeRoot: "./src/",
                    filename: "[path]/[name].css"
                }
            }
        ]
    ]
}
```
themouette pushed a commit to themouette/babel-plugin-css-modules-transform that referenced this pull request Aug 2, 2016
Fixes michalkvasnicak#5
Replaces michalkvasnicak#6

It is helpful to release a library that uses css-modules.

To combine all css files in a single file, give its name:

```
{
    "plugins": [
        [
            "css-modules-transform", {
                "extractCss": "./dist/stylesheets/combined.css"
            }
        ]
    ]
}
```

To extract all files in a single directory, give an object:

```
{
    "plugins": [
        [
            "css-modules-transform", {
                "extractCss": {
                    dir: "./dist/stylesheets/",
                    relativeRoot: "./src/",
                    filename: "[path]/[name].css"
                }
            }
        ]
    ]
}
```
themouette pushed a commit to themouette/babel-plugin-css-modules-transform that referenced this pull request Aug 2, 2016
Fixes michalkvasnicak#5
Replaces michalkvasnicak#6

It is helpful to release a library that uses css-modules.

To combine all css files in a single file, give its name:

```
{
    "plugins": [
        [
            "css-modules-transform", {
                "extractCss": "./dist/stylesheets/combined.css"
            }
        ]
    ]
}
```

To extract all files in a single directory, give an object:

```
{
    "plugins": [
        [
            "css-modules-transform", {
                "extractCss": {
                    dir: "./dist/stylesheets/",
                    relativeRoot: "./src/",
                    filename: "[path]/[name].css"
                }
            }
        ]
    ]
}
```
@michalkvasnicak
Copy link
Owner Author

Closed in favour #16

@michalkvasnicak michalkvasnicak deleted the extract-css-to-file branch September 2, 2016 11:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant