-
Notifications
You must be signed in to change notification settings - Fork 27
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #4 from SassNinja/feature/groups-option
groups option
- Loading branch information
Showing
13 changed files
with
158 additions
and
21 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
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
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
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
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 |
---|---|---|
@@ -1,5 +1,6 @@ | ||
|
||
module.exports = { | ||
'only-javascript-output': require('./webpack/only-javascript-output'), | ||
'external-css-output': require('./webpack/external-css-output') | ||
'external-css-output': require('./webpack/external-css-output'), | ||
'groups-option-output': require('./webpack/groups-option-output') | ||
}; |
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
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
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 @@ | ||
|
||
const path = require('path'); | ||
const MiniCssExtractPlugin = require('mini-css-extract-plugin'); | ||
const MediaQueryPlugin = require('../../../src'); | ||
|
||
module.exports = { | ||
mode: 'development', | ||
devtool: 'none', | ||
entry: { | ||
app: './test/data/app.js' | ||
}, | ||
output: { | ||
filename: '[name].js', | ||
path: path.resolve(__dirname, `../../output/groups-option-output`) | ||
}, | ||
module: { | ||
rules: [ | ||
{ | ||
test: /\.scss$/, | ||
use: [ | ||
MiniCssExtractPlugin.loader, | ||
'css-loader', | ||
MediaQueryPlugin.loader, | ||
'sass-loader' | ||
] | ||
} | ||
] | ||
}, | ||
plugins: [ | ||
new MiniCssExtractPlugin({ | ||
filename: '[name].css' | ||
}), | ||
new MediaQueryPlugin({ | ||
include: true, | ||
queries: { | ||
'print, screen and (max-width: 60em)': 'desktop' | ||
}, | ||
groups: { | ||
app: ['exampleA', 'exampleB'] | ||
} | ||
}) | ||
], | ||
stats: { | ||
children: false | ||
} | ||
}; |
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
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,4 @@ | ||
|
||
// testing groups option | ||
import './exampleA.scss'; | ||
import './exampleB.scss'; |
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,8 @@ | ||
.foo { | ||
color: red; | ||
} | ||
@media print, screen and (max-width: 60em) { | ||
.foo { | ||
color: green; | ||
} | ||
} |
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,8 @@ | ||
.bar { | ||
font-size: 1rem; | ||
} | ||
@media print, screen and (max-width: 60em) { | ||
.bar { | ||
font-size: 2rem; | ||
} | ||
} |
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