Skip to content

Commit

Permalink
feat: intialize
Browse files Browse the repository at this point in the history
  • Loading branch information
afeiship committed Mar 13, 2021
1 parent 2798760 commit 85bb32e
Show file tree
Hide file tree
Showing 26 changed files with 291 additions and 339 deletions.
11 changes: 10 additions & 1 deletion .npmignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,13 @@ build
node_modules
src
docs
test
test
__tests__
.prettierrc
.editorconfig
gulpfile.js
LICENSE.txt
Rakefile
server.js
.prettierrc
.release-it.json
1 change: 1 addition & 0 deletions .npmrc
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
sass_binary_site=https://npm.taobao.org/mirrors/node-sass/
package-lock=false
27 changes: 27 additions & 0 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
{
"trailingComma": "es5",
"arrowParens": "always",
"bracketSpacing": true,
"jsxBracketSameLine": true,
"tabWidth": 2,
"semi": true,
"singleQuote": true,
"overrides": [
{
"files": "*.scss",
"options": {
"trailingComma": "none",
"tabWidth": 2,
"parser": "scss"
}
},
{
"files": "*.json",
"options": {
"trailingComma": "none",
"tabWidth": 2,
"parser": "json"
}
}
]
}
16 changes: 16 additions & 0 deletions .release-it.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{
"git": {
"requireCleanWorkingDir": false
},
"hooks": {
"after:init": [
"t2k"
],
"after:bump": [
"npm run build"
]
},
"github": {
"release": true
}
}
2 changes: 1 addition & 1 deletion LICENSE.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
The MIT License (MIT)

Copyright (c) 2016 afei <[email protected]>
Copyright (c) 2020 afei <[email protected]>

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
66 changes: 59 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,13 +1,65 @@
# webkit-sassui-line
> One pixel line for sass
# wsui-layout-fixed-sidebar
> Sassui for layout fixed sidebar.
## usage:
+ https://afeiship.github.io/webkit-sassui-line/
[![version][version-image]][version-url]
[![license][license-image]][license-url]
[![size][size-image]][size-url]
[![download][download-image]][download-url]

## installation
```shell
npm i @jswork/wsui-layout-fixed-sidebar
```

## usage
```scss
@import 'node_modules/webkit-sassui-line/dist/webkit-sassui-line.scss';
// use sass
@import '~@jswork/wsui-layout-fixed-sidebar/dist/index.scss';
// use css
@import '~@jswork/wsui-layout-fixed-sidebar/dist/style.css';


// generate your styles
.test-wsui-layout-fixed-sidebar {
@include wsui-layout-fixed-sidebar(250px);
height: 400px;
background: #eee;
.is-sidebar,
.is-main {
height: 400px;
}

> .is-sidebar {
background: lightgreen;
}
> .is-main {
background: orange;
}
}
```

```html
<div class="test-wsui-layout-fixed-sidebar is-container" data-placement="left">
<aside class="is-sidebar">Sidebar</aside>
<div class="is-main">main</div>
</div>
```

## preview
- https://afeiship.github.io/wsui-layout-fixed-sidebar/

## license
Code released under [the MIT license](https://github.com/afeiship/wsui-layout-fixed-sidebar/blob/master/LICENSE.txt).

[version-image]: https://img.shields.io/npm/v/@jswork/wsui-layout-fixed-sidebar
[version-url]: https://npmjs.org/package/@jswork/wsui-layout-fixed-sidebar

[license-image]: https://img.shields.io/npm/l/@jswork/wsui-layout-fixed-sidebar
[license-url]: https://github.com/afeiship/wsui-layout-fixed-sidebar/blob/master/LICENSE.txt

[size-image]: https://img.shields.io/bundlephobia/minzip/@jswork/wsui-layout-fixed-sidebar
[size-url]: https://github.com/afeiship/wsui-layout-fixed-sidebar/blob/master/dist/wsui-layout-fixed-sidebar.min.js

[download-image]: https://img.shields.io/npm/dm/@jswork/wsui-layout-fixed-sidebar
[download-url]: https://www.npmjs.com/package/@jswork/wsui-layout-fixed-sidebar

## resources:
+ https://github.com/afeiship/generator-webkit-sassui
29 changes: 0 additions & 29 deletions bower.json

This file was deleted.

18 changes: 0 additions & 18 deletions build/build.js

This file was deleted.

10 changes: 3 additions & 7 deletions build/clean.js
Original file line number Diff line number Diff line change
@@ -1,16 +1,12 @@
(function() {

'use strict';
var gulp = require('gulp');
var config = require('./config');
var argv = require('yargs').argv;
var $ = require('gulp-load-plugins')({
pattern: ['gulp-*', 'gulp.*', 'del']
pattern: ['gulp-*', 'gulp.*', 'del'],
});

//clean
gulp.task('clean', function() {
return $.del('dist');
});

}());
})();
30 changes: 0 additions & 30 deletions build/config.js

This file was deleted.

15 changes: 15 additions & 0 deletions build/docs.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
(function () {
'use strict';

var gulp = require('gulp');
var $ = require('gulp-load-plugins')({
pattern: ['gulp-*', 'gulp.*', 'del'],
});
//styles
gulp.task('docs', function () {
return gulp
.src('docs/style.scss')
.pipe($.sass({ outputStyle: 'expanded' }).on('error', $.sass.logError))
.pipe(gulp.dest('docs'));
});
})();
19 changes: 10 additions & 9 deletions build/styles.js
Original file line number Diff line number Diff line change
@@ -1,20 +1,21 @@
(function() {

(function () {
'use strict';

var gulp = require('gulp');
var config = require('./config');
var argv = require('yargs').argv;
var autoprefixer = require('autoprefixer');
var $ = require('gulp-load-plugins')({
pattern: ['gulp-*', 'gulp.*', 'del']
pattern: ['gulp-*', 'gulp.*', 'del', '@jswork/gulp-*'],
});

//styles
gulp.task('styles',function() {
return gulp.src('src/*.scss')
gulp.task('styles', function () {
return gulp
.src('src/*.scss')
.pipe($.jswork.pkgHeader())
.pipe(gulp.dest('dist'))
.pipe($.sass())
.pipe($.postcss([autoprefixer()]))
.pipe($.rename('style.css'))
.pipe(gulp.dest('dist'));
});

}());
})();
20 changes: 0 additions & 20 deletions build/test.js

This file was deleted.

28 changes: 28 additions & 0 deletions dist/index.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
/*!
* name: @jswork/wsui-layout-fixed-sidebar
* description: Sassui for layout fixed sidebar.
* homepage: https://github.com/afeiship/wsui-layout-fixed-sidebar
* version: 1.0.0
* date: 2021-03-13 12:20:14
* license: MIT
*/

/*wsui-layout-fixed-sidebar Start*/

@mixin wsui-layout-fixed-sidebar($in-width: 200px) {
> .is-sidebar {
width: $in-width;
position: fixed;
left: 0;
top: 0;
}

&[data-placement="left"] {
margin-left: $in-width;
}

&[data-placement="right"] {
margin-right: $in-width;
}
}
/*wsui-layout-fixed-sidebar End*/
10 changes: 10 additions & 0 deletions dist/style.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
/*!
* name: @jswork/wsui-layout-fixed-sidebar
* description: Sassui for layout fixed sidebar.
* homepage: https://github.com/afeiship/wsui-layout-fixed-sidebar
* version: 1.0.0
* date: 2021-03-13 12:20:14
* license: MIT
*/
/*wsui-layout-fixed-sidebar Start*/
/*wsui-layout-fixed-sidebar End*/
16 changes: 0 additions & 16 deletions dist/webkit-sassui-line.css

This file was deleted.

Loading

0 comments on commit 85bb32e

Please sign in to comment.