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

fis-scaffold-kernel

Package Overview
Dependencies
Maintainers
3
Versions
27
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

fis-scaffold-kernel

fis-scaffold-kernel

  • 0.0.17
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
202
increased by40.28%
Maintainers
3
Weekly downloads
 
Created
Source

fis-scaffold-kernel

INSTALL

$ npm install fis-scaffold-kernel --save

API

var options = {
    type: 'github', //default `lights`; support github,gitlab,lights
    log: {
        writer: stdout, //default `stdout`
        level: 0 //default show all log; set `0` == silent.
    }
}
var scaffold = new (require('fis-scaffold-kernel'))(options);
scaffold.download(id, cb)

download a component from the repos(github, gitlab, lights)

scaffold.download('xiangshouding/glob.js@master', function (err, temp_path) {
    //balabalabala...
});
scaffold.prompt(schema, cb)

https://github.com/flatiron/prompt

scaffold.prompt([{name: 'test'}], function (err, result) {
    //...
});
scaffold.deliver(from, to, roadmap)

deliver all files from from to to

scaffold.deliver('./from', './to', [
    {
        reg: '*.js',
        release: 'js/$&'
    }, {
        reg: '**',
        release: false
    }
]);
scaffold.release(id, to, schema, roadmap, cb)
scaffold.release(
    'xiangshouding/glob.js@master',
    __dirname + '/output',
    [],
    [
        {
            reg: '*glob.js',
            release: 'glob/$&'
        },
        {
            reg: '*',
            release: false
        }
    ],
    function (err) {
        console.log(err);
    }
);

or

new replacer

scaffold.release(
    'xiangshouding/glob.js@master',
    __dirname + '/output',
    function (tmp_path, done) {
        var files = scaffold.util.find(tmp_path);
        scaffold.prompt([{name: 'glob'}], function (err, results) {
            if (err) {
                //if
                    //done()
                //else
                    //scaffold.deliver(tmp_path, to, roadmap);
                return;
            }
            
            //replace...
            //if
                //done()
            //else
                //scaffold.deliver(tmp_path, to, roadmap);
        });
    },
    [
        {
            reg: '*glob.js',
            release: 'glob/$&'
        },
        {
            reg: '*',
            release: false
        }
    ],
    function (err) {
        console.log(err);
    }
);

Keywords

FAQs

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