Skip to content
This repository has been archived by the owner on Jun 20, 2024. It is now read-only.

Commit

Permalink
Merge pull request #1 from sergejmueller/1.1.0
Browse files Browse the repository at this point in the history
v1.1.0
  • Loading branch information
sergejmueller authored Aug 2, 2016
2 parents 4a8edfd + 4007b33 commit b21a708
Show file tree
Hide file tree
Showing 4 changed files with 40 additions and 34 deletions.
7 changes: 7 additions & 0 deletions var/www/ip2country.info/.stylelintrc.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
extends: stylelint-config-standard
rules:
indentation: 4
max-empty-lines: 2
number-leading-zero: never
rule-non-nested-empty-line-before: null
declaration-empty-line-before: null
53 changes: 25 additions & 28 deletions var/www/ip2country.info/gulpfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,11 @@ const
htmlmin = require('gulp-htmlmin'),
cleanCSS = require('gulp-clean-css'),
htmlhint = require('gulp-htmlhint'),
uglify = require('gulp-uglify'),
multipipe = require('multipipe'),
zopfli = require('gulp-zopfli'),
config = require('./config.json'),
sourcemaps = require('gulp-sourcemaps'),
stylelint = require('gulp-stylelint'),
browserSync = require('browser-sync').create();


Expand All @@ -28,8 +28,9 @@ gulp.task( 'scss:build', () => {
gulp.src( config.scss.source ),

sourcemaps.init(),
stylelint( { reporters: [ { formatter: 'string', console: true } ] } ),
sass(),
sourcemaps.write( '.', {includeContent: false, sourceRoot: config.scss.root} ),
sourcemaps.write( '.', { includeContent: false, sourceRoot: config.scss.root } ),

gulp.dest( config.css.path ),
browserSync.stream()
Expand All @@ -52,35 +53,33 @@ gulp.task( 'html:hint', () => {
).on( 'error', notify.onError() );
} );

gulp.task( 'html:inline', ['html:hint'], () => {
gulp.task( 'html:inline', [ 'html:hint' ], () => {
return multipipe(
gulp.src( config.html.source ),

inline( { base: '.', js: uglify, css: cleanCSS } ),
inline( { base: '.', css: cleanCSS } ),

gulp.dest( config.dest.path )
).on( 'error', notify.onError() );
} );

gulp.task( 'html:minify', ['html:inline'], () => {
gulp.task( 'html:minify', [ 'html:inline' ], () => {
return multipipe(
gulp.src( config.dest.path + config.html.source ),

htmlmin(
{
collapseWhitespace: true,
removeRedundantAttributes: true,
removeOptionalTags: true,
removeAttributeQuotes: true,
collapseBooleanAttributes: true
}
),
htmlmin( {
collapseWhitespace: true,
removeRedundantAttributes: true,
removeOptionalTags: true,
removeAttributeQuotes: true,
collapseBooleanAttributes: true
} ),

gulp.dest( config.dest.path )
).on( 'error', notify.onError() );
} );

gulp.task( 'html:compress', ['scss:build', 'html:minify'], () => {
gulp.task( 'html:compress', [ 'scss:build', 'html:minify' ], () => {
return multipipe(
gulp.src( config.dest.path + config.html.source ),

Expand Down Expand Up @@ -108,29 +107,27 @@ gulp.task( 'copy:files', () => {
* browserSync task
*/

gulp.task('serve', ['scss:build'], () => {
browserSync.init(
{
server: true,
port: 3001,
browser: 'google chrome'
}
);

gulp.watch( config.scss.source, ['scss:build'] );
gulp.watch( config.html.source, ['html:hint'], browserSync.reload );
gulp.task('serve', [ 'scss:build' ], () => {
browserSync.init( {
server: true,
port: 3001,
browser: 'google chrome'
} );

gulp.watch( config.scss.source, [ 'scss:build' ] );
gulp.watch( config.html.source, [ 'html:hint' ], browserSync.reload );
});


/*
* Build task
*/

gulp.task( 'build', ['scss:build', 'html:compress', 'copy:files'] );
gulp.task( 'build', [ 'scss:build', 'html:compress', 'copy:files' ] );


/*
* Default task
*/

gulp.task( 'default', ['serve'] );
gulp.task( 'default', [ 'serve' ] );
13 changes: 7 additions & 6 deletions var/www/ip2country.info/package.json
Original file line number Diff line number Diff line change
@@ -1,24 +1,25 @@
{
"name": "IP2Country",
"description": "Node.js modules for IP 2 Country project",
"version": "1.0.0",
"last-update": "30.07.2016",
"version": "1.1.0",
"last-update": "02.08.2016",
"private": true,
"repository": "sergejmueller/ip2country.info",
"devDependencies": {
"browser-sync": "^2.12.3",
"browser-sync": "^2.14.0",
"gulp": "^3.9.1",
"gulp-clean-css": "^2.0.6",
"gulp-htmlhint": "^0.3.1",
"gulp-htmlmin": "^2.0.0",
"gulp-inline": "^0.1.1",
"gulp-notify": "^2.2.0",
"gulp-sass": "^2.2.0",
"gulp-scss-lint": "^0.4.0",
"gulp-sourcemaps": "^1.6.0",
"gulp-uglify": "^1.5.3",
"gulp-stylelint": "^3.0.0",
"gulp-zopfli": "^1.0.0",
"multipipe": "^0.3.0"
"multipipe": "^0.3.0",
"stylelint": "^7.1.0",
"stylelint-config-standard": "^12.0.0"
},
"scripts": {
"test": "npm outdated"
Expand Down
1 change: 1 addition & 0 deletions var/www/ip2country.info/scss/styles.scss
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,7 @@ td {
border-bottom-left-radius: 3px;
}
}

&:last-child {
background: $color-secondary;
border-left: 1px solid $color-secondary;
Expand Down

0 comments on commit b21a708

Please sign in to comment.