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

nativeloop

Package Overview
Dependencies
Maintainers
3
Versions
48
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

nativeloop - npm Package Compare versions

Comparing version 0.0.1-beta.2 to 0.0.1-beta.3

45

commands/create.js

@@ -16,2 +16,3 @@ 'use strict';

const figures = require('figures');
const findit = require('findit');

@@ -149,5 +150,3 @@ // debug logger

debug("looking for tiapp.xml in: " + root);
var finder = require('findit')(root);
var path = require('path');
var finder = findit(root);
finder.on('file', function(file, stat) {

@@ -193,3 +192,3 @@ var filepath = path.parse(file);

return fs.removeAsync(temp_directory)
//.then(() => spinner.succeed())
.then(() => spinner.succeed())
.catch(err => {

@@ -230,9 +229,14 @@ spinner.fail();

.then(exists => {
spinner.succeed();
debug("pathExists.sync(source): " + exists);
if (exists) {
spinner.succeed();
return source;
} else {
debug("installing template to: " + project_directory);
spinner.start("Installing template to temp directory");
spinner.text += chalk.gray(" [skipped]");
spinner.stopAndPersist(chalk.gray(figures.cross));
spinner.column += 4;
spinner.stopAndPersist(figures.pointerSmall, chalk.gray("Local template not found."));
spinner.column -= 4;
debug("installing remote template to: " + project_directory);
spinner.start("Installing remote template to temp directory");
return npm.install([argv.template, "--ignore-scripts", "--global-style"], {

@@ -243,7 +247,20 @@ cwd: temp_directory,

.then(() => {
spinner.succeed();
spinner.start("Examining template");
var first = _.first(fs.readdirSync(nodeModulesDir));
spinner.succeed();
return path.join(nodeModulesDir, first);
return new Promise((resolve, reject) => {
spinner.succeed();
spinner.start("Examining template");
var finder = findit(nodeModulesDir);
finder.on('file', function(file, stat) {
var filepath = path.parse(file);
if (_.includes(["package.json", "template.json"]), filepath.base) {
spinner.succeed();
resolve(filepath.dir);
finder.stop();
}
});
});
// var first = _.first(fs.readdirSync(nodeModulesDir));
// spinner.succeed();
// return path.join(nodeModulesDir, first);
});

@@ -277,2 +294,3 @@ }

})
.then(() => fs.removeAsync(path.join(project_directory, "template.json")))
.then(() => spinner.succeed());

@@ -299,2 +317,3 @@ }

})
.then(() => fs.removeAsync(path.join(project_directory, "template.md")))
.then(() => spinner.succeed())

@@ -338,3 +357,3 @@ }

spinner.start("Installing npm dependencies");
npm.install({
return npm.install({
cwd: project_directory,

@@ -341,0 +360,0 @@ silent: true,

{
"name": "nativeloop",
"version": "0.0.1-beta.2",
"version": "0.0.1-beta.3",
"description": "command-line interface for building {nativeloop} mobile apps",

@@ -5,0 +5,0 @@ "keywords": [],

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