Comparing version 0.10.1 to 0.11.1
@@ -1,5 +0,6 @@ | ||
/* eslint-disable unicorn/no-process-exit */ | ||
/* eslint-disable unicorn/no-process-exit, prefer-template */ | ||
const fs = require('fs'); | ||
const { promisify } = require('util'); | ||
const globby = require('globby'); | ||
const { camelCase } = require('camel-case'); | ||
@@ -15,7 +16,13 @@ const writeFile = promisify(fs.writeFile); | ||
const imports = names | ||
const imports = names.sort().map((name) => { | ||
const camel = camelCase(name); | ||
return `module.exports.${camel} = require('./${name}').${camel};`; | ||
}); | ||
const types = names | ||
.sort() | ||
.map((name) => `module.exports.${name} = require('./${name}');`); | ||
.map((name) => `export { ${camelCase(name)} } from './${name}';`); | ||
await writeFile('./index.js', imports.join('\n')); | ||
await writeFile('./index.js', imports.join('\n') + '\n'); | ||
await writeFile('./index.d.ts', types.join('\n') + '\n'); | ||
} | ||
@@ -22,0 +29,0 @@ |
18
index.js
@@ -1,9 +0,9 @@ | ||
module.exports.condition = require('./condition'); | ||
module.exports.debounce = require('./debounce'); | ||
module.exports.debug = require('./debug'); | ||
module.exports.delay = require('./delay'); | ||
module.exports.reshape = require('./reshape'); | ||
module.exports.splitmap = require('./splitmap'); | ||
module.exports.spread = require('./spread'); | ||
module.exports.status = require('./status'); | ||
module.exports.throttle = require('./throttle'); | ||
module.exports.condition = require('./condition').condition; | ||
module.exports.debounce = require('./debounce').debounce; | ||
module.exports.debug = require('./debug').debug; | ||
module.exports.delay = require('./delay').delay; | ||
module.exports.reshape = require('./reshape').reshape; | ||
module.exports.splitMap = require('./split-map').splitMap; | ||
module.exports.spread = require('./spread').spread; | ||
module.exports.status = require('./status').status; | ||
module.exports.throttle = require('./throttle').throttle; |
{ | ||
"name": "patronum", | ||
"version": "0.10.1", | ||
"version": "0.11.1", | ||
"description": "☄️ Effector utility library delivering modularity and convenience", | ||
"main": "index.js", | ||
"types": "index.d.ts", | ||
"scripts": { | ||
@@ -32,2 +33,3 @@ "test": "jest", | ||
"@typescript-eslint/parser": "^2.12.0", | ||
"camel-case": "^4.1.1", | ||
"commitizen": "4.0.3", | ||
@@ -34,0 +36,0 @@ "cz-conventional-changelog": "3.0.2", |
# effecto patronum ✨ | ||
[![Commitizen friendly](https://img.shields.io/badge/commitizen-friendly-brightgreen.svg)](http://commitizen.github.io/cz-cli/) [![Conventional Commits](https://img.shields.io/badge/Conventional%20Commits-1.0.0-yellow.svg)](https://conventionalcommits.org) [![code style: prettier](https://img.shields.io/badge/code_style-prettier-ff69b4.svg)](http://prettier.io) | ||
[![Commitizen friendly](https://img.shields.io/badge/commitizen-friendly-brightgreen.svg)](http://commitizen.github.io/cz-cli/) [![Conventional Commits](https://img.shields.io/badge/Conventional%20Commits-1.0.0-yellow.svg)](https://conventionalcommits.org) [![code style: prettier](https://img.shields.io/badge/code_style-prettier-ff69b4.svg)](http://prettier.io) ![Node.js CI](https://github.com/sergeysova/patronum/workflows/Node.js%20CI/badge.svg) | ||
@@ -210,3 +210,3 @@ ☄️ Effector utility library delivering modularity and convenience | ||
## [SplitMap](/splitmap 'Documentation') | ||
## [SplitMap](/split-map 'Documentation') | ||
@@ -217,3 +217,3 @@ > No tests yet | ||
import { createEvent } from 'effector'; | ||
import { splitMap } from 'patronum/splitmap'; | ||
import { splitMap } from 'patronum/split-map'; | ||
@@ -220,0 +220,0 @@ const nameReceived = createEvent<string>(); |
30366
281
21