New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

isc

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

isc

Inline Source Composer

latest
Source
npmnpm
Version
0.0.4
Version published
Maintainers
1
Created
Source

[ISC] Inline Source Composer

Compose a javascript application into one distributable file by using annotations in your code.

// main.js
(function () {
    var some_code_here;    
    /**
     * Include foo.js here.
     * @include("src/foo.js")
     * @include("src/bar.js")
     */
     console.log('And some more here...');
}());

// src/foo.js
var string = 'This is foo.js';

// src/bar.js
var bar = string.toUpperCase();

When compiled, the code looks like this:

(function () {
    var some_code_here;    
    var string = 'This is foo.js';
    var bar = string.toUpperCase();
    console.log('And some more here...');
}());

Compile the code using the command-line app:

isc <input-file> <output-file> --verbose --minify

Or use node.js:

require('./src/isc.js')({
    input   : 'in.js',  // Input file
    output  : 'out.js', // Output file
    verbose : true,     // Display verbose output?
    minify  : true      // Minify source? (only works if 'output' is also specified
});

Note; If no output file is specified, the compiled source is printed instead. Minifying the source will not work in this case. Minified source is exported as .min.js. Taking the example above, the file out.min.js would be generated.

Keywords

javascript

FAQs

Package last updated on 25 Jul 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