@aap/flexed 中文文档教程
flexed
在线文档:https:
Install
npm install flexed --save
Stylesheet usage
//ranjanaap.github.io/flexed/docs 使用上述任一方法或针对您选择的任务运行器(gulp.js、Grunt 等),然后在您的样式表中:
@import "flexed";
gulp.js Usage
使用 gulp-sass 插件。
var gulp = require('gulp');
var sass = require('gulp-sass');
gulp.task('sass', function () {
gulp.src('path/to/input.scss')
.pipe(sass({
// includePaths: require('flexed').with('other/path', 'another/path')
// - or -
includePaths: require('flexed').includePaths
}))
.pipe(gulp.dest('path/to/output.css'));
});
Grunt Usage
Using grunt-sass
grunt-sass 任务使用 节点-sass (LibSass) 在下面,并且是推荐的 使用 Grunt 和 flexed 的方法。
示例配置:
grunt.initConfig({
sass: {
dist: {
options: {
// includePaths: require('flexed').with('other/path', 'another/path')
// - or -
includePaths: require('flexed').includePaths
},
files: {
'path/to/output.css': 'path/to/input.scss'
}
}
}
});
flexed
Online Docs: https://ranjanaap.github.io/flexed/docs
Install
npm install flexed --save
Stylesheet usage
Use either method above or for your chosen task runner (gulp.js, Grunt, etc.), then in your stylesheet:
@import "flexed";
gulp.js Usage
Using the gulp-sass plugin.
var gulp = require('gulp');
var sass = require('gulp-sass');
gulp.task('sass', function () {
gulp.src('path/to/input.scss')
.pipe(sass({
// includePaths: require('flexed').with('other/path', 'another/path')
// - or -
includePaths: require('flexed').includePaths
}))
.pipe(gulp.dest('path/to/output.css'));
});
Grunt Usage
Using grunt-sass
The grunt-sass task uses node-sass (LibSass) underneath, and is the recommended way to use Grunt with flexed.
Example config:
grunt.initConfig({
sass: {
dist: {
options: {
// includePaths: require('flexed').with('other/path', 'another/path')
// - or -
includePaths: require('flexed').includePaths
},
files: {
'path/to/output.css': 'path/to/input.scss'
}
}
}
});