Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

reboost

Package Overview
Dependencies
Maintainers
1
Versions
59
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

reboost

A super fast web dev server, for faster development

  • 0.1.1
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
2
decreased by-71.43%
Maintainers
1
Weekly downloads
 
Created
Source

Reboost

A super fast web dev server, for faster development.

Experimental.

Reboost is not that stable yet. Things can change or break anytime. But don't worry, we are working on that :D

Motivation

When developing a web app, as your number of modules increases, your compile-time slows down, it's really a big problem, it takes a lot of precious time which you could have used to develop your app. Since ES2015 (aka ES6) modules are supported natively by browsers. If you can connect (or you can say serve) them up correctly, it will work on browsers without the need for bundling. Here, Reboost does that for you - the serving part. So you can develop your app faster.

NOTE: Reboost is only for use while you are developing your app, for production you've to bundle up your files by yourself using bundlers like Webpack, Rollup, etc.

Features

  • No bundling. So the server start time is fast.
  • Incremental builds, transforms only the file which is requested or changed.
  • Filesystem cache. It will stay fast even after restarting.
  • Source maps support for better developer experience.
  • Supports CommonJS modules.
  • Support for Plugins.
  • Import resolving.
  • Hot Module Replacement.
  • Out of the box support for CSS Modules, JSX, and TypeScript.
  • Preprocessor support.
  • Works with Electron.

Compatibility

Reboost works with both CommonJS and ES modules, so you can try it even if you are not using ES modules, though using ES modules is recommended.

Quickstart

First, install it using npm as devDependency

npm i -D reboost

Assume that file structure is like this

Project
  public/
    index.html
  src/
    add.js
    subtract.js
    index.js
  package.json

Script contents

// src/add.js
export const add = (a, b) => a + b;

// src/subtract.js
export const subtract = (a, b) => a - b;

// src/index.js
import { add } from './add';
import { subtract } from './subtract';

console.log('1 + 3 =', add(1, 3));
console.log('10 - 5 =', subtract(10, 5));

and HTML content (public/index.html)

<!doctype html>
<html>
  <body>
    <!-- Notice the type is "module" -->
    <script type="module" src="./dist/bundle.js"></script>
  </body>
</html>

then create a file named reboost.js

const { start } = require('reboost');

start({
  entries: [
    // Format - [inputPath, outputPath]
    ['./src/index.js', './public/dist/bundle.js']
  ],
  contentServer: {
    root: './public'
  }
})

after that run the script using node, open your terminal in that directory and use the command

node reboost

Now open the address in which the content server is started. You can see your code is working without any problem.

What if I want to use any other server?

Reboost's content server is basically static, it just serves the file. If you want to use any other server (like browser-sync or your own http server) you can do that, you've to just serve the generated scripts which are in your output directory. Reboost will handle the rest.

Docs

Changelog
Configurations
HMR API
Plugins
Supporting old browsers while using script type="module"

Inspired by

Reboost is highly inspired by these awesome projects

License

Licensed under the MIT License.

Keywords

FAQs

Package last updated on 02 Jun 2020

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc