![Oracle Drags Its Feet in the JavaScript Trademark Dispute](https://cdn.sanity.io/images/cgdhsj6q/production/919c3b22c24f93884c548d60cbb338e819ff2435-1024x1024.webp?w=400&fit=max&auto=format)
Security News
Oracle Drags Its Feet in the JavaScript Trademark Dispute
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
NodeJS/Express Server ehnanced with Chokidar WebSocket Server emitting events on file changes
Npm package:
Project Starter using this Dev-Server (React / Redux / TypeScript / JSPM):
When starting development in JSPM / SystemJS Ecosystem you'll find out there is no standard dev-server, that could be equivalent in features to webpack-dev-server. Although there are several projects such as jspm-server (a fork of live-server), these are not well-maintained and have missing or broken support for Hot-Reload and Live-Reload which is the main focus of this project. Adding and configuring Hot-Reload manually is often hard and require advanced knowledge that not every developer needs to master in order to simply use the tool.
For that reasons I have decided to create library that is providing the dev-server with hot-reload preconfigured with best-practices in mind, battle-tested in production and open-source project and extended with new features requested by community.
jspm-hmr
CLI utility to run a local web-server in any folderTip: Confirm all Wizard Questions with Enter for default Babel setup
npm i jspm@beta jspm-hmr -D && ./node_modules/.bin/jspm init && ./node_modules/.bin/jspm i systemjs-hot-reloader && ./node_modules/.bin/jspm-hmr -I && npm start
Now open app.js
or es6module.js
file from src
, make some changes and save to see Hot-Reload updates in running application without page reload!
npm i jspm@beta -D
./node_modules/.bin/jspm init
./node_modules/.bin/jspm i systemjs-hot-reloader
$ npm i jspm-hmr -D
Tip: You can install this module globally using -g flag and use it as a simple static http server in any folder on your machine
Pro-Tip: You can use --init flag to initialize your project with index.html, app.js, server.js files - configured with hot-module-reload out-of-the-box
$ jspm-hmr [path] [options]
Path: (default: .)
Options:
-h, --help output usage information
-V, --version output the version number
-I, --init run CLI Wizard to bootstrap your project
-O, --open open default browser on server start
--port <number> change default port number (default: 3000)
--address <address> change default address (default: localhost)
--cache <seconds> change default Cache-Control header max-age=<seconds> (default: -1)
--proxy <address:port> enable proxy of all requests to specified target
--proxy-route <route_pattern> change default route pattern to filter proxied requests (default: *)
-S, --ssl enable https (by default will use built-in self-signed cert)
--key <path> set path to ssl-key .pem file (will override built-in ssl-key)
--cert <path> set path to ssl-cert .pem file (will override built-in ssl-cert)
-F, --fallback [rewrite_target] enable HTML5 History Api Fallback (default: /index.html) [optional: change rewrite target]
--disable-hmr disable Hot-Reload (Chokidar Socket Server)
--verbose enable verbose logging for: fallback rewrites
https://github.com/piotrwitek/jspm-hmr/blob/master/boilerplate/server.js
/index.html
)$ jspm-hmr --fallback
4444
& open browser on server start (last active window takes precedence)$ jspm-hmr . --port 4444 --open
dist
directory with enabled proxy and target set to "http://localhost:1234" and proxy route pattern set to /api/
$ jspm-hmr dist --proxy http://localhost:1234 --proxy-route /api/
$ jspm-hmr --ssl
$ jspm-hmr --ssl --cache 3600
Chokidar process on dev server watches specified path for file changes and emits events through web socket to the browser web socket client to reload that particular JavaScript module that has been changed.
Uses:
Peer Dependencies:
MIT License
Copyright (c) 2016 Piotr Witek piotrek.witek@gmail.com (http://piotrwitek.github.io)
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
FAQs
Dev-Server with Hot-Reload for JSPM & SystemJS
The npm package jspm-hmr receives a total of 9 weekly downloads. As such, jspm-hmr popularity was classified as not popular.
We found that jspm-hmr demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
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.
Security News
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
Security News
The Linux Foundation is warning open source developers that compliance with global sanctions is mandatory, highlighting legal risks and restrictions on contributions.
Security News
Maven Central now validates Sigstore signatures, making it easier for developers to verify the provenance of Java packages.