Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feature Request] Add RunKit template for npm.runkit.com integration #55

Open
Olian04 opened this issue Apr 22, 2021 · 0 comments
Open
Labels
enhancement New feature or request Further design needed The proposal needs further time and thought put into it help wanted Extra attention is needed

Comments

@Olian04
Copy link
Owner

Olian04 commented Apr 22, 2021

Is your feature request related to a problem? Please describe.
NPM provides a "Try on RunKit" button, however the default template used by RunKit doesn't show off any features of better-logging.

var betterLogging = require("better-logging")

Describe the solution you'd like

As described in this article on RunKit+NPM we can define our own RunKit template by adding a property to package.json.

// package.json
{
  "name": "better-logging",
  "version": "4.5.0",
   "runkitExampleFilename": "./demo/runkit.template.js"
  // ...
}
// demo/runkit.template.js
require('better-logging')(console);

console.log('This will print fine!');
console.info('So will this!');
console.warn('And this!');
console.error('This one as well!');
console.debug('This won\'t! To low log level');

// Enable debug output
console.logLevel = 4;

console.log('This will print fine, AGAIN!');
console.info('So will this, AGAIN!');
console.warn('And this, AGAIN!');
console.error('This one as well, AGAIN!');
console.debug('Now this will print!');

Known issues

  • For some reason console.debug doesn't work at all (only on RunKit).
  • RunKit defaults to Node version 10.x, which better-logging doesn't support.

Additional context

Other
If this issues get resolved, then we could add a "Try on RunKit" badge to the readme.
Try better-logging on RunKit

@Olian04 Olian04 added Assessment Needed This issues has yet to be assessed by a contributor enhancement New feature or request and removed Assessment Needed This issues has yet to be assessed by a contributor labels Apr 22, 2021
@Olian04 Olian04 added Further design needed The proposal needs further time and thought put into it help wanted Extra attention is needed labels Nov 9, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request Further design needed The proposal needs further time and thought put into it help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

1 participant