Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/adriankremer/rollup-plugin-proxy-directories
create proxy directories for libraries
https://github.com/adriankremer/rollup-plugin-proxy-directories
Last synced: 20 days ago
JSON representation
create proxy directories for libraries
- Host: GitHub
- URL: https://github.com/adriankremer/rollup-plugin-proxy-directories
- Owner: adriankremer
- Created: 2019-02-14T12:39:29.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2022-05-27T19:16:13.000Z (over 2 years ago)
- Last Synced: 2024-05-16T20:49:57.427Z (6 months ago)
- Language: JavaScript
- Homepage:
- Size: 70.3 KB
- Stars: 4
- Watchers: 3
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
Awesome Lists containing this project
README
# rollup-plugin-proxy-directories
creates proxy directories for libraries without configuration to make direct imports easier.
## Example
**Source**
```
├── Button
│ ├── Button.tsx
│ ├── ButtonHook.tsx
│ └── index.ts
├── index.ts
```**Build**
```
├── Button
│ ├── ButtonHook
│ │ └── package.json
│ └── package.json
├── es
│ ├── Button
│ │ ├── ButtonHook.js
│ │ └── index.js
│ ├── index.js
├── lib
│ ├── Button
│ │ ├── ButtonHook.js
│ │ └── index.js
│ ├── index.js
```**Usage**
```js
import Button from 'ui-library/Button';
import ButtonHook from 'ui-library/Button/ButtonHook';
```
inspired by this article: [how-to-create-javascript-libraries-in-2018](https://developers.livechatinc.com/blog/how-to-create-javascript-libraries-in-2018-part-2/)## Installation
```bash
npm install --save-dev rollup-plugin-proxy-directories
```## Usage
```js
// rollup.config.js
import proxyDirectories from "rollup-plugin-proxy-directories";
import pkg from "./package.json";export default {
// ...
plugins: [
proxyDirectories()
]
};
```## todos (please contribute)
* write tests :)
## License
MIT