Skip to content

Commit cc77835

Browse files
committed
Merge branch 'master' of github.com:raphaelfabeni/css-loader
2 parents 44d1afb + e24af3e commit cc77835

File tree

4 files changed

+2310
-1322
lines changed

4 files changed

+2310
-1322
lines changed

README.md

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -387,17 +387,15 @@ This loader differs from the other because we have to pass an attribute to it, a
387387
## Contributing
388388

389389
1. Clone this repository.
390-
2. `yarn install` and `yarn serve`
391-
3. Open => `http://localhost:3000` (if it didn't open automatically)
390+
2. Run `yarn install` and `yarn start`
391+
3. Open `http://localhost:3000`.
392392
4. Make your magic contribution.
393-
4.1. Choose a special name for your loader (`loaders-name-you-want`) and add to `loaders.json`.
394-
4.2. Creates the example file inside the `examples` folder (uses the loader name you chose). You can copy one of the examples and make the necessary changes.
395-
4.3. Creates the `.sass` files. The first one inside `src` folder which is the root style file for the loader and it will import the other files. And the other one, inside `loaders` folder with the specific style for the loader (both must have the same name you chose - _loader-name-you-chose_).
393+
* Choose a special name for your loader (`loaders-name-you-want`) and add to `loaders.json`.
394+
* Create the example file inside the `examples` folder (uses the loader name you chose). You can copy one of the examples and make the necessary changes.
395+
* Create the `.sass` files. The first one inside `src` folder which is the root style file for the loader and it will import the other files. And the other one, inside `loaders` folder with the specific style for the loader (both must have the same name you chose - _loader-name-you-chose_).
396396
5. Run `yarn build` to create/update the dist files.
397397
6. Open a _PR_ with a new branch describing your changes. <o/
398398

399-
## Browser Support
400-
401399
All examples use CSS _animation_ which is supported by [most current browsers](http://caniuse.com/#search=animation).
402400

403401
| <img src="https://raw.githubusercontent.com/alrra/browser-logos/master/src/chrome/chrome_128x128.png" width="48px" height="48px" alt="Chrome logo"> | <img src="https://github.com/alrra/browser-logos/blob/master/src/firefox/firefox_128x128.png?raw=true" width="48px" height="48px" alt="Firefox logo"> | <img src="https://cdnjs.cloudflare.com/ajax/libs/browser-logos/40.2.1/archive/internet-explorer_9-11/internet-explorer_9-11_128x128.png" width="48px" height="48px" alt="Internet Explorer logo"> | <img src="https://github.com/alrra/browser-logos/blob/master/src/opera/opera_128x128.png?raw=true" width="48px" height="48px" alt="Opera logo"> | <img src="https://github.com/alrra/browser-logos/blob/master/src/safari/safari_128x128.png?raw=true" width="48px" height="48px" alt="Safari logo"> | <img src="https://github.com/alrra/browser-logos/blob/master/src/android/android_128x128.png?raw=true" width="48px" height="48px" alt="Android Browser Logo" >

package.json

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,22 +6,22 @@
66
"main": "index.js",
77
"scripts": {
88
"build": "rimraf dist && webpack && rimraf dist/*.js",
9-
"serve": "webpack-dev-server"
9+
"start": "webpack-dev-server --mode=development"
1010
},
1111
"author": "Raphael Fabeni",
1212
"license": "MIT",
13-
"dependencies": {},
1413
"devDependencies": {
1514
"css-loader": "^0.28.5",
16-
"extract-text-webpack-plugin": "^3.0.0",
15+
"mini-css-extract-plugin": "^0.5.0",
1716
"node-sass": "^4.5.3",
1817
"rimraf": "^2.6.1",
1918
"sass-lint": "^1.8.0",
2019
"sass-loader": "^6.0.6",
21-
"sasslint-webpack-plugin": "^1.0.4",
2220
"style-loader": "^0.18.2",
23-
"webpack": "^3.5.5",
24-
"webpack-dev-server": "^2.7.1",
21+
"stylelint-webpack-plugin": "^0.10.5",
22+
"webpack": "^4.29.0",
23+
"webpack-cli": "^3.2.1",
24+
"webpack-dev-server": "^3.1.14",
2525
"webpack-livereload-plugin": "^0.11.0"
2626
}
2727
}

webpack.config.js

Lines changed: 9 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
const ExtractTextPlugin = require('extract-text-webpack-plugin')
1+
const MiniCssExtractPlugin = require("mini-css-extract-plugin");
22
const LiveReloadPlugin = require('webpack-livereload-plugin')
3-
const SassLintPlugin = require('sasslint-webpack-plugin')
3+
// const StyleLintPlugin = require('stylelint-webpack-plugin');
44
const path = require('path')
55
const loaders = require('./loaders.json').loaders
66

@@ -25,24 +25,17 @@ module.exports = {
2525
rules: [
2626
{
2727
test: /\.sass$/,
28-
use: ExtractTextPlugin.extract({
29-
fallback: 'style-loader',
30-
use: [
31-
{ loader: 'css-loader', options: { minimize: true } },
32-
{ loader: 'sass-loader' }
33-
]
34-
})
28+
use: [
29+
MiniCssExtractPlugin.loader,
30+
{ loader: 'css-loader', options: { minimize: true } },
31+
'sass-loader',
32+
]
3533
}
3634
]
3735
},
3836
plugins: [
39-
new SassLintPlugin({
40-
configFile: '.sass-lint.yml',
41-
glob: 'src/**/*.s?(a|c)ss',
42-
failOnWarning: true,
43-
failOnError: true
44-
}),
45-
new ExtractTextPlugin('[name].css'),
37+
// new StyleLintPlugin(options),
38+
new MiniCssExtractPlugin('[name].css'),
4639
new LiveReloadPlugin()
4740
],
4841
devServer: {

0 commit comments

Comments
 (0)