javascript - Brunch - Requiring modules outside of app directory -
There are answers, but they are using the NPM module, whereas my problem is that the isomorphic internal code is included, Where I want to share the path between the brunch / backbone and the node / express but, if it is a fraud, then forgive in advance!
The following code is very simple / pseudo-BTW.
Currently, it works:
Web / Client / App / Lib / RoutorCopy root = required 'lib / RoutesList 'module Exports = class router provides backbone. Router Path: Routes.get () Web / Client / App / Lib / Street List Coffee module.exports = do () -> ; Receive: () - & gt;
Web client / app / lib / router coffee root = required '../../shared/routes/routesList' module .exports = class router provides backbone. Route Route: Roots.Gate () Web / Shared / Route / Routes List Coffee module.exports = do () - & gt; Receive: () - & gt; Returns {':' Dashboard ',' Settings': 'Settings'}
I'm not trying to get the node module to work with brunch - me Know that it is not supported - but is it possible that all these generic JS modules are added together in the app.js, when they are not in all app directories?
Many thanks!
Update:
I created the web / client / app / shared - & gt; Web / Shared and it works now, but I do not know if there is any cleaner way ...
../../ share path in the views seen in your brunch config: [' App ',' seller ',' ../../shared ']
root = required 'lib / RoutesList 'module Exports = class router provides backbone. Router Path: Routes.get () Web / Client / App / Lib / Street List Coffee module.exports = do () -> ; Receive: () - & gt;
Web client / app / lib / router coffee root = required '../../shared/routes/routesList' module .exports = class router provides backbone. Route Route: Roots.Gate () Web / Shared / Route / Routes List Coffee module.exports = do () - & gt; Receive: () - & gt; Returns {':' Dashboard ',' Settings': 'Settings'}
I'm not trying to get the node module to work with brunch - me Know that it is not supported - but is it possible that all these generic JS modules are added together in the app.js, when they are not in all app directories?
Many thanks!
Update:
I created the web / client / app / shared - & gt; Web / Shared and it works now, but I do not know if there is any cleaner way ...
../../ share path in the views seen in your brunch config: [' App ',' seller ',' ../../shared ']
Comments
Post a Comment