Skip to content

Commit 7e67f88

Browse files
authored
Rename main.css to style.css in build process (#2342)
* Change CSS output file name to style.css * Fix test against CSS file * Update documentation after output file rename * Bump 'package.json' after running build * Documents change in 'CHANGELOG.md'
1 parent 323b497 commit 7e67f88

14 files changed

+36
-33
lines changed
File renamed without changes.

dist/doc/TOC.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -34,4 +34,4 @@ aspects of your website/web app (e.g.: the performance, security, etc.).
3434
* [Node.js](https://github.com/h5bp/server-configs-node)
3535
* [Front-end Developer Interview Questions](https://github.com/h5bp/Front-end-Developer-Interview-Questions)
3636
* [create-html5-boilerplate](https://github.com/h5bp/create-html5-boilerplate) — Quick start HTML5 Boilerplate development
37-
* [main.css](https://github.com/h5bp/main.css) — the main.css file included with HTML5 Boilerplate
37+
* [main.css](https://github.com/h5bp/main.css) — the main.css file included (as style.css) with HTML5 Boilerplate

dist/doc/css.md

+5-5
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ table of contents](TOC.md)
66
HTML5 Boilerplate's CSS includes:
77

88
* [Normalize.css](#normalizecss)
9-
* [main.css](#maincss)
9+
* [style.css](#stylecss)
1010

1111
## Normalize.css
1212

@@ -26,7 +26,7 @@ As opposed to CSS resets, Normalize.css:
2626
For more information about Normalize.css, please refer to its [project
2727
page](https://necolas.github.io/normalize.css/).
2828

29-
## main.css
29+
## style.css
3030

3131
Several base styles are included that build upon `Normalize.css`. These styles:
3232

@@ -38,7 +38,7 @@ Several base styles are included that build upon `Normalize.css`. These styles:
3838
* and more...
3939

4040
These styles are included in
41-
[main.css](https://github.com/h5bp/html5-boilerplate/blob/master/dist/css/main.css).
42-
See the [main.css](https://github.com/h5bp/main.css) project
43-
[documentation](https://github.com/h5bp/main.css/blob/master/README.md#features)
41+
[style.css](https://github.com/h5bp/html5-boilerplate/blob/master/dist/css/style.css)
42+
using [main.css](https://github.com/h5bp/main.css) project.
43+
See the main.css [documentation](https://github.com/h5bp/main.css/blob/master/README.md#features)
4444
for a full discussion of these styles.

dist/doc/usage.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,8 @@ A basic HTML5 Boilerplate site initially looks something like this:
3030
```
3131
.
3232
├── css
33-
│ ├── main.css
34-
│ └── normalize.css
33+
│ ├── normalize.css
34+
│ └── style.css
3535
├── doc
3636
├── img
3737
├── js

dist/index.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
<!-- Place favicon.ico in the root directory -->
1818

1919
<link rel="stylesheet" href="css/normalize.css">
20-
<link rel="stylesheet" href="css/main.css">
20+
<link rel="stylesheet" href="css/style.css">
2121

2222
<meta name="theme-color" content="#fafafa">
2323
</head>

dist/package-lock.json

+7-7
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"name": " ",
33
"version": "0.0.1",
44
"description": "",
5-
"keywords": "",
5+
"keywords": [""],
66
"license": "",
77
"author": "",
88
"scripts": {

gulpfile.babel.js

+7-4
Original file line numberDiff line numberDiff line change
@@ -93,14 +93,17 @@ gulp.task('copy:license', () =>
9393
.pipe(gulp.dest(dirs.dist))
9494
);
9595

96-
gulp.task('copy:main.css', () => {
96+
gulp.task('copy:style', () => {
9797
const banner = `/*! HTML5 Boilerplate v${pkg.version} | ${pkg.license} License | ${pkg.homepage} */\n\n`;
9898

9999
return gulp.src('node_modules/main.css/dist/main.css')
100100
.pipe(plugins().header(banner))
101101
.pipe(plugins().autoprefixer({
102102
cascade: false
103103
}))
104+
.pipe(plugins().rename({
105+
basename: 'style'
106+
}))
104107
.pipe(gulp.dest(`${dirs.dist}/css`));
105108
});
106109

@@ -128,8 +131,8 @@ gulp.task('modernizr', (done) => {
128131
// TODO: rework this flow instead of just reacting to the fact that the jQuery step is gone
129132
if (!fs.existsSync(`${dirs.dist}/js/vendor/`)){
130133
fs.mkdirSync(`${dirs.dist}/js/vendor/`);
131-
}
132-
134+
}
135+
133136
modernizr.build(modernizrConfig, (code) => {
134137
fs.writeFile(`${dirs.dist}/js/vendor/modernizr-${pkg.devDependencies.modernizr}.min.js`, code, done);
135138
});
@@ -152,7 +155,7 @@ gulp.task(
152155
'copy:.htaccess',
153156
'copy:index.html',
154157
'copy:license',
155-
'copy:main.css',
158+
'copy:style',
156159
'copy:misc',
157160
'copy:normalize'
158161
)

src/doc/TOC.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -34,4 +34,4 @@ aspects of your website/web app (e.g.: the performance, security, etc.).
3434
* [Node.js](https://github.com/h5bp/server-configs-node)
3535
* [Front-end Developer Interview Questions](https://github.com/h5bp/Front-end-Developer-Interview-Questions)
3636
* [create-html5-boilerplate](https://github.com/h5bp/create-html5-boilerplate) — Quick start HTML5 Boilerplate development
37-
* [main.css](https://github.com/h5bp/main.css) — the main.css file included with HTML5 Boilerplate
37+
* [main.css](https://github.com/h5bp/main.css) — the main.css file included (as style.css) with HTML5 Boilerplate

src/doc/css.md

+5-5
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ table of contents](TOC.md)
66
HTML5 Boilerplate's CSS includes:
77

88
* [Normalize.css](#normalizecss)
9-
* [main.css](#maincss)
9+
* [style.css](#stylecss)
1010

1111
## Normalize.css
1212

@@ -26,7 +26,7 @@ As opposed to CSS resets, Normalize.css:
2626
For more information about Normalize.css, please refer to its [project
2727
page](https://necolas.github.io/normalize.css/).
2828

29-
## main.css
29+
## style.css
3030

3131
Several base styles are included that build upon `Normalize.css`. These styles:
3232

@@ -38,7 +38,7 @@ Several base styles are included that build upon `Normalize.css`. These styles:
3838
* and more...
3939

4040
These styles are included in
41-
[main.css](https://github.com/h5bp/html5-boilerplate/blob/master/dist/css/main.css).
42-
See the [main.css](https://github.com/h5bp/main.css) project
43-
[documentation](https://github.com/h5bp/main.css/blob/master/README.md#features)
41+
[style.css](https://github.com/h5bp/html5-boilerplate/blob/master/dist/css/style.css)
42+
using [main.css](https://github.com/h5bp/main.css) project.
43+
See the main.css [documentation](https://github.com/h5bp/main.css/blob/master/README.md#features)
4444
for a full discussion of these styles.

src/doc/usage.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,8 @@ A basic HTML5 Boilerplate site initially looks something like this:
3030
```
3131
.
3232
├── css
33-
│ ├── main.css
34-
│ └── normalize.css
33+
│ ├── normalize.css
34+
│ └── style.css
3535
├── doc
3636
├── img
3737
├── js

src/index.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
<!-- Place favicon.ico in the root directory -->
1818

1919
<link rel="stylesheet" href="css/normalize.css">
20-
<link rel="stylesheet" href="css/main.css">
20+
<link rel="stylesheet" href="css/style.css">
2121

2222
<meta name="theme-color" content="#fafafa">
2323
</head>

test/file_content.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -61,9 +61,9 @@ function runTests() {
6161
checkString(path.resolve(dir, 'index.html'), string, done);
6262
});
6363

64-
it('"main.css" should contain a custom banner', function (done) {
64+
it('"style.css" should contain a custom banner', function (done) {
6565
const string = `/*! HTML5 Boilerplate v${pkg.version} | ${pkg.license} License | ${pkg.homepage} */\n`;
66-
checkString(path.resolve(dir, 'css/main.css'), string, done);
66+
checkString(path.resolve(dir, 'css/style.css'), string, done);
6767
});
6868

6969
});

test/file_existence.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,8 @@ const expectedFilesInDistDir = [
2323

2424
'css/', // for directories, a `/` character
2525
// should be included at the end
26-
'css/main.css',
2726
'css/normalize.css',
27+
'css/style.css',
2828

2929
'doc/',
3030
'doc/TOC.md',

0 commit comments

Comments
 (0)