Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rename main.css to style.css in build process #2342

Merged
merged 7 commits into from
Sep 28, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
File renamed without changes.
2 changes: 1 addition & 1 deletion dist/doc/TOC.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,4 +34,4 @@ aspects of your website/web app (e.g.: the performance, security, etc.).
* [Node.js](https://github.com/h5bp/server-configs-node)
* [Front-end Developer Interview Questions](https://github.com/h5bp/Front-end-Developer-Interview-Questions)
* [create-html5-boilerplate](https://github.com/h5bp/create-html5-boilerplate) — Quick start HTML5 Boilerplate development
* [main.css](https://github.com/h5bp/main.css) — the main.css file included with HTML5 Boilerplate
* [main.css](https://github.com/h5bp/main.css) — the main.css file included (as style.css) with HTML5 Boilerplate
10 changes: 5 additions & 5 deletions dist/doc/css.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ table of contents](TOC.md)
HTML5 Boilerplate's CSS includes:

* [Normalize.css](#normalizecss)
* [main.css](#maincss)
* [style.css](#stylecss)

## Normalize.css

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

## main.css
## style.css

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

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

These styles are included in
[main.css](https://github.com/h5bp/html5-boilerplate/blob/master/dist/css/main.css).
See the [main.css](https://github.com/h5bp/main.css) project
[documentation](https://github.com/h5bp/main.css/blob/master/README.md#features)
[style.css](https://github.com/h5bp/html5-boilerplate/blob/master/dist/css/style.css)
using [main.css](https://github.com/h5bp/main.css) project.
See the main.css [documentation](https://github.com/h5bp/main.css/blob/master/README.md#features)
for a full discussion of these styles.
4 changes: 2 additions & 2 deletions dist/doc/usage.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,8 @@ A basic HTML5 Boilerplate site initially looks something like this:
```
.
├── css
│ ├── main.css
│ └── normalize.css
│ ├── normalize.css
│ └── style.css
├── doc
├── img
├── js
Expand Down
2 changes: 1 addition & 1 deletion dist/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
<!-- Place favicon.ico in the root directory -->

<link rel="stylesheet" href="css/normalize.css">
<link rel="stylesheet" href="css/main.css">
<link rel="stylesheet" href="css/style.css">

<meta name="theme-color" content="#fafafa">
</head>
Expand Down
14 changes: 7 additions & 7 deletions dist/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion dist/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": " ",
"version": "0.0.1",
"description": "",
"keywords": "",
"keywords": [""],
"license": "",
"author": "",
"scripts": {
Expand Down
11 changes: 7 additions & 4 deletions gulpfile.babel.js
Original file line number Diff line number Diff line change
Expand Up @@ -93,14 +93,17 @@ gulp.task('copy:license', () =>
.pipe(gulp.dest(dirs.dist))
);

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

return gulp.src('node_modules/main.css/dist/main.css')
.pipe(plugins().header(banner))
.pipe(plugins().autoprefixer({
cascade: false
}))
.pipe(plugins().rename({
basename: 'style'
}))
.pipe(gulp.dest(`${dirs.dist}/css`));
});

Expand Down Expand Up @@ -128,8 +131,8 @@ gulp.task('modernizr', (done) => {
// TODO: rework this flow instead of just reacting to the fact that the jQuery step is gone
if (!fs.existsSync(`${dirs.dist}/js/vendor/`)){
fs.mkdirSync(`${dirs.dist}/js/vendor/`);
}
}

modernizr.build(modernizrConfig, (code) => {
fs.writeFile(`${dirs.dist}/js/vendor/modernizr-${pkg.devDependencies.modernizr}.min.js`, code, done);
});
Expand All @@ -152,7 +155,7 @@ gulp.task(
'copy:.htaccess',
'copy:index.html',
'copy:license',
'copy:main.css',
'copy:style',
'copy:misc',
'copy:normalize'
)
Expand Down
2 changes: 1 addition & 1 deletion src/doc/TOC.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,4 +34,4 @@ aspects of your website/web app (e.g.: the performance, security, etc.).
* [Node.js](https://github.com/h5bp/server-configs-node)
* [Front-end Developer Interview Questions](https://github.com/h5bp/Front-end-Developer-Interview-Questions)
* [create-html5-boilerplate](https://github.com/h5bp/create-html5-boilerplate) — Quick start HTML5 Boilerplate development
* [main.css](https://github.com/h5bp/main.css) — the main.css file included with HTML5 Boilerplate
* [main.css](https://github.com/h5bp/main.css) — the main.css file included (as style.css) with HTML5 Boilerplate
10 changes: 5 additions & 5 deletions src/doc/css.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ table of contents](TOC.md)
HTML5 Boilerplate's CSS includes:

* [Normalize.css](#normalizecss)
* [main.css](#maincss)
* [style.css](#stylecss)

## Normalize.css

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

## main.css
## style.css

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

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

These styles are included in
[main.css](https://github.com/h5bp/html5-boilerplate/blob/master/dist/css/main.css).
See the [main.css](https://github.com/h5bp/main.css) project
[documentation](https://github.com/h5bp/main.css/blob/master/README.md#features)
[style.css](https://github.com/h5bp/html5-boilerplate/blob/master/dist/css/style.css)
using [main.css](https://github.com/h5bp/main.css) project.
See the main.css [documentation](https://github.com/h5bp/main.css/blob/master/README.md#features)
for a full discussion of these styles.
4 changes: 2 additions & 2 deletions src/doc/usage.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,8 @@ A basic HTML5 Boilerplate site initially looks something like this:
```
.
├── css
│ ├── main.css
│ └── normalize.css
│ ├── normalize.css
│ └── style.css
├── doc
├── img
├── js
Expand Down
2 changes: 1 addition & 1 deletion src/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
<!-- Place favicon.ico in the root directory -->

<link rel="stylesheet" href="css/normalize.css">
<link rel="stylesheet" href="css/main.css">
<link rel="stylesheet" href="css/style.css">

<meta name="theme-color" content="#fafafa">
</head>
Expand Down
4 changes: 2 additions & 2 deletions test/file_content.js
Original file line number Diff line number Diff line change
Expand Up @@ -61,9 +61,9 @@ function runTests() {
checkString(path.resolve(dir, 'index.html'), string, done);
});

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

});
Expand Down
2 changes: 1 addition & 1 deletion test/file_existence.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@ const expectedFilesInDistDir = [

'css/', // for directories, a `/` character
// should be included at the end
'css/main.css',
'css/normalize.css',
'css/style.css',

'doc/',
'doc/TOC.md',
Expand Down