1.0.5 • Published 9 years ago

gulp-matrix-style v1.0.5

Weekly downloads
1
License
ISC
Repository
github
Last release
9 years ago

gulp-matrix-style

stylesheets processing of the Matrix project

使用场景

H5 单页site,viewport之间的切换速度极快,解决使用link引用样式延迟问题。

页面例子

index.hmtl

<html>
    <head>
        <link type="text/css" href="/assets/style/base.css">        
    </head>
    <body>
        <!-- main content -->
    </body>
</html>

base.css

* {margin: 0; padding: 0;}

dest/index.html

<html>
    <head>
        <style type="text/css">
            * {margin: 0; padding: 0;}
        </style>
    </head>
    <body>
        <!-- main content -->
    </body>
</html>

使用说明 gulpfile.js

var gulp = require('gulp'),
    matrixStyle = require('gulp-matrix-style');

gulp.task('default', function() {
    return gulp.src('html5/flightlizard2/matrix-schedule-detail.html')
        .pipe(matrixStyle({
            path: 'html5/flightlizard2/matrix/style/', // html文件路径
            minify: true // 压缩css
        }))
        .pipe(gulp.dest('html5/flightlizard2/buildview'));
});
1.0.5

9 years ago

1.0.4

9 years ago

1.0.3

9 years ago

1.0.0

9 years ago