Skip to content

Commit

Permalink
chore: update scriopts
Browse files Browse the repository at this point in the history
  • Loading branch information
afeiship committed Feb 25, 2020
1 parent 0caf186 commit 987edf1
Show file tree
Hide file tree
Showing 27 changed files with 225 additions and 269 deletions.
7 changes: 7 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,11 @@
node_modules
bower_components
coverage
npm-debug.log
yarn.lock
Gemfile.lock
yarn-error.log
package-lock.json
.DS_Store
.idea
.vscode
15 changes: 15 additions & 0 deletions .npmignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
build
node_modules
src
docs
test
__tests__
.prettierrc
.editorconfig
bower.json
Gemfile
gulpfile.js
LICENSE.txt
Rakefile
server.js
.prettierrc
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"
}
}
]
}
5 changes: 5 additions & 0 deletions Gemfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
source 'https://rubygems.org'

gem 'fileutils'
gem 'sshkit'
gem 'semver'
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 <1290657123@qq.com>
Copyright (c) 2020 afei <1290657123@qq.com>

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
20 changes: 15 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,18 @@
# webkit-sassui-layout-fixed-header
> Fixed header bar for sassui
> Fixed header bar for sassui.
## usage:
+ https://afeiship.github.io/webkit-sassui-layout-fixed-header/
## documentation
- https://afeiship.github.io/webkit-sassui-layout-fixed-header/

## resources:
+ https://github.com/afeiship/generator-webkit-sassui
## installation
```shell
npm i @feizheng/webkit-sassui-layout-fixed-header
```

## usage
```scss
@import '~@feizheng/webkit-sassui-layout-fixed-header';
```

## resources
- https://github.com/afeiship/generator-webkit-sassui
4 changes: 4 additions & 0 deletions Rakefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@

Dir["./node_modules/@feizheng/rake-*/index.rake"].each do |task|
load task
end
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.

21 changes: 21 additions & 0 deletions build/docs.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
(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() {
return gulp
.src('docs/style.scss')
.pipe(
$.sass({ outputStyle: 'expanded', includePaths }).on(
'error',
$.sass.logError
)
)
.pipe(gulp.dest('docs'));
});
})();
20 changes: 12 additions & 8 deletions build/styles.js
Original file line number Diff line number Diff line change
@@ -1,18 +1,22 @@
(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', '@feizheng/gulp-*'],
});

var { includePaths } = nx.$global;

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

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

This file was deleted.

10 changes: 10 additions & 0 deletions dist/index.css
Original file line number Diff line number Diff line change
@@ -0,0 +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
* version: 1.0.0
* date: 2020-02-25 12:27:03
* license: MIT
*/
/*webkit-sassui-layout-fixed-header Start*/
/*webkit-sassui-layout-fixed-header End*/
33 changes: 33 additions & 0 deletions dist/index.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
/*!
* name: @feizheng/webkit-sassui-layout-fixed-header
* description: Fixed header bar for sassui.
* url: https://github.com/afeiship/webkit-sassui-layout-fixed-header
* version: 1.0.0
* date: 2020-02-25 12:27:03
* license: MIT
*/

/*webkit-sassui-layout-fixed-header Start*/
@mixin webkit-sassui-layout-fixed-header($inHeight: 50px, $inGap: 10px) {
$padding-top: $inHeight + $inGap;

&[data-hasbar="true"] {
padding-top: $padding-top;
}
&[data-hasbar="false"] {
padding-top: 0;
> .is-header {
display: none;
}
}

> .is-header {
position: fixed;
height: $inHeight;
top: 0;
left: 0;
right: 0;
z-index: 2;
}
}
/*webkit-sassui-layout-fixed-header End*/
33 changes: 2 additions & 31 deletions docs/index.html
Original file line number Diff line number Diff line change
@@ -1,44 +1,15 @@
<!DOCTYPE html>
<html lang="en">

<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>webkit-sassui-layout-fixed-footer</title>
<link rel="stylesheet" href="./test.css">
<title>webkit-sassui-layout-fixed-header</title>
<link rel="stylesheet" href="./style.css">
</head>

<body>


<div class="wrapper test-webkit-sassui-layout-fixed-footer" data-hasbar=true>
<div class="header">
<span>My header</span>
<button id='btn'>Close ME</button>
</div>

<div class="div" style="height:200px; background:salmon;"></div>
<div class="div" style="height:200px; background:royalblue;"></div>
<div class="div" style="height:200px; background:saddlebrown;"></div>
<div class="div" style="height:200px; background:salmon;"></div>
<div class="div" style="height:200px; background:seagreen;"></div>
<div class="div" style="height:200px; background:sienna;"></div>
<div class="div" style="height:200px; background:salmon;"></div>
<div class="div" style="height:200px; background:skyblue;"></div>
<div class="div" style="height:200px; background:salmon;"></div>


</div>

<script>
var btn = document.querySelector('#btn');
var wrapper = document.querySelector('.wrapper');
btn.onclick = function(){
wrapper.setAttribute('data-hasbar', false);
}
</script>

</body>

</html>
13 changes: 13 additions & 0 deletions docs/style.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
/*!
* name: @feizheng/webkit-sassui-layout-fixed-header
* description: Fixed header bar for sassui.
* url: https://github.com/afeiship/webkit-sassui-layout-fixed-header
* version: 1.0.0
* date: 2020-02-25 12:27:03
* license: MIT
*/
/*webkit-sassui-layout-fixed-header Start*/
/*webkit-sassui-layout-fixed-header End*/
.test-webkit-sassui-layout-fixed-header {
border: 1px solid red;
}
5 changes: 5 additions & 0 deletions docs/style.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
@import "../dist/index.scss";

.test-webkit-sassui-layout-fixed-header{
border:1px solid red;
}
Loading

0 comments on commit 987edf1

Please sign in to comment.