All Projects → pearofducks → Rollup Plugin Dev

pearofducks / Rollup Plugin Dev

Licence: mit
development server for rollup with additional logging and options

Programming Languages

javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to Rollup Plugin Dev

Deprecated
🚀 Framework for building universal web app and static website in Vue.js (beta)
Stars: ✭ 858 (+2858.62%)
Mutual labels:  koa
Koa Vue Notes Project
🤓 A single repo containing both the koa-vue-notes-api and koa-vue-notes-web projects.
Stars: ✭ 14 (-51.72%)
Mutual labels:  koa
Hoppscotch
👽 Open source API development ecosystem https://hoppscotch.io
Stars: ✭ 34,569 (+119103.45%)
Mutual labels:  developer-tools
Got Auth Service
A professional role-based-authorization(also supports resource and group) service with restful and graphql api for enterprise applications.
Stars: ✭ 12 (-58.62%)
Mutual labels:  koa
Majestic
⚡ Zero config GUI for Jest
Stars: ✭ 7,261 (+24937.93%)
Mutual labels:  developer-tools
Angela
🙂angela (安其拉):react ssr router redux; react同构框架
Stars: ✭ 15 (-48.28%)
Mutual labels:  koa
Glauth
A lightweight LDAP server for development, home use, or CI
Stars: ✭ 850 (+2831.03%)
Mutual labels:  developer-tools
Project16 B Account Book
👥👤👥뭐야..👤👥👥👤👥👤 이거쓰면 부자된다고..?👥👤👥👤👤👥👥 웅성웅성..👤👥👤👥👤궁금하다..👥👥👤👥
Stars: ✭ 28 (-3.45%)
Mutual labels:  koa
Git Project
Manage a large number of local git repositories with ease!
Stars: ✭ 14 (-51.72%)
Mutual labels:  developer-tools
Express Reloadable
Automatically hot-swap Express server code without the restart
Stars: ✭ 20 (-31.03%)
Mutual labels:  developer-tools
Irbtools
Improvements for Ruby's IRB console 💎︎
Stars: ✭ 868 (+2893.1%)
Mutual labels:  developer-tools
Curlie
The power of curl, the ease of use of httpie.
Stars: ✭ 877 (+2924.14%)
Mutual labels:  developer-tools
Koahub Demo
koahub+async/await+mysql
Stars: ✭ 15 (-48.28%)
Mutual labels:  koa
Gita
Manage many git repos with sanity 从容管理多个git库
Stars: ✭ 865 (+2882.76%)
Mutual labels:  developer-tools
Localstack
💻 A fully functional local AWS cloud stack. Develop and test your cloud & Serverless apps offline!
Stars: ✭ 37,724 (+129982.76%)
Mutual labels:  developer-tools
Mysrv
Yet another Node.js web framework, based on koa.js 又一个 Node.js MVC 框架,基于Koa2
Stars: ✭ 10 (-65.52%)
Mutual labels:  koa
Timeline Vue
💌基于 Vue -> Koa2 -> Mongoose 的留言时间轴,记录美好时光。
Stars: ✭ 14 (-51.72%)
Mutual labels:  koa
Requestdiff
Send two HTTP requests and visualize any differences
Stars: ✭ 28 (-3.45%)
Mutual labels:  developer-tools
Koa
Expressive middleware for node.js using ES2017 async functions
Stars: ✭ 32,089 (+110551.72%)
Mutual labels:  koa
Chromelogger
chrome extension for server side console logging
Stars: ✭ 884 (+2948.28%)
Mutual labels:  developer-tools

rollup-plugin-dev

a development server for rollup

a screenshot of this plugin running

why this plugin?

if you just want to serve a folder of assets, or need only a couple other features; you probably want rollup-plugin-serve

compared to rollup-plugin-serve, this plugin:

  • uses Koa to provide the server and implement features
    • while this means there are dependencies, it should also be trivial to add/modify to suit individual needs (see extend option below!)
  • has additional features that may be useful
    • detailed logging of requests (see screenshot)
    • full proxy support
    • support for a basepath in the URL
    • will automatically turn itself off (with a notification) for your production builds

install

npm install --save-dev rollup-plugin-dev
yarn add --dev rollup-plugin-dev

use

import dev from 'rollup-plugin-dev'

export default {
  plugins: [ dev() ]
}

options

dirs

directories to serve static files from

example: dev('dist')
example: dev({ dirs: ['dist', 'lib'] })
default: __dirname

when no other options are needed for this plugin, a shortcut is available to specify one folder

basePath

prefix all served files with a base path - e.g. serve from /static instead of /

example: dev({ basePath: '/static' })
default: /

silent

will silence all access log messages, as well as the warning printed when rollup is started outside of watch mode

example: dev({ silent: true })
example: dev({ silent: 'very' }) // disables all output from this plugin
default: false

proxy

proxy a path to an upstream service

example: dev({ proxy: { '/v3/*': 'https://polyfill.io/' } })
example: dev({ proxy: { '/v3/*': ['https://polyfill.io/', { https: true }] } })
default: undefined

the value for a proxy can be either a string, or an array specifying the two arguments for koa-better-http-proxy

spa

serve a fallback page (for single-page apps)

example: dev({ spa: true }) // will serve index.html
example: dev({ spa: 'path/to/fallback.html' })
default: false

port

the port the server should listen on

example: dev({ port: 3000 })
default: 8080

host

the host the server should listen on

example: dev({ host: '0.0.0.0' })
default: localhost

force

force the server to start, even if rollup isn't in watch mode

example: dev({ force: true })
default: false

extend

enables full customization of the dev server

example: dev({ extend(app, modules) { app.use(modules.router.get('/foo', myHandler)) } })
default: undefined

app is the Koa instance used for the server

modules available:

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].