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

Added minified version with gulp and removed duplicate html styling #12

Closed
wants to merge 1 commit into from
Closed
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
Added minified version with gulp and removed duplicate html styling
  • Loading branch information
ixahmedxi committed Feb 8, 2018
commit 589d427ff5f5b79de1de11a682ec77773f0954b4
18 changes: 18 additions & 0 deletions gulpfile.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
const gulp = require('gulp');
const plumber = require('gulp-plumber');
const cleanCss = require('gulp-clean-css');
const rename = require('gulp-rename');

gulp.task('cleancss', () => {
return (
gulp.src('./modern-normalize.css')
.pipe(plumber())
.pipe(cleanCss())
.pipe(rename('modern-normalize.min.css'))
.pipe(gulp.dest('./'))
);
});

gulp.task('default', () => {
gulp.watch('./modern-normalize.css', ['cleancss']);
});
12 changes: 3 additions & 9 deletions modern-normalize.css
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,13 @@
========================================================================== */

/**
* Use a better box model (opinionated).
* 1. Use a better box model (opinionated).
* 2. Correct the line height in all browsers.
*/

html {
box-sizing: border-box;
line-height: 1.15;
}

*,
Expand All @@ -17,14 +19,6 @@ html {
box-sizing: inherit;
}

/**
* Correct the line height in all browsers.
*/

html {
line-height: 1.15;
}

/* Sections
========================================================================== */

Expand Down
1 change: 1 addition & 0 deletions modern-normalize.min.css

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

8 changes: 7 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,9 @@
"node": ">=6"
},
"scripts": {
"test": "stylelint modern-normalize.css"
"test": "stylelint modern-normalize.css",
"minify": "gulp cleancss",
"watch-minify": "gulp"
},
"files": [
"modern-normalize.css"
Expand All @@ -28,6 +30,10 @@
"style"
],
"devDependencies": {
"gulp": "^3.9.1",
"gulp-clean-css": "^3.9.2",
"gulp-plumber": "^1.2.0",
"gulp-rename": "^1.2.2",
"stylelint": "^8.4.0",
"stylelint-config-xo": "^0.5.1"
},
Expand Down