Comparing version 1.0.4 to 1.0.5
var gulp = require('gulp') | ||
var notify = require('gulp-notify') | ||
var rename = require('gulp-rename') | ||
var header = require('gulp-header') | ||
var sourcemaps = require('gulp-sourcemaps') | ||
var stylus = require('gulp-stylus') | ||
var autoprefixer = require('autoprefixer') | ||
var postcss = require('gulp-postcss') | ||
var autoprefixer = require('autoprefixer') | ||
var cssnano = require('cssnano') | ||
var nano = require('gulp-cssnano') | ||
var pkg = require('./package.json') | ||
var processors = [ | ||
autoprefixer({ | ||
browsers: [ | ||
'last 2 versions' | ||
] | ||
}), | ||
cssnano({ | ||
browsers: [ | ||
'last 2 versions' | ||
] | ||
}) | ||
] | ||
var banner = [ | ||
'/*!', | ||
' * CSSKit v<%= pkg.version %> (<%= pkg.homepage %>)', | ||
' * Licensed under the <%= pkg.license %> license', | ||
' */', | ||
''].join('\n') | ||
gulp.task('watch', function(){ | ||
gulp.watch('src/*.styl').on('change', function(event){ | ||
gulp.src('src/toolkit.styl') | ||
.pipe(sourcemaps.init()) | ||
.pipe(stylus()) | ||
.pipe(postcss(processors)) | ||
.pipe(sourcemaps.write('.')) | ||
.pipe(gulp.dest('./')) | ||
.pipe(notify({ | ||
message: "<%= file.relative %>", | ||
title: "Stylus Compile" | ||
})) | ||
console.log('[stylus Compiling]') | ||
}) | ||
}) | ||
gulp.task('default', function(){ | ||
gulp.src('src/toolkit.styl') | ||
.pipe(stylus()) | ||
.pipe(postcss(processors)) | ||
.pipe(sourcemaps.init()) | ||
.pipe(stylus().on('error', function (e) { | ||
console.error(e.message); | ||
this.emit('end'); | ||
})) | ||
.pipe(postcss([autoprefixer])) | ||
.pipe(header(banner, { pkg : pkg } )) | ||
.pipe(sourcemaps.write()) | ||
.pipe(gulp.dest('lib')) | ||
console.log('[stylus building]') | ||
.pipe(nano({ | ||
zindex: false | ||
})) | ||
.pipe(rename(function (path) { | ||
path.basename += '.min'; | ||
})) | ||
.pipe(gulp.dest('lib')) | ||
}) |
{ | ||
"name": "css-kit", | ||
"version": "1.0.4", | ||
"version": "1.0.5", | ||
"description": "CSS Toolkit", | ||
"main": "./lib/toolkit.css", | ||
"main": "./lib/toolkit.min.css", | ||
"scripts": { | ||
@@ -27,6 +27,8 @@ "clean": "rimraf ./lib", | ||
"autoprefixer": "^6.3.1", | ||
"cssnano": "^3.4.0", | ||
"gulp": "^3.9.0", | ||
"gulp-cssnano": "^2.1.2", | ||
"gulp-header": "^1.8.2", | ||
"gulp-notify": "^2.2.0", | ||
"gulp-postcss": "^6.0.1", | ||
"gulp-rename": "^1.2.2", | ||
"gulp-sourcemaps": "^1.6.0", | ||
@@ -33,0 +35,0 @@ "gulp-stylus": "^2.2.0", |
@@ -1,2 +0,2 @@ | ||
# css 工具箱 | ||
# css 工具箱 [![npm version](https://img.shields.io/npm/v/css-kit.svg)](https://www.npmjs.org/package/css-kit) | ||
一个用于快速构建 Web 界面的 CSS 工具库 | ||
@@ -16,3 +16,3 @@ - 无 reset 样式 | ||
``` | ||
or 使用 `lib` 下的目录下 toolkit.css 文件 | ||
or 使用 `lib` 下的目录下 `toolkit.css` or `toolkit.min.css` 文件 | ||
@@ -28,3 +28,2 @@ ## 文档 | ||
- [positioning](#positioning-定位浮动) | ||
- [responsive](#responsive-响应式相关) | ||
- [sizing](#sizing-宽高) | ||
@@ -268,3 +267,3 @@ - [typography](#typography-排版相关) | ||
### responsive 响应式相关 | ||
<!-- ### responsive 响应式相关 | ||
```css | ||
@@ -282,3 +281,3 @@ html { font-size: 10px } | ||
} | ||
``` | ||
``` --> | ||
@@ -285,0 +284,0 @@ |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
238725
21
3144
10
539
1