Socket
Socket
Sign inDemoInstall

iku

Package Overview
Dependencies
157
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 0.0.5 to 0.0.6

70

lib/commands.js

@@ -71,3 +71,3 @@ var app = require('./app'),

// Update iku components
commands.update = function(component) {
commands.update = function() {
if (app.argv.help) {

@@ -77,9 +77,12 @@ print(

'',
'iku update <component>'.cyan,
'iku update'.cyan,
'',
'The update command pulls the latest code from the server and client bootplate',
'and updates the bower components for the client. Use this command when you',
'want to retrieve the latest stable version of iku server and client code.',
'',
'Usage:'.cyan,
'Run this command from the <app_name>/src/client directory',
'Run this command from the <app_name>/src directory',
'',
' iku update --help - Print this help message',
' iku update <component> - Update the component (polymer, client, server)',
''

@@ -90,23 +93,28 @@ ].join("\n"));

// Throw error if application name doesn't exist.
if (component === undefined) {
print([
'Error: You must define a component to update.'.red,
'iku update <component>'.bold.cyan
].join("\n"));
return;
}
var topDir = process.cwd();
var conf = JSON.parse(fs.readFileSync(topDir + '/.iku').toString());
exec('git submodule update --init --recursive',
function (submodule_update_error, stdout, stderr){
if (submodule_update_error) {
print(submodule_update_error.toString().red);
return;
} else {
print(stdout.cyan);
print(stderr.red);
if (component === 'polymer') {
exec('bower update', function(err, stdout, stderr) {
print(stdout.cyan);
print(stderr.red);
if (err) {
print(err.toString().red);
return
// Submodule update worked. Update bower in client if it exists.
if (conf.client) {
exec('cd ' + topDir + '/src/client && bower update', function(err, stdout, stderr) {
print(stdout.cyan);
print(stderr.red);
if (err) {
print(err.toString().red);
return;
}
});
}
}
});
}
});
};

@@ -125,3 +133,2 @@

' iku create --help <app_name> - Print this help message',
' iku create --git <app_name> - Initialize a new git repository.',
''

@@ -142,4 +149,5 @@ ].join("\n"));

// Set name of directory
var app_dir = process.cwd() + "/" + app_name;
src_dir = app_dir + "/" + "src";
var app_dir = process.cwd() + "/" + app_name,
src_dir = app_dir + "/" + "src",
iku_conf = {};

@@ -151,3 +159,3 @@ try {

fs.mkdirSync(src_dir);
// Initialize a git repository if the flag was set.

@@ -172,2 +180,10 @@ print("Initializing Git repository".cyan);

if (app.argv.client) {
// Going to need to put this writeFile code somewhere else. Not quite sure
// how we're going to use this whole .iku file concept yet.
iku_conf.client = true;
fs.writeFile(app_dir + '/.iku', JSON.stringify(iku_conf, null, '\t'), function(err) {
if (err) { print(err.toString().red); return; }
});
print("Creating client".cyan);

@@ -197,3 +213,3 @@ exec('cd ' + src_dir + ' && git submodule add https://github.com/amdirent/iku-client-bootplate.git client', function(install_client_error) {

});
});

@@ -200,0 +216,0 @@ }

{
"name": "iku",
"description": "Build PostgresSQL backed RESTful API's quickly",
"version": "0.0.5",
"version": "0.0.6",
"dependencies": {

@@ -6,0 +6,0 @@ "flatiron": "0.4.3",

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc