Code Monkey home page Code Monkey logo

consolify's People

Contributors

albertyw avatar dependabot[bot] avatar jonnyreeves avatar mantoni avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

consolify's Issues

Clarify docs on simple use

This looks like a great project, but I'm puzzled by the output when trying to generate a simple page.

$ npm install browserify consolify
$ echo "console.log('hello')" > hello.js
$ browserify --plugin consolify hello.js > hello.html
$ cat hello.html 
(function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o<r.length;o++)s(r[o]);return s})({1:[function(require,module,exports){
console.log('hello')

},{}]},{},[1]);

That's the same output I get when bundling without the consolify plugin. It looks like listener.then is not getting called. Before digging any further, I thought I'd check if I was missing something obvious.

Fix CI

It seems travis-ci.org is shut down ("Since June 15th, 2021, the building on travis-ci.org is ceased. Please use travis-ci.com from now on.") so CI is currently broken for consolify. CI will need to be moved to travis-ci.com or another system to continue working.

JS API suggestion

it would be cool if I could do this:

var consolify = require('consolify')
consolify()
console.log('hi')

and then browserify that code and run it in a browser to get 'hi' written to the console. it would have to redirect console.log, console.error, console.info to the rendered console, and insert CSS + the console output into the and (through https://www.npmjs.org/package/insert-css maybe)

this is similar to how https://www.npmjs.org/package/console-log works, but I like the formatting in this module better, and the existing CLI use case is cool too

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.