diff --git a/.npmignore b/.npmignore index 23d658c..b01b71b 100644 --- a/.npmignore +++ b/.npmignore @@ -6,10 +6,9 @@ test __tests__ .prettierrc .editorconfig -bower.json -Gemfile gulpfile.js LICENSE.txt Rakefile server.js .prettierrc +.release-it.json diff --git a/.release-it.json b/.release-it.json new file mode 100644 index 0000000..378d578 --- /dev/null +++ b/.release-it.json @@ -0,0 +1,16 @@ +{ + "git": { + "requireCleanWorkingDir": false + }, + "hooks": { + "after:init": [ + "t2k" + ], + "after:bump": [ + "npm run build" + ] + }, + "github": { + "release": true + } +} diff --git a/Gemfile b/Gemfile deleted file mode 100644 index 2b5ea5a..0000000 --- a/Gemfile +++ /dev/null @@ -1,5 +0,0 @@ -source 'https://rubygems.org' - -gem 'fileutils' -gem 'sshkit' -gem 'semver' diff --git a/README.md b/README.md index addb001..d618c62 100644 --- a/README.md +++ b/README.md @@ -1,18 +1,37 @@ -# webkit-sassui-layout-fixed-header -> Fixed header bar for sassui. +# wsui-layout-fixed-header +> Fixed header bar for wsui. -## documentation -- https://afeiship.github.io/webkit-sassui-layout-fixed-header/ +[![version][version-image]][version-url] +[![license][license-image]][license-url] +[![size][size-image]][size-url] +[![download][download-image]][download-url] ## installation ```shell -npm i @feizheng/webkit-sassui-layout-fixed-header +npm i @jswork/wsui-layout-fixed-header ``` ## usage ```scss -@import '~@feizheng/webkit-sassui-layout-fixed-header'; +@import '~@jswork/wsui-layout-fixed-header'; + +// header-height: 50px; +// gap: 10px; +@include wsui-layout-fixed-header($in-height: 50px, $in-gap: 10px); ``` -## resources -- https://github.com/afeiship/generator-webkit-sassui +## license +Code released under [the MIT license](https://github.com/afeiship/wsui-layout-fixed-header/blob/master/LICENSE.txt). + +[version-image]: https://img.shields.io/npm/v/@jswork/wsui-layout-fixed-header +[version-url]: https://npmjs.org/package/@jswork/wsui-layout-fixed-header + +[license-image]: https://img.shields.io/npm/l/@jswork/wsui-layout-fixed-header +[license-url]: https://github.com/afeiship/wsui-layout-fixed-header/blob/master/LICENSE.txt + +[size-image]: https://img.shields.io/bundlephobia/minzip/@jswork/wsui-layout-fixed-header +[size-url]: https://github.com/afeiship/wsui-layout-fixed-header/blob/master/dist/wsui-layout-fixed-header.min.js + +[download-image]: https://img.shields.io/npm/dm/@jswork/wsui-layout-fixed-header +[download-url]: https://www.npmjs.com/package/@jswork/wsui-layout-fixed-header + diff --git a/Rakefile b/Rakefile deleted file mode 100644 index 178e979..0000000 --- a/Rakefile +++ /dev/null @@ -1,4 +0,0 @@ - -Dir["./node_modules/@feizheng/rake-*/index.rake"].each do |task| - load task -end diff --git a/build/docs.js b/build/docs.js index a432cd8..bab026b 100644 --- a/build/docs.js +++ b/build/docs.js @@ -1,21 +1,15 @@ -(function() { +(function () { 'use strict'; var gulp = require('gulp'); var $ = require('gulp-load-plugins')({ pattern: ['gulp-*', 'gulp.*', 'del'], }); - var { includePaths } = nx.$global; //styles - gulp.task('docs', function() { + gulp.task('docs', function () { return gulp .src('docs/style.scss') - .pipe( - $.sass({ outputStyle: 'expanded', includePaths }).on( - 'error', - $.sass.logError - ) - ) + .pipe($.sass({ outputStyle: 'expanded' }).on('error', $.sass.logError)) .pipe(gulp.dest('docs')); }); })(); diff --git a/build/styles.js b/build/styles.js index 5ca9c7b..840184b 100644 --- a/build/styles.js +++ b/build/styles.js @@ -1,21 +1,19 @@ -(function() { +(function () { 'use strict'; var gulp = require('gulp'); var autoprefixer = require('autoprefixer'); var $ = require('gulp-load-plugins')({ - pattern: ['gulp-*', 'gulp.*', 'del', '@feizheng/gulp-*'], + pattern: ['gulp-*', 'gulp.*', 'del', '@jswork/gulp-*'], }); - var { includePaths } = nx.$global; - //styles - gulp.task('styles', function() { + gulp.task('styles', function () { return gulp .src('src/*.scss') - .pipe($.feizheng.pkgHeader()) + .pipe($.jswork.pkgHeader()) .pipe(gulp.dest('dist')) - .pipe($.sass({ includePaths })) + .pipe($.sass()) .pipe($.postcss([autoprefixer()])) .pipe(gulp.dest('dist')); }); diff --git a/dist/index.css b/dist/index.css index 16dad38..345a9d3 100644 --- a/dist/index.css +++ b/dist/index.css @@ -1,10 +1,10 @@ /*! - * name: @feizheng/webkit-sassui-layout-fixed-header - * description: Fixed header bar for sassui. - * url: https://github.com/afeiship/webkit-sassui-layout-fixed-header + * name: @jswork/wsui-layout-fixed-header + * description: Fixed header bar for wsui. + * homepage: https://github.com/afeiship/wsui-layout-fixed-header * version: 1.0.0 - * date: 2020-02-25 12:34:49 + * date: 2020-12-18 21:40:57 * license: MIT */ -/*webkit-sassui-layout-fixed-header Start*/ -/*webkit-sassui-layout-fixed-header End*/ +/*wsui-layout-fixed-header Start*/ +/*wsui-layout-fixed-header End*/ diff --git a/dist/index.scss b/dist/index.scss index e491ee0..9174687 100644 --- a/dist/index.scss +++ b/dist/index.scss @@ -1,19 +1,24 @@ /*! - * name: @feizheng/webkit-sassui-layout-fixed-header - * description: Fixed header bar for sassui. - * url: https://github.com/afeiship/webkit-sassui-layout-fixed-header + * name: @jswork/wsui-layout-fixed-header + * description: Fixed header bar for wsui. + * homepage: https://github.com/afeiship/wsui-layout-fixed-header * version: 1.0.0 - * date: 2020-02-25 12:34:49 + * date: 2020-12-18 21:40:57 * license: MIT */ -/*webkit-sassui-layout-fixed-header Start*/ -@mixin webkit-sassui-layout-fixed-header($inHeight: 50px, $inGap: 10px) { - $padding-top: $inHeight + $inGap; +/*wsui-layout-fixed-header Start*/ +$wsui-layout-fixed-header-options: ( + color: #f00, +) !default; + +@mixin wsui-layout-fixed-header($in-height: 50px, $in-gap: 10px) { + $padding-top: $in-height + $in-gap; &[data-hasbar="true"] { padding-top: $padding-top; } + &[data-hasbar="false"] { padding-top: 0; > .is-header { @@ -23,11 +28,11 @@ > .is-header { position: fixed; - height: $inHeight; + height: $in-height; top: 0; left: 0; right: 0; z-index: 2; } } -/*webkit-sassui-layout-fixed-header End*/ +/*wsui-layout-fixed-header End*/ diff --git a/docs/index.html b/docs/index.html index 91483b8..8f6d5aa 100644 --- a/docs/index.html +++ b/docs/index.html @@ -1,44 +1,40 @@ - - webkit-sassui-layout-fixed-footer + wsui-layout-fixed-header - - -