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

grunt-combohtml

Package Overview
Dependencies
Maintainers
1
Versions
46
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

grunt-combohtml - npm Package Compare versions

Comparing version 0.1.0 to 0.1.1

tasks/concat.js

2

package.json
{
"name": "grunt-combohtml",
"description": "The best Grunt plugin ever.",
"version": "0.1.0",
"version": "0.1.1",
"homepage": "",

@@ -6,0 +6,0 @@ "author": {

@@ -23,2 +23,4 @@ /*

var tidy = require('./tidy');
var extract = require('./extract');
var concat = require('./concat').concat;

@@ -33,3 +35,2 @@ module.exports = function(grunt) {

var options = this.options();
console.log(options);

@@ -39,4 +40,11 @@ var that = this;

this.files.forEach(function(v,k){
console.log(v);
var p = v.src[0];
var bf = read(p);
var dirname = path.dirname(v.dest);
var filep = path.join(dirname,path.basename(v.dest,path.extname(v.dest)));
// combo后的js地址
var dest_js = filep + '.js';
// combo后的css地址
var dest_css = filep + '.css';

@@ -47,2 +55,12 @@ // 一定是utf8格式的

var result = extract.parse(chunk);
chunk = result.content;
// var js_content = concat(result.js,dest_js,v.orig.dest);
var css_content = concat(result.css,dest_css,v.orig.dest);
console.log(chunk);
console.log(css_content);
//console.log(extract.parse(chunk));
if(!(chunk instanceof Buffer)){

@@ -49,0 +67,0 @@ chunk = new Buffer(chunk);

@@ -9,3 +9,3 @@ // 'use strict';

var reg = '<!--#([a-z]+)(\\s([a-z]+)="(.+?)")* -->';
var reg = '<!--#([a-z]+)(\\s([a-z]+)=[\'"](.+?)[\'"])* -->';
var p = './xx.html';

@@ -12,0 +12,0 @@ var CTS = {};

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