2.9.0 • Published 8 years ago

tpack-autoprefixer v2.9.0

Weekly downloads
7
License
MIT
Repository
github
Last release
8 years ago

tpack-autoprefixer

TPack 插件:使用 AutoPrefixer 追加 CSS 属性前缀。

如果您还需要使用 PostCSS 提供的其它功能,建议使用 tpack-postcss 插件。

安装

$ npm install tpack-autoprefixer -g

使用

追加 CSS 属性前缀

tpack.src("*.css").pipe(tpack.plugin("tpack-autoprefixer"));

源映射(Source Map)

本插件可生成源映射,具体用法见 源映射

配置

tpack.src("*.css").pipe(tpack.plugin("tpack-autoprefixer"), {
	browsers: [], 	    // 支持的浏览器列表。如 [">5%"]。具体见[浏览器列表](https://github.com/ai/browserslist#queries)
	cascade: true, 	    // 如果 CSS 未压缩,则使用 Visual Cascade。
	add: true, 		    // 是否追加前缀。
	remove: true, 	    // 是否删除过期的前缀。
	supports: true,     // 是否为 @supports 参数追加前缀。
	flexbox: true, 	    // 可以是布尔或字符串。是否追加 flexbox 属性前缀。如果设置为 "no-2009" 表示只为最终 IE 版本规范追加。
	grid: true, 	    // 是否在列布局属性中追加 IE 前缀。
	stats: null, 	    // 自定义浏览器使用率。
	from: "",			// 源文件路径。[1]
	to: "",				// 目标文件路径。[1]
	map: null,			// 是否生成源映射。具体见 [map](https://github.com/postcss/postcss/blob/master/docs/source-maps.md)。[1]
	parser: null,		// 自定义 CSS 解析器。如 [SCSS](https://github.com/postcss/postcss-scss)。
	stringifier: null,	// 自定义 CSS 生成器。如 [Midas](https://github.com/ben-eb/midas)。
	syntax: null,		// 同时包含 parser 和 stringifier 的 JSON 对象。
});

1: 插件内部已重设了此配置的默认值。

另参考 https://github.com/postcss/autoprefixer

2.9.0

8 years ago

1.1.2

9 years ago

1.1.1

9 years ago

1.1.0

9 years ago

1.0.1

9 years ago