All Projects → gjbkz → rollup-plugin-glob-import

gjbkz / rollup-plugin-glob-import

Licence: MIT license
A rollup plugin to use glob-star.

Programming Languages

javascript
184084 projects - #8 most used programming language
shell
77523 projects

Projects that are alternatives of or similar to rollup-plugin-glob-import

Rollup Plugin Copy
Copy files and folders using Rollup
Stars: ✭ 128 (+611.11%)
Mutual labels:  rollup, glob
11r
America's favorite Eleventy blog template.
Stars: ✭ 135 (+650%)
Mutual labels:  rollup
matched
Glob matching with support for multiple patterns and negation. Use `~` in cwd to find files in user home, or `@` for global npm modules.
Stars: ✭ 25 (+38.89%)
Mutual labels:  glob
vue-cli-template-library
Template for developing open-source vue.js libraries with Rollup + Jest + Babel + Storybook + TravisCI + SemanticRelease
Stars: ✭ 61 (+238.89%)
Mutual labels:  rollup
electron-template
Electron multiwindow mode template
Stars: ✭ 65 (+261.11%)
Mutual labels:  rollup
puruvjdev2
puruvj.dev
Stars: ✭ 11 (-38.89%)
Mutual labels:  rollup
React Redux Typescript Jspm Starter
Futuristic, bundle-free, development environment for building Component-Driven SPA with React, Redux and TypeScript - powered by JSPM (SystemJS & Rollup with tree-shaking)
Stars: ✭ 238 (+1222.22%)
Mutual labels:  rollup
rollup-plugin-userscript-metablock
Transform json file to userscript metablock and append on.
Stars: ✭ 26 (+44.44%)
Mutual labels:  rollup
rollup-plugin-ts-paths
Resolve modules from tsconfig paths in Rollup
Stars: ✭ 20 (+11.11%)
Mutual labels:  rollup
koa-ip-filter
koa middleware to filter request IPs or custom ID with glob patterns, array, string, regexp or matcher function. Support custom 403 Forbidden message and custom ID.
Stars: ✭ 23 (+27.78%)
Mutual labels:  glob
svelte-pwa-now
A PWA ready Svelte v3.0 starter template with Tailwind, Now integration and optional Typescript suppot
Stars: ✭ 138 (+666.67%)
Mutual labels:  rollup
vitext
The Next.js like React framework for better User & Developer experience!
Stars: ✭ 376 (+1988.89%)
Mutual labels:  rollup
echarts-for-svelte
📈 Baidu Echarts(v3.0 & v4.0) components for Svelte wrapper.
Stars: ✭ 25 (+38.89%)
Mutual labels:  rollup
firebase-functions-typescript-starter
Create & test Firebase Cloud Functions in TypeScript
Stars: ✭ 101 (+461.11%)
Mutual labels:  rollup
rollup-plugin-closure-compiler-js
Rollup plugin for optimizing JavaScript with google-closure-compiler-js.
Stars: ✭ 31 (+72.22%)
Mutual labels:  rollup
Harold
Compares frontend project bundles
Stars: ✭ 241 (+1238.89%)
Mutual labels:  rollup
rollup-boilerplate
Simple boilerplate to make components libraries with React.
Stars: ✭ 13 (-27.78%)
Mutual labels:  rollup
all-search
all-search 全搜,一个搜索引擎快捷跳转菜单
Stars: ✭ 105 (+483.33%)
Mutual labels:  rollup
svelte-box
A truffle box for svelte
Stars: ✭ 60 (+233.33%)
Mutual labels:  rollup
scriptable-ts-boilerplate
A boilerplate for creating remote-updatable Scriptable widgets. Includes setup, components, utils and examples to develop in the comfort of TypeScript.
Stars: ✭ 40 (+122.22%)
Mutual labels:  rollup

rollup-plugin-glob-import

.github/workflows/test.yml codecov

A plugin to use glob-star in import source.

import foo from './path/to/lib/*.js';

Installation

npm install --save-dev rollup-plugin-glob-import

Usage

// rollup.config.js
const globImport = require('rollup-plugin-glob-import');
// import {plugin as globImport} from 'rollup-plugin-glob-import';
export default {
  input: 'path/to/input.js',
  plugins: [
    globImport(options) // See the "Options" section below.
  ]
}

Example

Options

export interface IGlobPluginOptions {
    /**
     * The first argument of [rollup-pluginutils.createfilter](https://github.com/rollup/rollup-pluginutils#createfilter).
     */
    include?: Parameters<CreateFilter>[0],
    /**
     * The second argument of [rollup-pluginutils.createfilter](https://github.com/rollup/rollup-pluginutils#createfilter).
     */
    exclude?: Parameters<CreateFilter>[0],
    /**
     * - `'import'`: The intermediate files work as importer that export nothing.
     * - `'named'`: The intermediate files export only **named** exports.
     * - `'default'`: The intermediate files export only **default** exports.
     * - `'mixed'`: This plugin read the imported files and parse it with
     *   [acorn](https://www.npmjs.com/package/acorn) to check default exports.
     *   Intermediate files export both named exports and default exports.
     */
    format?: IntermediateFileFormat,
    /**
     * A function generates the name of exports.
     * It is used if `options.format` is `'mixed'` or `'default'`.
     * For example, if an imported module `/src/foo.js` has
     * `export const bar = 123` and `export default 456`, it is called twice:
     * `rename('bar', '/src/foo.js')`, `rename(null, '/src/foo.js')`.
     * If a return values is falsy value, it is ignored.
     */
    rename?: (name: string, id: string) => string,
    /**
     * [acorn](https://www.npmjs.com/package/acorn) options.
     * The default value is `{sourceType: 'module'}`.
     */
    acorn?: acorn.Options,
    /**
     * A function called before generating intermediate files.
     * You can add or remove files from sources.
     */
    intercept?: (sources: Array<string>, importer: string, importee: string) => Array<string>,
}

https://github.com/kei-ito/rollup-plugin-glob-import/blob/d5d6d22d322da92ca8026322b2d629689fd8496d/lib/index.d.ts#L12-L49

License

MIT

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].