I want to use requirejs optimizer just to create/define the module name for my js file.
eg : if i have a file say test.js under modules/moduleA
modules
|
|
-----moduleA
|
-----test.js
i want requirejs optimizer to create just the module name for me based on path...eg below I want requirejs optimizer to create the module name modules/moduleA/test and put inside the define present in the test.js
Eg: Before running requireJS optimizer
test.js content:
define( ["my/cart", "my/inventory"],
function(cart, inventory) {
...
}
);
After running requirejs optimizer
test.js content
define("modules/moduleA/test",
["my/cart", "my/inventory"],
function(cart, inventory) {
...
}
);
I Will take care of combining the related dependent files later by means of grunt ...but i want requirejs optimizer to visit each file and give me the module name based on path it presents.
Is this feasible?