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

create-interval-app

Package Overview
Dependencies
Maintainers
1
Versions
14
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

create-interval-app - npm Package Compare versions

Comparing version 0.1.0 to 0.1.1

33

dist/index.js

@@ -21,27 +21,2 @@ "use strict";

const TEMPLATES = ['basic', 'refund-user-tutorial'];
function child(cmd, args, options) {
return new Promise((resolve, reject) => {
const childProc = child_process_1.default.spawn(cmd, args, options);
if (childProc === null ||
childProc.stderr === null ||
childProc.stdout === null) {
return reject();
}
childProc.stdout.setEncoding('utf-8');
childProc.stderr.setEncoding('utf-8');
childProc.stdout.on('data', data => {
process.stdout.write(data);
});
childProc.stderr.on('data', data => {
process.stderr.write(data);
});
childProc.on('close', code => {
console.log(`child process exited with code ${code}`);
if (code !== null && code > 0) {
return reject(code);
}
return resolve(0);
});
});
}
async function clone(args) {

@@ -119,2 +94,3 @@ const emitter = (0, tiged_1.default)(`interval/interval-examples/${args.template}/${args.language}`, {

}
console.log(`Creating an Interval app with the ${args.template} template...`);
console.log('Fetching app template...');

@@ -148,6 +124,11 @@ try {

const langName = args.language === 'javascript' ? 'JavaScript' : 'TypeScript';
const packageManager = isYarn ? 'yarn' : 'npm';
let startCommand = `${packageManager} start`;
if (args.language === 'typescript') {
startCommand = isYarn ? `yarn dev` : `npm run dev`;
}
const lines = [
'To run your app:',
`1. cd ./${args.destination}`,
isYarn ? `2. yarn start` : `2. npm start`,
`2. ${startCommand}`,
];

@@ -154,0 +135,0 @@ console.log();

{
"name": "create-interval-app",
"version": "0.1.0",
"version": "0.1.1",
"description": "Quickly bootstrap a new Interval project.",

@@ -5,0 +5,0 @@ "main": "dist/index.js",

@@ -33,36 +33,2 @@ import degit from 'tiged'

type SpawnOptions = Parameters<typeof childProcess.spawn>[2]
function child(cmd: string, args: any[], options: SpawnOptions) {
return new Promise<number>((resolve, reject) => {
const childProc = childProcess.spawn(cmd, args, options)
if (
childProc === null ||
childProc.stderr === null ||
childProc.stdout === null
) {
return reject()
}
childProc.stdout.setEncoding('utf-8')
childProc.stderr.setEncoding('utf-8')
childProc.stdout.on('data', data => {
process.stdout.write(data)
})
childProc.stderr.on('data', data => {
process.stderr.write(data)
})
childProc.on('close', code => {
console.log(`child process exited with code ${code}`)
if (code !== null && code > 0) {
return reject(code)
}
return resolve(0)
})
})
}
async function clone(args: IntervalAppArgs) {

@@ -163,2 +129,4 @@ const emitter = degit(

console.log(`Creating an Interval app with the ${args.template} template...`)
console.log('Fetching app template...')

@@ -204,6 +172,13 @@

const packageManager = isYarn ? 'yarn' : 'npm'
let startCommand = `${packageManager} start`
if (args.language === 'typescript') {
startCommand = isYarn ? `yarn dev` : `npm run dev`
}
const lines = [
'To run your app:',
`1. cd ./${args.destination}`,
isYarn ? `2. yarn start` : `2. npm start`,
`2. ${startCommand}`,
]

@@ -210,0 +185,0 @@

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