1.0.1 β’ Published 8 years ago
entrify v1.0.1
entrify
π¦ Library to convert package.json to index.js.
Some project has a package.json for each of component directories. This is with the benefit to be able to indicate the a main file per directory, which is nice. However, some tools like prettier and eslint, and features as webpack resolve/alias will not work properly.
To remediate this situation we have to create an index.js file for each of those package.json. That's where entrify shines β¨.
π Hey! For the command line tool head to: entrify-cli.
Installation
npm install entrify --saveor
yarn add entrifyUsage
const path = require('path')
const entrify = require('entrify')
entrify(path.join(__dirname, './src/components'))Documentation
entrify(directory)
directoryβString.Β The directory to traverse.optionsβObject. Hash of options.formatβString. Format of theindex.jsto create. Valid options are:cjsandesm.
Development
- Clone and fork this repo.
- Install dependencies: yarn or npm install.
- Run tests.
- Prepare a pull request.
Test
yarn testβ to run all tests.yarn test -- --watchβ to run all tests in watch mode.
Publish
- Bump package version:
yarn version --new-version x.x.x -m 'Version %s.'. - Publish to NPM registry:
npm publish. - Push new tag:
git push origin --tags.
Made with :heart: by Rubens Mariuzzo.