0.0.9 • Published 9 years ago

qwerty v0.0.9

Weekly downloads
5
License
MIT
Repository
github
Last release
9 years ago

npm install qwerty -g

//_ Dir/Project -> Check Local [TREE] -> Check Global -> If [-] -> Install Local

require("qwerty").log(2);

$(["fire-inject", "steel-model"]); //_ Yep, that's all 
$("fire-inject@0.0.30").go(function() { console.log("Just Do It"); });


/*-------------------}>
>node project.js

---------------------+
Load: 2 module(s)
Dir: /web/project
---------------------+

Not found module: steel-model !

Here We Go...
[+] steel-model@0.0.33 |>

Not found module: fire-inject !

Here We Go...
[+] fire-inject@0.0.36 |>

---------------------+
Success: 2
Failed: 0
---------------------+

...
*/

Desc

  • Auto-install modules
  • Simple, global access
  • Ignored require cache

Methods of Module

$NameDescArgs
-
+createInstanceCreate new instance(isGlobal)
+newSet module(s) in Qwerty app(name string, hash, data)
+deleteDelete module(s) from Qwerty app(name string, array, hash)
-
-$Require(module string, array, hash, )
-
+strictStop the work, if has errors in the modules(v default: true)
-globalSet $ as Global Var(v default: true)
+dirProject directory (where modules)(v default: "")
+logLog level (0, 1, 2, 3)(v default: 1)
+usePackage manager(v default: "npm")
+autoInstallAuto-install of modules(v default: true)

Examples

require("qwerty").dir(__dirname + "/project");

//-----]>

$(); //_ Get all

$("moduleX"), //_ Get module "moduleX"
$("moduleClass", 3, 2, 1, <...>).func(), //_ Create object and call 'func'

$(["module1", "module2"]), //_ Get list
$({"fire-inject": "inject"}) //_ Alias

$("inject").go(function() { console.log("inject"); });

$("fire-inject@0.0.29").go(function() { console.log("inject"); });

//-----]>

{
    $.new({
        "test":     13,
        "testV1":   "X",
        "testV2":   "Y"
    });

    $.new("testClass", function() {
        this.data = 666;  console.log("test/Class:", arguments);
    });

    $("testClass").prototype.func = function() { return 69; };
}

console.log(JSON.stringify({
    "T0": $(),

    "T1": $("test"),
    "T2": $("testClass", true, 3, 2, 1).func(),

    "T3": $(["test", "testV2"]),
    "T4": $({"test": "Z-TEST"})
}, null, "\t"));


$({"fire-inject": "inject"});

$("fire-inject@0.0.36").go(function() { console.log("inject"); });
$("inject").go(function() { console.log("inject"); });

$("fire-inject@0.0.30").go(function() { console.log("inject"); });

//-------------------------]>

$.dir(__dirname + "/x/node_modules").$("ops.js"); //_ Load : First call
$.dir(__dirname).$("data.json");
$("ops.js"); //_ Return

License

MIT


@ Daeren Torn

0.0.9

9 years ago

0.0.7

9 years ago

0.0.6

9 years ago

0.0.5

9 years ago

0.0.4

9 years ago

0.0.3

9 years ago

0.0.2

9 years ago

0.0.1

9 years ago