New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

gulp-seajs-trs

Package Overview
Dependencies
Maintainers
1
Versions
15
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

gulp-seajs-trs

An seajs transport plugin

  • 0.1.0
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
4
decreased by-73.33%
Maintainers
1
Weekly downloads
 
Created
Source

Seajs transport plugin

What's this?

This is a plugin for transport local file.

config

{
  // base path for this package
  "group": 'http://cdn.com/pkg/',
  // if you want some alias name for paths config you can set this
  "rename": 'mod_name',
  // charset 
  "charset":"utf-8",
  // use debug mode for seajs
  "debug": false,
  // current version
  "version": '1.2.1',
  // the mapfile name
  "depsFile": "map.js",
  // ignore some files also support "./**/*.tpl.js" or ["./**/*.xx"]
  "ignore":"common/lib/seed.js",
  // seajs alias config
  "alias": {
    // support dir for seajs "mod":"alias_name/mod/", or 
    "mod":"alias_name/mod",
    "zepto": "http://cdn.com/lib/zepto.js",
    "gesture": "my/ui/event/gesture.js"
  },
  // seajs paths config
  "paths": {
    'my': 'http://cdn.com/my/'
  },
  // use anonymous default is false
  // if you want an anoymous module, why you use this?
  "anonymous": false
}

Notice:

Please write code with out define.But this plugin support auto resolve define as default.

The follow example

The input


// basedir /src/
// /src/common/lib/seed.js
(function (global) {global.seajs={version:"1.1.0"};})(this);
// /src/mod/a.js
exports.name = 'a';

// /src/mod/b.js

exports.version = '1.0.0';
exports.a = require('./a.js');
exports.$ = require('zepto');
exports.gesture = require('gesture');

The output

// output

// /src/common/lib/seed.js
(function (global) {global.seajs={version:"1.1.0"};})(this);

// /src/mod/a.js
define('alias_name/mod/a.js',function (require, exports, module) {
  exports.name = 'a';
});

// /src/mod/b.js
define('alias_name/mod/b.js',['alias_name/mod/a.js','zepto','gesture'],function (require, exports, module) {
  exports.version = '1.0.0';
  exports.a = require('./a.js');
  exports.$ = require('zepto');
  exports.gesture = require('gesture');
});

// map.js
seajs.config({
  base: 'http://cdn.com/pkg/',
  alias: {
    "mod/a.js":"alias_name/mod/a.js",
    "zepto": "http://cdn.com/lib/zepto.js",
    "gesture": "my/ui/event/gesture.js"
  },
  paths:{
    'my': 'http://cdn.com/pkg/my/1.2.1',
    'alias_name': 'http://cdn.com/pkg/mod_name'
  },
  charset: "utf-8",
  debug: false
});

Keywords

FAQs

Package last updated on 23 Dec 2014

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