GithubHelp home page GithubHelp logo

peteringram0 / babel-plugin-console-source Goto Github PK

View Code? Open in Web Editor NEW
37.0 2.0 5.0 13 KB

Add the file name and line numbers to all console logs.

JavaScript 100.00%
babel-plugin console-log logging babel line-numbers

babel-plugin-console-source's People

Contributors

peteringram0 avatar serusko 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

Watchers

 avatar  avatar

babel-plugin-console-source's Issues

Make splitSegment default os path splitter

If I have a multiplataform project with a .babelrc how can I solve splitSegment automatic detection without use babel.config.js?

The only solution i know its to check env process and make this configurable in a babel.config.js.

I would like to use in babelrc.

¿Could be this package autochecker os to use the correct path splitter?

Default is / but if i change to \ in my git to work windows it wont work in other machine with linux.

'segments' option is not working on Windows

Hey

Thanks for the plugin, it is much appreciated as babel 'meaningful-logs' is a bit too meaningful for me lol.
Though, I am afraid the option 'segments' in the .babelrc is not working for Windows paths as your index.js is splitting '/' and not ''.

file = state.file.opts.filename.split("/");

Demonstration

['console-source', { segments: 1, }],

gives me this

C:\Users\Temperance\...\server.js (35:4) C:\Users\Temperance\...\server.js (22:4) Server is listening on port 4529

(I have replaced full path using '...')

Options for file path

Allow custom options for the file name if we should print the full path or just the file name.

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.