mirror of
https://github.com/Mayccoll/Gogh.git
synced 2023-08-10 21:12:46 +03:00
HTML minify implementation 👨💻 👨💻
This commit is contained in:
parent
59eebf646e
commit
671da5ce6f
@ -3,10 +3,25 @@ permalink: /index.html
|
|||||||
---
|
---
|
||||||
|
|
||||||
# Gogh
|
# Gogh
|
||||||
|
|
||||||
|
## DEV Website
|
||||||
|
|
||||||
|
### Pre:
|
||||||
|
|
||||||
|
- Gulp
|
||||||
|
- node
|
||||||
|
- npm
|
||||||
|
|
||||||
|
## Start:
|
||||||
|
|
||||||
|
- Run `npm install`. This will install all dependencies the project needs.
|
||||||
|
- Run `gulp dev` and start coding .
|
||||||
|
|
||||||
----
|
----
|
||||||
|
|
||||||
To push changes into gh-pages
|
To push changes into gh-pages
|
||||||
|
|
||||||
```
|
```bash
|
||||||
$ git subtree push --prefix gh-pages origin gh-pages
|
$ git subtree push --prefix gh-pages origin gh-pages
|
||||||
```
|
```
|
||||||
|
|
||||||
|
4
gh-pages/css/main.min.css
vendored
4
gh-pages/css/main.min.css
vendored
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@ -1,8 +1,20 @@
|
|||||||
'use strict';
|
'use strict';
|
||||||
|
|
||||||
const gulp = require('gulp');
|
const gulp = require('gulp');
|
||||||
|
|
||||||
const browserSync = require('browser-sync').create();
|
const htmlmin = require('gulp-htmlmin');
|
||||||
|
const inlinesource = require('gulp-inline-source');
|
||||||
|
const rename = require("gulp-rename");
|
||||||
|
const browserSync = require('browser-sync').create();
|
||||||
|
|
||||||
|
|
||||||
|
gulp.task('minify', () => {
|
||||||
|
return gulp.src('./*.src.html')
|
||||||
|
.pipe(inlinesource())
|
||||||
|
.pipe(htmlmin({ collapseWhitespace: true }))
|
||||||
|
.pipe(rename("index.html"))
|
||||||
|
.pipe(gulp.dest('./'));
|
||||||
|
});
|
||||||
|
|
||||||
gulp.task('serve', function () {
|
gulp.task('serve', function () {
|
||||||
browserSync.init({
|
browserSync.init({
|
||||||
@ -23,7 +35,7 @@ gulp.task('reload', function (done) {
|
|||||||
});
|
});
|
||||||
|
|
||||||
gulp.task('watch', ['serve'], function () {
|
gulp.task('watch', ['serve'], function () {
|
||||||
gulp.watch('./**/*', { interval: 800 }, ['reload']);
|
gulp.watch(['./**/*', '!./index.html'], { interval: 800 }, ['minify', 'reload']);
|
||||||
});
|
});
|
||||||
|
|
||||||
gulp.task('default', ['watch']);
|
gulp.task('default', ['watch']);
|
||||||
|
1267
gh-pages/index.html
1267
gh-pages/index.html
File diff suppressed because one or more lines are too long
1266
gh-pages/index.src.html
Normal file
1266
gh-pages/index.src.html
Normal file
File diff suppressed because it is too large
Load Diff
@ -13,6 +13,9 @@
|
|||||||
"dependencies": {
|
"dependencies": {
|
||||||
"browser-sync": "^2.24.7",
|
"browser-sync": "^2.24.7",
|
||||||
"compass-mixins": "^0.12.10",
|
"compass-mixins": "^0.12.10",
|
||||||
"gulp": "^3.9.1"
|
"gulp": "^3.9.1",
|
||||||
|
"gulp-htmlmin": "^5.0.1",
|
||||||
|
"gulp-inline-source": "^4.0.0",
|
||||||
|
"gulp-rename": "^1.4.0"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -398,6 +398,7 @@ a {
|
|||||||
|
|
||||||
li {
|
li {
|
||||||
margin-bottom : 1.6em;
|
margin-bottom : 1.6em;
|
||||||
|
margin-right : 2em;
|
||||||
-webkit-box-shadow: 0 1px 4px rgba(0, 0, 0, 0.1);
|
-webkit-box-shadow: 0 1px 4px rgba(0, 0, 0, 0.1);
|
||||||
box-shadow : 0 1px 4px rgba(0, 0, 0, 0.1);
|
box-shadow : 0 1px 4px rgba(0, 0, 0, 0.1);
|
||||||
display : none;
|
display : none;
|
||||||
|
Loading…
Reference in New Issue
Block a user