Skip to content

Commit 0403937

Browse files
committed
Merge pull request #25 from Code-by-practice/develop
Adds CSSLint eg
2 parents 5e3929b + c7af976 commit 0403937

File tree

5 files changed

+36
-0
lines changed

5 files changed

+36
-0
lines changed

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,3 +21,4 @@
2121
|13|```webpack```|Shows how to configure jshint & JSCS loaders for JavaScript linting|
2222
|14|```webpack```|Shows how to load Handlebars templates file|
2323
|15|```webpack```|Shows how to load LESS loader|
24+
|16|```webpack```|Shows how to configure CSSLint loader for CSS linting|

codes/example-16/entry.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
require('./styles.css');

codes/example-16/index.html

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
<!DOCTYPE html>
2+
<html>
3+
<head>
4+
<meta charset="utf-8">
5+
<title>Eg16: CSSLint</title>
6+
</head>
7+
<body>
8+
<div id="container">
9+
<h1>Hello World</h1>
10+
<h2>Experiment with Webpack</h2>
11+
</div>
12+
13+
<script type="text/javascript" src="bundle.js"></script>
14+
</body>
15+
</html>

codes/example-16/styles.css

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
#container h1 {
2+
color: blue;
3+
}
4+
5+
#container h2 {
6+
color: green;
7+
}

codes/example-16/webpack.config.js

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
module.exports = {
2+
entry: './entry.js',
3+
output: {
4+
filename: 'bundle.js'
5+
},
6+
module: {
7+
loaders: [{
8+
test: /\.css$/,
9+
loader: 'style?css!csslint'
10+
}]
11+
}
12+
};

0 commit comments

Comments
 (0)