npm

Need private packages and team management tools?Check out npm Orgs. »

This package has been deprecated

Author message:

this package has been deprecated

devbundle

0.2.4 • Public • Published

devbundle

Bundle and browser test JavaScript modules during development

Installation

npm install devbundle

Usage

  • Add an initiate script
// devbundle.js
import devbundle from "devbundle";
 
devbundle({
    context: __dirname,
    input: __dirname + "/index.js",
});
  • Run initiate script using Node.js
node devbundle.js

Configs

Required

  • context: Path to the main project directory where the module is running
  • input: Path to input script for the bundle (javascript file)

Optional

  • title: Title, used in the presented index html
  • icon: Presentation icon, available: app, camera, chart, chat, cloud, cube (default), html, location, music, phone, plane, pointer, shield, shopping, users, windows
  • include: Static files to include in the html presentation
  • include.css: Array of static css include file paths
  • include.js: Array of static jsvascript include file paths
  • port: Web server port
  • hostname: Web server hostname

Extended example

import devbundle from "devbundle";
 
devbundle({
    context: __dirname,
    input: __dirname + "/index.js",
    title: "Development test"
    include: {
        css: [
            __dirname + "/styles.css"
        ],
        js: [
            __dirname + "/scripts.js"
        ]
    },
    port: 8081,
    hostname: "localhost"
});

What it does

  • Builds the input files with all dependencies into a single bundle (using Webpack)
    • Including ES6 to ES3 transpiling
    • Including JSX compilation (React)
    • Including SASS compilation
  • Saves bundle to memory, and watch for changes
  • Start a local web server presenting an index html with the bundle
  • Include static files in the index

License

MIT

Icons made by Freepik from www.flaticon.com is licensed by CC 3.0 BY

Keywords

none

install

npm i devbundle

Downloadsweekly downloads

3

version

0.2.4

license

MIT

last publish

collaborators

  • avatar
Report a vulnerability