How to use ronin - 10 common examples

To help you get started, we’ve selected a few ronin examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github ipfs-shipyard / ipscend / src / cli / commands / screenshot.js View on Github external
'use strict'

const Command = require('ronin').Command
const fs = require('fs')
const path = require('path')
const webshot = require('webshot')
const ipfsAPI = require('ipfs-api')
const open = require('open')
const Buffer = require('safe-buffer').Buffer

module.exports = Command.extend({
  desc: 'View or generate screenshots for your application',

  options: {
    gen: 'boolean'
  },

  run: (gen, name) => {
    let configPath

    try {
      configPath = path.resolve(process.cwd() + '/ipscend.json')
      fs.statSync(configPath)
      snapshot()
    } catch (err) {
      // console.log(err)
      console.log('Project must be initiated first, run `ipscend init`')
github Backbase / bb-cli / commands / deploy.js View on Github external
// Then we generate RequireJS conf
                // TODO: check if bower.json was changed, as speed matters here
                generateRJSConf.process().then(function(confs){
                    console.log(chalk.green('Component deploy done'));

                    if (install) {
                        restUtils.submitToPortal(baseUrl, confs, true, baseUrl);
                    }
                });
            });
        }).fail(function(err){
            console.log(chalk.red('Something went wrong, during Bower configuration read: '), err);
        });
};

var Deploy = Command.extend({
    desc: 'Deploys current module to your Backbase project',
    help: function () {
        var title = chalk.bold;
        var d = chalk.gray;
        var r = '\n  ' + title('Usage') + ': bb ' + this.name + ' [OPTIONS]';
        r += '\n\n  ' + title('Options') + ': -short, --name  ' + d('default') + ' description\n\n';
        r += '      -P,  --path \t\t' + d('/home/user/project-path') + '\t\tThe root path of your CXP project.\n';
        r += '      -I,  --install \t\t' + d('false') + '\t\t\t\tInstall component via REAST after deploy.\n';
        r += '\n';
        return r;
    },
    options: {
        path: {type: 'string', alias: 'P'},
        install: {type: 'boolean', alias: 'I'}
    },
github ipfs-shipyard / ipscend / src / commands-old / version.js View on Github external
'use strict'

const Command = require('ronin').Command

module.exports = Command.extend({
  desc: 'ipscend version',

  options: {
  },

  run: () => {
    const pkg = require('../../../package.json')
    console.log('Version: ', pkg.version)
  }
})
github ipfs-shipyard / ipscend / src / cli / commands / publish.js View on Github external
'use strict'

const Command = require('ronin').Command
const fs = require('fs')
const ipfsAPI = require('ipfs-api')
const path = require('path')

module.exports = Command.extend({
  desc: 'Publish your project',

  run: function (name) {
    let configPath
    try {
      configPath = path.resolve(process.cwd() + '/ipscend.json')
      fs.statSync(configPath)
      publish()
    } catch (err) {
      console.log('Project must be initiated first, run `ipscend init`')
    }

    function publish () {
      const config = require(configPath)
      const ipfs = ipfsAPI('localhost', '5001')
github ipfs-shipyard / ipscend / src / cli / commands / versions.js View on Github external
'use strict'

var Command = require('ronin').Command
var fs = require('fs')
var path = require('path')

module.exports = Command.extend({
  desc: 'Check each version published',

  run: function (name) {
    var configPath
    try {
      configPath = path.resolve(process.cwd() + '/ipscend.json')
      fs.statSync(configPath)
      publish()
    } catch (err) {
      console.log('Project must be initiated first, run `ipscend init`')
    }

    function publish () {
      var config = JSON.parse(fs.readFileSync(configPath))
      config.versions.forEach(function (version) {
        console.log(version.timestamp, version.hash)
github ipfs-shipyard / ipscend / src / cli / commands / init.js View on Github external
'use strict'

var Command = require('ronin').Command
var fs = require('fs')
var ask = require('asking').ask

module.exports = Command.extend({
  desc: 'Initialize a ipscend project',

  run: function (name) {
    try {
      fs.statSync(process.cwd() + '/ipscend.json')
      console.log('ipscend was already initiated on this repo')
    } catch (err) {
      bootstrap()
    }

    function bootstrap () {
      var config = {
        versions: []
      }
      console.log('This utility will walk you through creating a ipscend.json file.')
      ask('Path of your Web Application (project)?', { default: 'public' }, function (err, path) {
github Backbase / bb-cli / commands / install.js View on Github external
});
                        }
                    }
                }).fail(function(err){
                    console.log(chalk.red('Something went wrong during requirejs configuration generation: '), err);
                    console.log(err.stack);
                });
            });

    }).fail(function(err){
        console.log(chalk.red('Something went wrong, during Bower configuration read: '), err);
        console.log(err.stack);
    });
};

var Install = Command.extend({
    desc: 'Bower wrapper with post generation of requirejs',
    help: function () {
        var title = chalk.bold;
        var d = chalk.gray;
        var r = '\n  ' + title('Usage') + ': bb ' + this.name + ' [OPTIONS]';
        r += '\n\t bb ' + this.name + '  [ ..] [OPTIONS]';
        r += '\n\n\t Installs all or specified Bower dependencies, generates RequireJS configuration and uploads component model to portal on request.';
        r += '\n\t Also accepts `bower install` arguments like --save, -save-dev, --production, check `bower install -h`.';
        r += '\n\n  ' + title('Options') + ': -short, --name  ' + d('default') + ' description\n\n';
        r += '      -C,  --catalog \t\t' + d('false') + '\t\t\tUpload components to CXP via REST after install.\n';
        r += '      -v,  --verbose \t\t' + d('false') + '\t\t\tEnable verbose logging mode.\n';
        r += '           --base-url \t\t' + d('path/to/bower_comp') + '\tWeb path to bower components directory (also configurable from .bbrc).\n';
        r += '           --require-confs \t\t\t' + '\tComa seperated list of relative paths to existing require configuration (also configurable from .bbrc).\n';
        r += '\n  ' + title('Examples') + ':\n\n';
        r += '      bb install\t\t\tInstalls all Bower dependencies and runs requirejs conf generation.\n';
        r += '      bb install jquery\t\t\tInstalls jquery component and runs rjs-conf generation.\n';
github ipfs-shipyard / npm-on-ipfs / src / cli / commands / npm / publish.js View on Github external
var Command = require('ronin').Command
var rm = require('../../../index.js')
var debug = require('debug')
var log = debug('registry-mirror')
log.err = debug('registry-mirror:error')

module.exports = Command.extend({
  desc: 'Publish an IPNS record with your current npm list',

  options: {},

  run: function (name) {
    rm.registryCache.publish()
  }
})
github ipfs-shipyard / npm-on-ipfs / src / cli / commands / npm / clone.js View on Github external
'use strict'

var Command = require('ronin').Command
var debug = require('debug')
var clone = require('../../../npm-pipe-ipfs/clone')
var log = debug('registry-mirror:npm:clone')
log.err = debug('registry-mirror:npm:clone:error')

module.exports = Command.extend({
  desc: 'Clone the npm registry into your local mfs',

  run: function () {
    clone.start()
  }
})
github ipfs / js-ipfs / src / cli / commands / get.js View on Github external
'use strict'

const Command = require('ronin').Command

module.exports = Command.extend({
  desc: '',

  run: () => {}
})

ronin

Access the RONIN data platform via TypeScript.

Apache-2.0
Latest version published 1 month ago

Package Health Score

73 / 100
Full package analysis

Popular ronin functions