peteringram0 / babel-plugin-console-source Goto Github PK
View Code? Open in Web Editor NEWAdd the file name and line numbers to all console logs.
Add the file name and line numbers to all console logs.
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.
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("/");
['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 '...')
Allow custom options for the file name if we should print the full path or just the file name.
before/without plugin:
console.table(information);
🚫 after plugin:
console.table("details/information-controller.js (2044:12)", information);
✅ should be:
console.table(information);
See: https://developer.mozilla.org/de/docs/Web/API/Console/table
console.dir(...) should be fixed same as console.table(...)
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.