Skip to content

Commit

Permalink
Update the way the browsers are set. (#7)
Browse files Browse the repository at this point in the history
Update the way the browsers are set.
  • Loading branch information
Kai Eichinger authored Jun 4, 2019
2 parents 5b79623 + a229ffa commit 4f15b99
Show file tree
Hide file tree
Showing 5 changed files with 32 additions and 8 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
3.0
===

* The `browserList` config was removed.


2.1
===

Expand Down
19 changes: 18 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,22 @@ Kaba SCSS

Kaba SCSS is a wrapper around a SCSS compiler, including convenience functions that are used by Kaba.


**[Read the docs at becklyn.tech](https://becklyn.tech/oss/kaba-scss).**


Setting the Browserlist Config
------------------------------

First install the package:

```bash
npm i @becklyn/browserslist-config
```

Then activate it in your project's `package.json`:

```json
"browserslist": [
"extends @becklyn/browserslist-config"
]
```
9 changes: 7 additions & 2 deletions UPGRADE.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
Upgrade from 1.x to 2.0
=======================
2.x to 3.0
==========

* The `browserList` option was removed. Use the becklyn package instead (see the README for details).

1.x to 2.0
==========

* The option keys of the constructor have changed:
* `isDebug` -> now: `debug`
Expand Down
4 changes: 1 addition & 3 deletions src/Compiler.ts
Original file line number Diff line number Diff line change
Expand Up @@ -50,9 +50,7 @@ export class Compiler
this.logger = logger;
this.stylelintConfigFile = path.join(__dirname, "../.stylelintrc.yml");
this.postProcessor = postcss([
require("autoprefixer")({
browsers: this.options.browserList,
}),
require("autoprefixer")(),
require("postcss-reporter")({
clearReportedMessages: true,
}),
Expand Down
2 changes: 0 additions & 2 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ export interface KabaScssOptions
lint: boolean;
fix: boolean;
cwd: string;
browserList: string[];
}

export interface CompilationEntry
Expand Down Expand Up @@ -54,7 +53,6 @@ export class KabaScss
lint: false,
fix: false,
cwd: process.cwd(),
browserList: ["last 2 versions", "IE 11"],
}, options) as KabaScssOptions;

this.logger = logger || new PrefixedLogger(bgMagenta(white(" SCSS ")), this.options.cwd);
Expand Down

0 comments on commit 4f15b99

Please sign in to comment.