1.0.12 • Published 3 years ago

malta-umd v1.0.12

Weekly downloads
1
License
MIT
Repository
github
Last release
3 years ago

npm version npm downloads npm downloads


This plugin can be used on: .js files and even on .coffee, .ts and .jsx files after using the right plugin.

Options :
- name : the name of the module to be published
- wrap : either the code must be wrapped or not in a function(){}, default false

The code passed to the plugin should be a function that returns the object literal:

function () {
    function foo(){...}
    function foofoo(){...}
    return {foo:foo, foofoo:foofoo}
}

but if wrap:true is passed then it is expectd to be just the content of the function:

function foo(){...}
function foofoo(){...}
return {foo:foo, foofoo:foofoo}

Sample usage:

malta app/source/mod.js public -plugins=malta-umd[name:\"myMod\"]

or in the .json file :

"app/source/mod.js" : "public -plugins=malta-umd[name:\"myMod\"]"

or in a script :

var Malta = require('malta');
Malta.get().check([
    'app/source/mod.ts',
    'public',
    '-plugins=malta-babel...malta-umd[name:\"myMod\"]',
    '-options=showPath:false,watchInterval:500,verbose:0'
    ]).start(function (o) {
        var s = this;
        console.log('name : ' + o.name)
        console.log("content : \n" + o.content);
        'plugin' in o && console.log("plugin : " + o.plugin);
        console.log('=========');
    });
1.0.12

3 years ago

1.0.11

4 years ago

1.0.10

4 years ago

1.0.9

4 years ago

1.0.8

4 years ago

1.0.7

4 years ago

1.0.6

5 years ago

1.0.5

5 years ago

1.0.4

6 years ago

1.0.3

6 years ago

1.0.2

7 years ago

1.0.1

7 years ago

1.0.0

7 years ago