grunt-combohtml
Advanced tools
Comparing version 0.1.0 to 0.1.1
{ | ||
"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 = {}; |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
40634
18
1060
5