Permalink
Browse files

refactored file structure

  • Loading branch information...
1 parent 7ecfbce commit 4e9c5fa656d2cfd2c4642c364172ff0ba49f7e29 @warmuuh committed Feb 26, 2013
View
@@ -3,6 +3,7 @@ function MyClass (val){
this.value = val;
}
+
MyClass.prototype = {
doSomething: function( /*@Default("Default Message")*/msg, /*@Autowired("message")*/msg2, /*@Autowired*/message) {
View
@@ -9,17 +9,16 @@ var wire = require("wire");
wire({
message: "autowired",
-
myComponent: {
create: {
module: './MyClass',
args: "wired"
}
},
-
+
plugins: [
//{module: "wire/debug", trace: true},
- {module: "yaap/wire"}
+ {module: "../yaap/wire", hookRequire: require}
]
View
@@ -2,7 +2,7 @@
"name": "yaap",
"version": "0.0.1",
"description": "yaap",
- "keywords": [ "javascript" ],
+ "keywords": [ "javascript", "dependency injection", "AOP", "IOC"],
"repository": {
"type": "git",
"url": "https://github.com/warmuuh/yaap.git"
@@ -24,5 +24,6 @@
"nodeunit": "0.7.4"
},
"license": "MIT",
- "readmeFilename": "README.md"
+ "readmeFilename": "README.md",
+ "main":"./yaap"
}
@@ -3,7 +3,7 @@ module.exports = {
setUp: function (callback) {
- this.yaap = require("../../index");
+ this.yaap = require("../../yaap");
callback();
},
@@ -3,7 +3,7 @@ module.exports = {
setUp: function (callback) {
- this.yaap = require("../../index");
+ this.yaap = require("../../yaap");
callback();
},
View
@@ -1,50 +0,0 @@
-/** @license MIT License (c) copyright Peter Mucha */
-
-/**
- * yaap/wire plugin
- * wire plugin that provides annotation processing of components, e.g. @Autowired
- *
- * wire is part of the cujo.js family of libraries (http://cujojs.com/)
- *
- * Licensed under the MIT License at:
- * http://www.opensource.org/licenses/mit-license.php
- */
-(function (define) {
-define(["underscore", "../index", "./plugins/AutowireProcessor"], function ( _, yaap, autowire) {
-"use strict";
-
-
-
-
- function annotatesFacet(resolver, facet, wire) {
- var options = facet.options;
- var obj = facet.target;
- yaap.process(obj, {wire: wire});
- resolver.resolve();
- }
-
-
- return { wire$plugin: function(){
- yaap.register(autowire);
- /*return {
- facets: {
- //define annotate facet
- annotate: {
- //called at configuration-phase
- configure: annotatesFacet
- }
-
- }
- };*/
-
- return {
- initialize:annotatesFacet
- };
- }};
-
-});
-}(
- typeof define == 'function' && define.amd
- ? define
- : function (deps, factory) { module.exports = factory.apply(this, deps.map(require)); }
-));
View
@@ -0,0 +1,3 @@
+{
+ "main":"./wireplugin"
+}
View
@@ -0,0 +1,46 @@
+/** @license MIT License (c) copyright Peter Mucha */
+
+/**
+ * yaap/wire plugin
+ * wire plugin that provides annotation processing of components, e.g. @Autowired
+ *
+ * wire is part of the cujo.js family of libraries (http://cujojs.com/)
+ *
+ * Licensed under the MIT License at:
+ * http://www.opensource.org/licenses/mit-license.php
+ */
+(function(define) {
+ define(["underscore", "../yaap", "./plugins/AutowireProcessor", "wire"], function(_, yaap, autowire, wire) {
+ "use strict";
+
+
+ function annotatesFacet(resolver, facet, wire) {
+ var options = facet.options;
+ var obj = facet.target;
+ yaap.process(obj, {
+ wire: wire
+ });
+ resolver.resolve();
+ }
+
+
+
+
+
+
+ return {
+ wire$plugin: function(ready, destroyed, options) {
+
+ yaap.register(autowire);
+
+ return {
+ initialize: annotatesFacet
+ };
+ }
+ };
+
+ });
+ }(
+ typeof define == 'function' && define.amd ? define : function(deps, factory) {
+ module.exports = factory.apply(this, deps.map(require));
+ }));
@@ -58,10 +58,16 @@ var callProcessors = function(obj, fnObj, config){
+
+
+
var process = exports.process = function (obj, config){
var functions = _(obj).functions();
_(functions).each(function(f){
+
+
+
var PanPG_util=require('./parser/PanPG_util');
var es5 = require('./parser/ECMA5Parser');
@@ -81,3 +87,6 @@ var process = exports.process = function (obj, config){
});
};
+
+
+

0 comments on commit 4e9c5fa

Please sign in to comment.