Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

alpaca-sm

Package Overview
Dependencies
Maintainers
1
Versions
33
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

alpaca-sm

分析Html文件依赖的js文件和css文件

  • 1.1.10
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
8
decreased by-77.78%
Maintainers
1
Weekly downloads
 
Created
Source

alpaca-sm

针对sm公司业务定制的用于模块化解析的工具。

因公司前端业务框架的原因,前端开发不能使用市面上的模块化类库,如seajs,requireJs,modJs等。

此工具是在编译阶段,将采用commonJS规范的模块化代码,转译成闭包形式的代码。

USAGE

example

a-object.js


module.exports = {
	sayName: function(name) {
		console.log(name);;;
		var tt = '6';
	}
}

b-function.js

var aobj = require('./a-object.js');

module.exports = function(word) {
	aobj.sayName(word + 'test');
}

命令行
alp release -d ./output

output

a-object.js

window.sm = window.sm || {};
(function (sm) {
	sm.a_object_js = {
        sayName: function (name) {
            console.log(name);;
            var tt = '6';
        }
    };
}(sm));

b-function.js

window.sm = window.sm || {};
(function (sm, a_object_js) {
    var aobj = a_object_js;
    sm.b_function_js = function (word) {
        aobj.sayName(word + 'test');
    };
}(sm, sm.a_object_js));

config说明

Keywords

FAQs

Package last updated on 24 Dec 2015

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc