Skip to content

pissang/seajs-plugin-aop

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 

Repository files navigation

#SeaJS AOP Plugin

SeaJS的AOP插件,提供了1.3.x和2.0.0版本,能够拦截到配置中指定的模块中的方法。2.0.0版本使用了提供的define事件来实现对factory函数的拦截,老版本中是modify了全局的define函数

###配置

seajs.config({
	aspect : [{
		// Module path must be relative to basePath of sea.js
		"module" : "xxx/xxxx",
		// Use regex test to uri when fuzzy is set true
		"fuzzy" : true,
	    "methods" : [{
			"path" : "xxxx.xxx",
			// advices
			// can be array or functions
		    "after" : function(){},
		    "before" : function(){}
	    }]
    }]
})

About

AOP plugin for SeaJS

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published