20 | 压缩html中的css和js(可将link和script中的href或者src引入的文件直接压缩替换到html中) 21 |
22 |├── .gitignore ├── example ├── assets │ ├── js │ │ ├── b.js │ │ ├── a.js │ │ └── c.js │ └── css │ │ ├── b.css │ │ └── a.css ├── inlineCss.html ├── inlineJs.html ├── dist │ ├── inlineJs.html │ ├── inlineCss.html │ ├── inlineScript.html │ ├── inlineStyle.html │ └── inline.html ├── inlineScript.html ├── gulpfile.js ├── inlineStyle.html ├── inline.html └── test.js ├── .npmignore ├── .gitattributes ├── package.json ├── README.md └── index.js /.gitignore: -------------------------------------------------------------------------------- 1 | node_modules 2 | npm-debug.log 3 | .idea 4 | -------------------------------------------------------------------------------- /example/assets/js/b.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Created by Rodey on 2015/11/5. 3 | */ 4 | 5 | 6 | window.onload = function(){ 7 | 8 | console.log(SYST); 9 | 10 | }; 11 | -------------------------------------------------------------------------------- /.npmignore: -------------------------------------------------------------------------------- 1 | # Windows image file caches 2 | Thumbs.db 3 | ehthumbs.db 4 | 5 | #node js 6 | #======================================= 7 | 8 | node_modules 9 | example 10 | npm-debug.log 11 | 12 | -------------------------------------------------------------------------------- /example/assets/js/a.js: -------------------------------------------------------------------------------- 1 | ;(function(){ 2 | 3 | 'use strict'; 4 | 5 | var SYST = function(){ 6 | this.name = 'Rodey'; 7 | }; 8 | 9 | window.SYST = new SYST(); 10 | 11 | }).call(this); 12 | -------------------------------------------------------------------------------- /example/assets/js/c.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Created by Rodey on 2015/11/5. 3 | */ 4 | 5 | document.body.addEventListener('click', function(evt){ 6 | var text = document.querySelector('#content').innerHTML; 7 | alert(text); 8 | }, false); 9 | -------------------------------------------------------------------------------- /example/assets/css/b.css: -------------------------------------------------------------------------------- 1 | .app{ 2 | background-color: powderblue; 3 | font-family: "Microsoft YaHei"; 4 | font-size: 1.2em; 5 | color: #555; 6 | } 7 | .app .content{ 8 | width: 100%; 9 | height: 100%; 10 | padding: 10px 20px; 11 | } 12 | .app .content > p{ 13 | font-size: inherit; 14 | color: orange; 15 | line-height: 1.65em; 16 | } -------------------------------------------------------------------------------- /.gitattributes: -------------------------------------------------------------------------------- 1 | # Auto detect text files and perform LF normalization 2 | * text=auto 3 | 4 | # Custom for Visual Studio 5 | *.cs diff=csharp 6 | 7 | # Standard to msysgit 8 | *.doc diff=astextplain 9 | *.DOC diff=astextplain 10 | *.docx diff=astextplain 11 | *.DOCX diff=astextplain 12 | *.dot diff=astextplain 13 | *.DOT diff=astextplain 14 | *.pdf diff=astextplain 15 | *.PDF diff=astextplain 16 | *.rtf diff=astextplain 17 | *.RTF diff=astextplain 18 | -------------------------------------------------------------------------------- /example/assets/css/a.css: -------------------------------------------------------------------------------- 1 | .layout{ 2 | background-color: white; 3 | font-family: "Microsoft YaHei"; 4 | font-size: 1.2em; 5 | color: #000; 6 | } 7 | .layout .content{ 8 | width: 100%; 9 | height: 100%; 10 | padding: 0px; 11 | position: relative; 12 | } 13 | .layout .content .left{ 14 | position: absolute; 15 | left: 0; 16 | top: 0; 17 | width: 35% 18 | height: 100%; 19 | } 20 | .layout .content .right{ 21 | position: absolute; 22 | right: 0; 23 | top: 0; 24 | width: 65%; 25 | height: 100%; 26 | } -------------------------------------------------------------------------------- /example/inlineCss.html: -------------------------------------------------------------------------------- 1 | 2 | 3 |
4 |20 | 压缩html中的css和js(可将link和script中的href或者src引入的文件直接压缩替换到html中) 21 |
22 |19 | 压缩html中的css和js(可将link和script中的href或者src引入的文件直接压缩替换到html中) 20 |
21 |19 | 压缩html中的css和js(可将link和script中的href或者src引入的文件直接压缩替换到html中) 20 |
21 |20 | 压缩html中的css和js(可将link和script中的href或者src引入的文件直接压缩替换到html中) 21 |
22 |19 | 压缩html中的css和js(可将link和script中的href或者src引入的文件直接压缩替换到html中) 20 |
21 |19 | 压缩html中的css和js(可将link和script中的href或者src引入的文件直接压缩替换到html中) 20 |
21 |22 | 压缩html中的css和js(可将link和script中的href或者src引入的文件直接压缩替换到html中) 23 |
24 |44 | 压缩html中的css和js(可将link和script中的href或者src引入的文件直接压缩替换到html中) 45 |
46 |44 | 压缩html中的css和js(可将link和script中的href或者src引入的文件直接压缩替换到html中) 45 |
46 |22 | 压缩html中的css和js(可将link和script中的href或者src引入的文件直接压缩替换到html中) 23 |
24 |