dskrepps / requirefrom Goto Github PK
View Code? Open in Web Editor NEWRequire from a directory relative to node_modules, flattening your require paths.
License: MIT License
Require from a directory relative to node_modules, flattening your require paths.
License: MIT License
THANKS!
Hi, it would be very helpful if the module 'propagates' the variables defined in it in the node.js environment.
Il'l explain better:
in your base example you wrote
var requireFrom = require('requirefrom')
var views = requireFrom('lib/components/framework/views/')
but it would be VERY helpful if 'views' would be visible in all the other node.js scripts (obiouvsly requiring "requirefrom"). What do you think?
Releases have not been tagged in git (and consequently do not appear in the "Releases" tab on Github). Since npmjs.com strips test directories out of their tarballs, it is important to have the github tarballs as well for packaging purposes. Could you please tag your releases?
Thanks!
Found this via the gist comments on Better local require() paths for Node.js. Mostly this seems like the best available option, and I'm going to try it for my server side node code. My guess is the dynamic nature of the require path throws browserify for a loop. Wondering if you know already if that is or isn't the case.
lib/
components/
framework/
veiws/
veiws
=> views
๐
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.