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

mkhere

Package Overview
Dependencies
Maintainers
1
Versions
10
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

mkhere - npm Package Compare versions

Comparing version 1.0.0 to 1.0.1

22

lib/mkhere.js

@@ -34,4 +34,6 @@ #! /usr/bin/env node

BR + "mkhere: Create files based on predefined emplates".inverse + BR + BR +
"mkhere list ".green.bold + BR + "\t List all templates in " + tplDir.italic + BR +
"mkhere tplname.html newname ".green.bold + BR + "\t Will create new file " + "newname.html".italic + " based on " + path.join(tplDir,"tplname.html").italic + " in current directory"
"mkhere list ".green.bold + BR +
"\t List all templates in " + tplDir.italic + BR +
"mkhere tplname.html newname ".green.bold + BR +
"\t Will create new file " + "newname.html".italic + " based on " + path.join(tplDir, "tplname.html").italic + " in current directory"
);

@@ -42,20 +44,14 @@ }

var CWD = process.cwd();
var tplName = path.join(tplDir,process.argv[2]);
var tplName = path.join(tplDir, process.argv[2]);
var newFileExt = tplName.slice(tplName.indexOf('.'));
var newFile = process.argv[3] + newFileExt;
fs.readFile(tplName, 'utf8', function (err,data) {
fs.readFile(tplName, 'utf8', function (err, data) {
if (err) {
return console.log(
'Error! No such template file '.red + tplName.red.bold + ' in '.red + tplDir.red + BR +
"For usage see: " + "mkhere help".bold
"For usage see: " + "mkhere help".bold
);
}
fs.writeFile(newFile,data);
fs.writeFile(newFile, data);
});
}
console.log('USER HOME', getUserHome());
console.log('TPL', tplName);
console.log('NEW FILE', newFile);
console.log('CWD', CWD);
console.log('LIST TPL FILES', list(path.join(getUserHome(), tplDir)));
}
{
"name": "mkhere",
"version": "1.0.0",
"version": "1.0.1",
"description": "Make files based on template",

@@ -33,4 +33,11 @@ "main": "lib/mkhere.js",

"bin": {
"mkhere" : "lib/mkhere.js"
"mkhere": "lib/mkhere.js"
},
"dependencies": {
"colors": "^0.6.2",
"path": "^0.4.9"
},
"engines": {
"node": "*"
}
}

@@ -5,5 +5,7 @@ # mkhere

[![NPM](https://nodei.co/npm/mkhere.png)](https://nodei.co/npm/mkhere/)
### Usage
`mkhere list` - List all templates in /home/sasha/Templates
`mkhere list` - List all templates in _\<USER_HOME_DIR\>/Templates/_

@@ -10,0 +12,0 @@ `mkhere help` - Show usage/help

Sorry, the diff of this file is not supported yet

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