Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
ccd6782
Complete rewritten of the library
lokesh-coder Oct 17, 2017
78fabe8
added new animation
lokesh-coder Oct 18, 2017
d770bb2
added license
lokesh-coder Oct 18, 2017
3c3f583
updated
lokesh-coder Oct 18, 2017
0ff7961
autoprefixer config updated to prefix only last 2 versions and browse…
lokesh-coder Oct 18, 2017
2f5461d
border radius set to 0 by default
lokesh-coder Oct 18, 2017
e7d0d6e
variable name fix
lokesh-coder Oct 18, 2017
4b49c5a
Added header and rearranged imports
lokesh-coder Oct 18, 2017
d3dbfd4
Adding latest build files
lokesh-coder Oct 18, 2017
3a1ed16
Bug fixes
lokesh-coder Oct 19, 2017
6c3aa71
ci build set up updated
lokesh-coder Oct 21, 2017
ff72035
typo and api change
lokesh-coder Oct 21, 2017
faac1f4
changed class name prefix from '--' to 'p-'
lokesh-coder Oct 21, 2017
721fda9
removed custom import build
lokesh-coder Oct 21, 2017
ef0d7b7
Typo and badges
lokesh-coder Oct 21, 2017
b5079b6
code syntax formatting
lokesh-coder Oct 21, 2017
b299340
more info link
lokesh-coder Oct 21, 2017
acc52bb
Deleting preview in favour of gif
lokesh-coder Oct 21, 2017
5233fb9
some styles
lokesh-coder Oct 21, 2017
9c96fd8
styles updated
lokesh-coder Oct 21, 2017
4266d0e
markup syntax fix
lokesh-coder Oct 21, 2017
2c870c5
added badge link
lokesh-coder Oct 21, 2017
b8a28a1
Added preview gif
lokesh-coder Oct 21, 2017
402c9a9
preview gif updated
lokesh-coder Oct 21, 2017
d2b18be
added important for print media
lokesh-coder Oct 21, 2017
62f6fdf
typo and grammer fix
lokesh-coder Oct 21, 2017
a439b0c
switch fix
lokesh-coder Oct 21, 2017
43cdd55
build changes
lokesh-coder Oct 21, 2017
56200a8
refactor
lokesh-coder Oct 21, 2017
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
30 changes: 28 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,29 @@
node_modules/
test/
# Node
node_modules
npm-debug.log
package-lock.json
.npmrc

# Yarn
yarn-error.log
yarn.lock

# JetBrains
.idea/

# VS Code
.vscode/
.history

# Windows
Thumbs.db
Desktop.ini

# Mac
.DS_Store

# Temporary files
coverage/
docs
tmp
test
3 changes: 3 additions & 0 deletions .stylelintrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"extends": "stylelint-config-recommended-scss"
}
33 changes: 33 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
sudo: required
dist: trusty
language: node_js
node_js:
- node
cache:
yarn: true
notifications:
email: false
before_install:
- echo "//registry.npmjs.org/:_authToken=\${NPM_TOKEN}" > .npmrc
before_script:
- export DISPLAY=:99.0
- sh -e /etc/init.d/xvfb start
- sleep 3
- git remote rm origin
- git remote add origin https://${GH_TOKEN}@github.com/lokesh-coder/hug.css.git
- 'if [ ${TRAVIS_PULL_REQUEST} = "false" ]; then
git fetch && git checkout master;
git config push.default current;
fi'
after_success:
- 'if [ ${TRAVIS_PULL_REQUEST} = "false" ]; then
npm run ci;
npm run release;
npm publish --access=public;
npm run log;
fi'

branches:
only:
- staging
- /^greenkeeper/.*$/
101 changes: 82 additions & 19 deletions Gulpfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,47 +3,110 @@ var browserSync = require('browser-sync');
var sass = require('gulp-sass');
var rename = require('gulp-rename');
var autoprefixer = require('gulp-autoprefixer');
var sourcemaps = require('gulp-sourcemaps');
var headerComment = require('gulp-header-comment');
const gulpStylelint = require('gulp-stylelint');
var stylefmt = require('gulp-stylefmt');
let cleanCSS = require('gulp-clean-css');
var gulpSequence = require('gulp-sequence')
var del = require('del');
var reload = browserSync.reload;

module.exports = gulp;

gulp.task('browser-sync', function() {
/* BROWSER SYNC */

gulp.task('browser-sync', function () {
browserSync({
port: 3040,
server: {
baseDir: "./",
directory: true
}
},
https: true
});
});

gulp.task('sass', function() {
gulp.task('browser-sync-reload', function () {
browserSync.reload();
});

/* LIST SCSS */
gulp.task('lint:scss', function() {
return gulp
.src('src/**/*.scss')
.pipe(gulpStylelint({
reporters: [
{ formatter: 'string', console: true }
]
}));
});


/* COMPILE SCSS */
gulp.task('compile:scss', function () {
return gulp.src('src/**/*.scss')
.pipe(sourcemaps.init())
.pipe(sass({
outputStyle: 'expanded'
})
.on('error', sass.logError))
.on('error', sass.logError))
.pipe(autoprefixer({
browsers: ['> 5%','last 2 versions'],
cascade: false
browsers: ['> 5%', 'last 4 versions'],
cascade: false
}))
.pipe(gulp.dest('src/'))
.pipe(sass({
outputStyle: 'compressed'
}))
.pipe(rename({
suffix: '.min'
}))
.pipe(gulp.dest('src/'))
.pipe(sourcemaps.write('./maps'))
.pipe(gulp.dest('dist'))
.pipe(browserSync.reload({
stream: true
}));
});

gulp.task('bs-reload', function() {
browserSync.reload();
/* FORMAT CSS */

gulp.task('format:css', function () {
return gulp.src('dist/*.css')
.pipe(stylefmt())
.pipe(gulp.dest('dist'));
})

/* CLEAN DIST */
gulp.task('clean:dist', function () {
return del(['dist']);
});

gulp.task('default', ['sass', 'browser-sync'], function() {
gulp.watch("src/**/*.scss", ['sass', 'bs-reload']);
});
/* MINIFY CSS */
gulp.task('minify:css', () => {
return gulp.src('dist/*.css')
.pipe(cleanCSS({ compatibility: 'ie9' }))
.pipe(rename({
suffix: '.min'
}))
.pipe(gulp.dest('dist'));
});

/* SET HEADER */

gulp.task('set:header', function () {
return gulp.src('dist/*.css')
.pipe(headerComment(`
pretty-checkbox.css

A pure CSS library to beautify checkbox and radio buttons.

Source: <%= pkg.repository.link %>
Demo: <%= pkg.homepage %>

Copyright (c) <%= moment().format('YYYY') %> <%= _.capitalize(pkg.author) %>
`))
.pipe(gulp.dest('dist'))
});

gulp.task('build', function (cb) {
gulpSequence('lint:scss', 'clean:dist', 'compile:scss', 'format:css', 'minify:css', 'set:header', cb)
});


gulp.task('default', ['compile:scss', 'browser-sync'], function () {
gulp.watch("src/**/*.scss", ['compile:scss', 'browser-sync-reload']);
});
9 changes: 9 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
The MIT License (MIT)

Copyright (c) 2017 Lokesh Rajendran

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
Loading