重构文件目录

This commit is contained in:
Vanessa 2012-07-25 14:44:12 +08:00
parent 2b434cd48d
commit 8328ae2591
14 changed files with 36 additions and 0 deletions

View File

@ -0,0 +1,36 @@
/*var jsp = require("uglify-js").parser;
var pro = require("uglify-js").uglify;
var orig_code = "... JS code here";
var ast = jsp.parse(orig_code); // parse code and get the initial AST
ast = pro.ast_mangle(ast); // get a new AST with mangled names
ast = pro.ast_squeeze(ast); // get an AST with compression optimizations
var final_code = pro.gen_code(ast); // compressed code here
// js compress
var jsPaths = ["../neoease/js/neoease.js"]*/
// css compress
var less = require('C:\\Users\\Vanessa\\AppData\\Roaming\\npm\\node_modules\\less');
var parser = new(less.Parser)({
paths: ['../*/css'], // Specify search paths for @import directives
filename: '*.less' // Specify a filename, for better error messages
});
parser.parse('.class { width: 1 + 1 }', function (e, tree) {
tree.toCSS({ compress: true }); // Minify CSS output
});
/*var cssPaths = ["../andrea/css/andrea.css", "../classic/css/classic.css",
"../community/css/community.css", "../favourite/css/favourite.css",
"../i-nove/css/i-nove.css", "../neoease/css/neoease.css",
"../owmx-3.0/css/owmx-3.0.css", "../terr-house/css/tree-house.css"];
for (var i = 0; i < cssPaths.lengtg; i++) {
}*/

View File

Before

Width:  |  Height:  |  Size: 147 KiB

After

Width:  |  Height:  |  Size: 147 KiB

View File

Before

Width:  |  Height:  |  Size: 82 KiB

After

Width:  |  Height:  |  Size: 82 KiB

View File

Before

Width:  |  Height:  |  Size: 970 KiB

After

Width:  |  Height:  |  Size: 970 KiB

View File

Before

Width:  |  Height:  |  Size: 592 KiB

After

Width:  |  Height:  |  Size: 592 KiB

View File

Before

Width:  |  Height:  |  Size: 646 KiB

After

Width:  |  Height:  |  Size: 646 KiB

View File

Before

Width:  |  Height:  |  Size: 130 KiB

After

Width:  |  Height:  |  Size: 130 KiB

View File

Before

Width:  |  Height:  |  Size: 1.2 MiB

After

Width:  |  Height:  |  Size: 1.2 MiB

View File

Before

Width:  |  Height:  |  Size: 830 KiB

After

Width:  |  Height:  |  Size: 830 KiB

View File

Before

Width:  |  Height:  |  Size: 686 KiB

After

Width:  |  Height:  |  Size: 686 KiB

View File

Before

Width:  |  Height:  |  Size: 792 KiB

After

Width:  |  Height:  |  Size: 792 KiB

View File

Before

Width:  |  Height:  |  Size: 961 KiB

After

Width:  |  Height:  |  Size: 961 KiB