Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

perserve directory structure with @mods or @dirmods #87

Open
felixbecker opened this issue May 25, 2020 · 0 comments
Open

perserve directory structure with @mods or @dirmods #87

felixbecker opened this issue May 25, 2020 · 0 comments

Comments

@felixbecker
Copy link

Hi,
this is not really an issue and could be considered more as a question.

I try to adapt the following example especially the following lines: https://github.com/cortesi/modd/blob/master/examples/frontend.conf#L20-L29

my javascript folder structure is like this:

src/
   /controllers/
   -- hello_controller.js
  index.js

basically I have a folder structure that i would like to be preserved in the output directory otherwise browserify has problems with the given require statements

if I run the config as described in the config my .cache folder is flat

.cache
-- hellocontroller.js
-- index.js

I found @dirmods and thought this would solve my issue with the following config

src/**/*.js {
    prep: @bin/babel -s false -d .cache @dirmods 
    prep: @bin/browserify \
        .cache/index.js \
        -o web/templates/statics/js/bundle.js
}

The result is:

.cache/
  /controllers/
     -- hello_controller.js
-- hello_controller.js
-- index.js

close but not good. It creates an additional hello_controllers.js without the file structure - which I did not expect.
What do I miss here?
Thanks for any help :-)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant