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

artisan

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

artisan - npm Package Compare versions

Comparing version 0.1.1 to 0.1.2

lib/config.json

81

lib/artisan.js
"use strict";
/*!

@@ -13,2 +12,3 @@ * Artisan

var program = require('commander')
, config = require('./config')
, fs = require('fs')

@@ -34,3 +34,3 @@ , mkdirp = require('mkdirp')

// Prompt user for top-level dir name
program.prompt('Please name your node module: ', function ( name ) {
program.prompt('Please name your new node module: ', function ( name ) {
canCreate( name, bootstrap );

@@ -70,2 +70,16 @@ });

function writeDirectory( name, fname ) {
mkdirp('./' + name + '/' + fname, function (err) {
if (err) console.error(err)
else console.log('│   ├── ' + fname)
});
}
function writeFile( name, fname ) {
fs.writeFile('./' + name + '/' + fname, null, function (err) {
if (err) return console.log(err);
console.log('│   ├── ' + fname);
});
}
/**

@@ -77,2 +91,3 @@ * Bootstrap app files.

// Create top-level dir
mkdirp('./' + name, function (err) {

@@ -83,58 +98,16 @@ if (err) console.error(err)

mkdirp('./' + name + '/examples/', function (err) {
if (err) console.error(err)
else console.log('│   ├── examples')
});
var items = config.items;
mkdirp('./' + name + '/lib/', function (err) {
if (err) console.error(err)
else console.log('│   ├── lib')
});
for ( var i = 0; i < items.length; i++ ){
mkdirp('./' + name + '/test/', function (err) {
if (err) console.error(err)
else console.log('│   ├── test')
});
var fname = items[i].name;
fs.writeFile('./' + name + '/README.md', null, function (err) {
if (err) return console.log(err);
console.log('└── README.md');
});
fs.writeFile('./' + name + '/History.md', null, function (err) {
if (err) return console.log(err);
console.log('└── History.md');
});
fs.writeFile('./' + name + '/package.json', null, function (err) {
if (err) return console.log(err);
console.log('└── package.json');
});
fs.writeFile('./' + name + '/.gitignore', null, function (err) {
if (err) return console.log(err);
console.log('└── .gitignore');
});
fs.writeFile('./' + name + '/.npmignore', null, function (err) {
if (err) return console.log(err);
console.log('└── .npmignore');
});
fs.writeFile('./' + name + '/Makefile', null, function (err) {
if (err) return console.log(err);
console.log('└── Makefile');
});
fs.writeFile('./' + name + '/.travis.yml', null, function (err) {
if (err) return console.log(err);
console.log('└── .travis.yml');
});
fs.writeFile('./' + name + '/LICENSE', null, function (err) {
if (err) return console.log(err);
console.log('└── LICENSE');
});
if(items[i].type === 'file') {
writeFile(name, fname);
}
else {
writeDirectory(name, fname);
}
}
cursor.reset();
}

@@ -10,3 +10,3 @@ {

],
"version": "0.1.1",
"version": "0.1.2",
"author": "Kevin Coughlin <kevintcoughlin@gmail.com>",

@@ -13,0 +13,0 @@ "license": "MIT",

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