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

@kjots/package-creator

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@kjots/package-creator - npm Package Compare versions

Comparing version 0.4.0 to 0.5.0

@@ -6,2 +6,13 @@ # Change Log

# [0.5.0](https://github.com/kjots/package-tools/compare/v0.4.0...v0.5.0) (2020-01-17)
### Features
* **package-creator:** update `packageCreator()` to pass all provided options to template ([f503bff](https://github.com/kjots/package-tools/commit/f503bff6eb34f05308c307dc1902a8b6202bb1eb))
# [0.4.0](https://github.com/kjots/package-tools/compare/v0.3.0...v0.4.0) (2020-01-17)

@@ -8,0 +19,0 @@

@@ -21,8 +21,7 @@ "use strict";

function packageCreator(templateZip, opts) {
const { name, description } = opts;
const nameCamelCase = lodash_1.camelCase(name);
const nameCamelCase = lodash_1.camelCase(opts.name);
const nameTitleCase = lodash_1.upperFirst(nameCamelCase);
const keywords = opts.keywords.map((keyword, i) => ({ keyword, first: i === 0, last: i === opts.keywords.length - 1 }));
readTemplateFiles(templateZip)
.pipe(applyTemplate({ name, nameCamelCase, nameTitleCase, description, keywords }), vinyl_fs_observable_1.dest(opts.output), operators_1.concatMap(file => rxjs_1.from(fs_1.promises.chmod(file.path, file.mode))))
.pipe(applyTemplate({ ...opts, nameCamelCase, nameTitleCase, keywords }), vinyl_fs_observable_1.dest(opts.output), operators_1.concatMap(file => rxjs_1.from(fs_1.promises.chmod(file.path, file.mode))))
.subscribe();

@@ -29,0 +28,0 @@ }

{
"name": "@kjots/package-creator",
"version": "0.4.0",
"version": "0.5.0",
"description": "@kjots package creator",

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

"package",
"tools",
"creator"

@@ -39,3 +38,3 @@ ],

},
"gitHead": "2e7d07af29e67a6784158dbef212391a6ec75da3"
"gitHead": "97cbb557e5955ab89f59f8305aff41a71cda50bd"
}

@@ -38,4 +38,3 @@ import { promises as fs } from 'fs';

export function packageCreator(templateZip: string, opts: Opts) {
const { name, description } = opts;
const nameCamelCase = camelCase(name);
const nameCamelCase = camelCase(opts.name);
const nameTitleCase = upperFirst(nameCamelCase);

@@ -46,3 +45,3 @@ const keywords = opts.keywords.map((keyword, i) => ({ keyword, first: i === 0, last: i === opts.keywords.length - 1 }));

.pipe(
applyTemplate({ name, nameCamelCase, nameTitleCase, description, keywords }),
applyTemplate({ ...opts, nameCamelCase, nameTitleCase, keywords }),
dest(opts.output),

@@ -49,0 +48,0 @@ concatMap(file => from(fs.chmod(file.path, file.mode)))

Sorry, the diff of this file is not supported yet