Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

gulp-seajs-css

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

gulp-seajs-css

css样式文件转seajs module

  • 1.0.4
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

gulp-seajs-css

把css文件包装成seajs的module

Overview

  • 自动进行压缩
  • 配置参数prefix:文件名前缀,cleanCss:压缩CSS使用的clean-css的配置

Input & Output

1、分块:

Input:

index/multi.css

/**
 * 基础样式
 * @export base
 */
body{
    background: #eee;
    color: #f02651;
    content: ''
}
/**
 * 头部
 * @export head
 * @author Homkai
 */
.page-head{
    font-size: 200%;
}

Output:

define(function(require, exports, module){
  exports.base = '<style type="text/css">body{background:#eee;color:#f02651;content:\'\'}</style>';
  exports.head = '<style type="text/css">.page-head{font-size:200%}</style>';
});

2、不分块:

Input:

index/main.css

body{
    background: #eee;
    color: #f02651;
    content: ''
}
.page-head{
    font-size: 200%;
}

Output:

define(function(require, exports, module){
  module.exports = '<style type="text/css">body{background:#eee;color:#f02651;content:\'\'}.page-head{font-size:200%}</style>';
});

FAQs

Package last updated on 28 Jan 2016

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc