Seed({
		name : "Mold.CLI.Packages",
		dna : "cli",
		platform : "node",
		include : [
			"Mold.DNA.CLI",
		]
	},
	{
		command : "package",
		description : "Install seed from the given repository",
		parameter : {
			'-r' : {
				'description' : 'Create packages recursive.'
			}
		},
		execute : function(parameter, cli){
			var currentDir = process.cwd();
			
		}
	}
);
@@ -99,16 +99,46 @@
 A.CLI%22,%0A
+%09%09%09%22Mold.Lib.MultiLineString%22%0A
 %09%09%5D%0A%09%7D,%0A
@@ -184,46 +184,48 @@
  : %22
-Install seed from the given repository
+Creates a package in the current folder.
 %22,%0A%09
@@ -355,16 +355,40 @@
 %0A%09%09%09var 
+fs = require(%22fs%22),%0A%09%09%09%09
 currentD
@@ -409,13 +409,1130 @@
 wd()
+,%0A%09%09%09%09files = fs.readdirSync(currentDir),%0A%09%09%09%09collected = %5B%5D
 ;%0A
+%0A
 %09%09%09
+var _getMoldName = function(currentDir)%7B%0A%09%09%09%09var parts = currentDir.split(%22/%22);%0A%09%09%09%09var output = %5B%5D;%0A%09%09%09%09Mold.each(parts, function(value)%7B%0A%09%09%09%09%09if(value === %22Mold%22 %7C%7C output.length)%7B%0A%09%09%09%09%09%09output.push(value);%0A%09%09%09%09%09%7D%0A%09%09%09%09%7D);%0A%0A%09%09%09%09return output.join(%22.%22);%0A%09%09%09%7D%0A%0A%09%09%09var name = _getMoldName(currentDir);%0A%09%09%09if(!name)%7B%0A%09%09%09%09throw new Error(%22no mold path found, are you shure that the current dir is inside a mold repo?%22)%0A%09%09%09%7D%0A%09%09%09Mold.each(files, function(value)%7B%0A%09%09%09%09if(Mold.endsWith(value, %22.js%22) && !Mold.startsWith(value, '*'))%7B%0A%09%09%09%09%09//value%0A%09%09%09%09%09console.log(%22Add file to package: %22 + value);%0A%09%09%09%09%09collected.push(%22.%22 + value.replace(%22.js%22, %22%22));%0A%09%09%09%09%7D%0A%09%09%09%7D);%0A%0A%09%09%09var packageFile =%0A%09%09%09%09%09%22Seed(%7B%5Cn%22+%0A%09%09%09%09%09%22%5Ctname : '%22 + name + %22.*',%5Cn%22 +%0A%09%09%09%09%09%22%5Ctdna : 'package',%5Cn%22 +%0A%09%09%09%09%09%22%5Ctinclude : %22 + JSON.stringify(collected, null, %22%5Ct%5Ct%22) + %22%5Cn%22 +%0A%09%09%09%09%09%22%7D);%22%0A%09%09%09%0A%09%09%09fs.writeFile(%22*.js%22, packageFile, function(err) %7B%0A%09%09%09%09if(err) %7B%0A%09%09%09%09%09throw new Error(err);%0A%09%09%09%09%7D else %7B%0A%09%09%09%09%09console.log(cli.COLOR_GREEN + %22Package successfully created!%22 + cli.COLOR_RESET);%0A%09%09%09%09%7D%0A%09%09%09%7D); 
 %0A%09%09%7D

Package command completed