New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

create-node-library

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

create-node-library - npm Package Compare versions

Comparing version 0.0.1 to 0.0.2

8

CHANGELOG.md
# Changelog
## [0.0.1] - 2019-05-03
## [0.0.2] - 2019-05-03
### Added
- Add handlebars template
## [0.0.1] - 2019-05-02
### Added
- CLI to create new Node.js libraries

@@ -7,2 +7,3 @@ import chalk from 'chalk';

import { projectInstall } from 'pkg-install';
import { compile } from 'handlebars';
import ncp from 'ncp';

@@ -104,2 +105,16 @@ import execa from 'execa';

var handlebarFiles = [
'./package.json',
];
var compileTemplates = function (options, directoryOptions) {
handlebarFiles.forEach(function (file) {
var filePath = path.resolve(directoryOptions.targetDirectory, file);
var source = fs.readFileSync(filePath);
var fileTemplate = compile("" + source);
var compiledSource = fileTemplate(options);
fs.writeFileSync(filePath, compiledSource);
});
};
var _this$1 = undefined;

@@ -133,2 +148,6 @@ var copy = promisify(ncp);

{
title: 'Compile project files',
task: function () { return compileTemplates(options, directoryOptions); },
},
{
title: 'Initialize git',

@@ -229,2 +248,8 @@ task: function () { return initGit(directoryOptions); },

{
type: 'input',
name: 'description',
message: 'Describe your project',
defaultValue: 'node library',
},
{
type: 'list',

@@ -231,0 +256,0 @@ name: 'template',

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

var pkgInstall = require('pkg-install');
var handlebars = require('handlebars');
var ncp = _interopDefault(require('ncp'));

@@ -110,2 +111,16 @@ var execa = _interopDefault(require('execa'));

var handlebarFiles = [
'./package.json',
];
var compileTemplates = function (options, directoryOptions) {
handlebarFiles.forEach(function (file) {
var filePath = path.resolve(directoryOptions.targetDirectory, file);
var source = fs.readFileSync(filePath);
var fileTemplate = handlebars.compile("" + source);
var compiledSource = fileTemplate(options);
fs.writeFileSync(filePath, compiledSource);
});
};
var _this$1 = undefined;

@@ -139,2 +154,6 @@ var copy = util.promisify(ncp);

{
title: 'Compile project files',
task: function () { return compileTemplates(options, directoryOptions); },
},
{
title: 'Initialize git',

@@ -235,2 +254,8 @@ task: function () { return initGit(directoryOptions); },

{
type: 'input',
name: 'description',
message: 'Describe your project',
defaultValue: 'node library',
},
{
type: 'list',

@@ -237,0 +262,0 @@ name: 'template',

3

package.json
{
"name": "create-node-library",
"version": "0.0.1",
"version": "0.0.2",
"description": "node library bootstrap cli",

@@ -85,2 +85,3 @@ "main": "dist/index.js",

"execa": "^1.0.0",
"handlebars": "^4.1.2",
"inquirer": "^6.3.1",

@@ -87,0 +88,0 @@ "listr": "^0.14.3",

@@ -13,4 +13,7 @@ <h1 align="center">Create Node Library</h1>

</a>
<a href="https://greenkeeper.io/">
<img src="https://badges.greenkeeper.io/DaNautilus/create-node-library.svg" alt="greenkeeper" />
</a>
</p>
![divider](./divider.png)
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