Skip to content

Commit

Permalink
chore: update scripts
Browse files Browse the repository at this point in the history
  • Loading branch information
afeiship committed Feb 17, 2020
1 parent 5588847 commit 2830d04
Show file tree
Hide file tree
Showing 27 changed files with 196 additions and 201 deletions.
Empty file modified .editorconfig
100644 → 100755
Empty file.
3 changes: 3 additions & 0 deletions .gitignore
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@ 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
Empty file modified .npmrc
100644 → 100755
Empty file.
25 changes: 6 additions & 19 deletions .prettierrc
100644 → 100755
Original file line number Diff line number Diff line change
@@ -1,35 +1,22 @@
{
"trailingComma": "none",
"trailingComma": "es5",
"arrowParens": "always",
"printWidth": 100,
"bracketSpacing": true,
"jsxBracketSameLine": true,
"tabWidth": 2,
"semi": true,
"singleQuote": true,
"overrides": [
{
"files": ["*.json", ".eslintrc", ".tslintrc", ".prettierrc", ".tern-project"],
"files": "*.scss",
"options": {
"parser": "json",
"tabWidth": 2
}
},
{
"files": "*.{css,sass,scss,less}",
"options": {
"parser": "postcss",
"tabWidth": 2
}
},
{
"files": "*.ts",
"options": {
"parser": "typescript"
"trailingComma": "none",
"tabWidth": 2,
"parser": "scss"
}
},
{
"files": "*.md",
"files": "*.json",
"options": {
"trailingComma": "none",
"tabWidth": 2,
Expand Down
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
100644 → 100755
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
16 changes: 11 additions & 5 deletions README.md
100644 → 100755
Original file line number Diff line number Diff line change
@@ -1,12 +1,18 @@
# webkit-sassui-frame-wrapper
> Webkit sass ui module media wrapper.
## documentation
- https://afeiship.github.io/webkit-sassui-frame-wrapper/

## installation
```shell
npm i @feizheng/webkit-sassui-frame-wrapper
```

## usage
```html
<div class="frame-wrapper av1">
<img src="https://ss0.bdstatic.com/5aV1bjqh_Q23odCf/static/superman/img/logo/bd_logo1_31bdc765.png" alt="">
</div>
```scss
@import '~@feizheng/webkit-sassui-frame-wrapper';
```

## resources
+ http://www.zhangxinxu.com/study/201503/css3-object-fit.html
- 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
20 changes: 0 additions & 20 deletions bower.json

This file was deleted.

10 changes: 3 additions & 7 deletions build/clean.js
100644 → 100755
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.

16 changes: 16 additions & 0 deletions build/docs.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
(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'));
});
})();
27 changes: 13 additions & 14 deletions build/styles.js
100644 → 100755
Original file line number Diff line number Diff line change
@@ -1,21 +1,20 @@
(function() {
"use strict";
'use strict';

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

gulp.task("styles", function() {
//styles
gulp.task('styles', function() {
return gulp
.src("src/*.scss")
.pipe(gulp.dest("dist"))
.pipe($.sass({ outputStyle: "expanded" }).on("error", $.sass.logError))
.pipe(gulp.dest("dist"))
.pipe($.sass({ outputStyle: "compressed" }).on("error", $.sass.logError))
.pipe($.rename({ extname: ".min.css" }))
.pipe(gulp.dest("dist"));
.src('src/*.scss')
.pipe($.feizheng.pkgHeader())
.pipe(gulp.dest('dist'))
.pipe($.sass())
.pipe($.postcss([autoprefixer()]))
.pipe(gulp.dest('dist'));
});
})();
45 changes: 45 additions & 0 deletions dist/index.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
/*!
* name: @feizheng/webkit-sassui-frame-wrapper
* description: Webkit sass ui module media wrapper.
* url: https://github.com/afeiship/webkit-sassui-frame-wrapper
* version: 1.0.0
* date: 2020-02-17 15:23:33
* license: MIT
*/
/*webkit-sassui-frame-wrapper Start*/
/* flex-align start*/
/* flex-align end*/
/* flex-direction start*/
/* flex-direction end*/
/* object-fit start*/
/* object-fit end*/
/* text-align start*/
/* vertical-align end*/
/* vertical-align start*/
/* vertical-align end*/
.webkit-sassui-frame-wrapper {
position: relative;
overflow: hidden;
display: inline-block; }
.webkit-sassui-frame-wrapper > img {
-o-object-fit: cover;
object-fit: cover;
width: 100%;
height: 100%; }
.webkit-sassui-frame-wrapper[data-object-fit="contain"] > img {
-o-object-fit: contain;
object-fit: contain; }
.webkit-sassui-frame-wrapper[data-object-fit="cover"] > img {
-o-object-fit: cover;
object-fit: cover; }
.webkit-sassui-frame-wrapper[data-object-fit="fill"] > img {
-o-object-fit: fill;
object-fit: fill; }
.webkit-sassui-frame-wrapper[data-object-fit="inherit"] > img {
-o-object-fit: inherit;
object-fit: inherit; }
.webkit-sassui-frame-wrapper[data-object-fit="none"] > img {
-o-object-fit: none;
object-fit: none; }

/*webkit-sassui-frame-wrapper End*/
11 changes: 10 additions & 1 deletion src/webkit-sassui-frame-wrapper.scss → dist/index.scss
100644 → 100755
Original file line number Diff line number Diff line change
@@ -1,5 +1,14 @@
/*!
* name: @feizheng/webkit-sassui-frame-wrapper
* description: Webkit sass ui module media wrapper.
* url: https://github.com/afeiship/webkit-sassui-frame-wrapper
* version: 1.0.0
* date: 2020-02-17 15:23:33
* license: MIT
*/

/*webkit-sassui-frame-wrapper Start*/
@import "node_modules/webkit-sass-default-props/dist/webkit-sass-default-props.scss";
@import "node_modules/@feizheng/webkit-sass-default-props/dist/index.scss";

.webkit-sassui-frame-wrapper {
position: relative;
Expand Down
1 change: 0 additions & 1 deletion dist/webkit-sassui-frame-wrapper.min.css

This file was deleted.

15 changes: 15 additions & 0 deletions docs/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +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-frame-wrapper</title>
<link rel="stylesheet" href="./style.css">
</head>

<body>

</body>

</html>
11 changes: 11 additions & 0 deletions dist/webkit-sassui-frame-wrapper.css → docs/style.css
100644 → 100755
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
/*!
* name: @feizheng/webkit-sassui-frame-wrapper
* description: Webkit sass ui module media wrapper.
* url: https://github.com/afeiship/webkit-sassui-frame-wrapper
* version: 1.0.0
* date: 2020-02-17 15:23:33
* license: MIT
*/
/*webkit-sassui-frame-wrapper Start*/
/* flex-align start*/
/* flex-align end*/
Expand Down Expand Up @@ -42,3 +50,6 @@
}

/*webkit-sassui-frame-wrapper End*/
.test-webkit-sassui-frame-wrapper {
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-frame-wrapper{
border:1px solid red;
}
10 changes: 3 additions & 7 deletions gulpfile.js
100644 → 100755
Original file line number Diff line number Diff line change
@@ -1,21 +1,17 @@
(function() {

'use strict';

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

//import
fs.readdirSync('./build').map(function(file) {
require('./build/' + file);
});


gulp.task('default', gulp.series(['clean', 'styles']));

}());
gulp.task('default', gulp.series(['clean', 'styles', 'docs']));
})();
Loading

0 comments on commit 2830d04

Please sign in to comment.