Question

I am trying to use Brunch.io in order to simplify my javascript life.

My app is a java web archive (.war) and I use Maven as a build tool.

I am planning to have a ./brunch directory at the same level as the ./src directory (see tree output below).

Before I switch to brunch, I have a few questions:

  • Can I specify public: '../src/main/webapp' as a path in config.coffee and safely use brunch without fear that it will delete content from src/main/webapp?
  • Can I leave my Thymeleaf templates in WEB-INF/web-templates?
  • Is there any other points to take into account?

Thanks in advance for your input.

Here is the output from the tree command:

./src/main/webapp/
├── fonts
│   ├── glyphicons-halflings-regular.eot
│   ├── glyphicons-halflings-regular.svg
│   ├── glyphicons-halflings-regular.ttf
│   └── glyphicons-halflings-regular.woff
├── js
│   ├── custom
│   │   ├── addressAutocomplete.js
│   │   ├── languageChooser.js
│   │   ├── messages.js
│   │   ├── postcodeChooser.js
│   │   ├── resendActivationEmail.js
│   │   ├── signup.js
│   │   ├── trainings.js
│   │   └── workExperiences.js
│   ├── libs
│   │   ├── angular.js
│   │   ├── bootstrap.js
│   │   ├── bootstrap.min.js
│   │   ├── jquery-1.10.2.js
│   │   └── jquery-ui-1.9.0.custom.js
│   └── plugins
│       ├── chosen.jquery.js
│       ├── chosen.jquery.min.js
│       ├── component.json
│       ├── jquery.maskedinput-1.3.js
│       ├── jquery.maskedinput-1.3.min.js
│       ├── select2.jquery.json
│       ├── select2.js
│       └── select2_locale_fr.js
├── media
│   ├── checked.png
│   ├── favicon.png
│   └── nav-active-arrow.png
├── styles
│   ├── bootstrap.css
│   ├── bootstrap.min.css
│   ├── bootstrap-theme.css
│   ├── bootstrap-theme.min.css
│   ├── chosen.css
│   ├── chosen-sprite.png
│   ├── select2.css
│   ├── select2-custom.css
│   ├── select2.png
│   ├── select2-spinner.gif
│   ├── select2x2.png
│   ├── signin.css
│   ├── sticky-footer-navbar.css
│   └── style.css
└── WEB-INF
    ├── spring
    │   └── webmvc-config.xml
    ├── tiles-defs.xml
    ├── web-templates
    │   ├── advertisement
    │   │   ├── childminder
    │   │   │   ├── edit.html
    │   │   │   ├── edit.html.old
    │   │   │   └── new.html
    │   │   ├── family
    │   │   │   ├── edit.html
    │   │   │   └── new.html
    │   │   └── views.xml
    │   ├── common
    │   │   ├── footer.html
    │   │   ├── header.html
    │   │   └── layout.html
    │   ├── conditions
    │   │   ├── cgv.html
    │   │   └── views.xml
    │   ├── curriculum
    │   │   ├── edit.html
    │   │   ├── main.html
    │   │   ├── new.html
    │   │   ├── trainings.html
    │   │   ├── views.xml
    │   │   └── work-experiences.html
    │   ├── errors
    │   │   ├── 403.html
    │   │   ├── 404.html
    │   │   ├── error.html
    │   │   └── views.xml
    │   ├── messages
    │   │   ├── body.html
    │   │   ├── messages.html
    │   │   └── views.xml
    │   ├── passwordReset
    │   │   ├── passwordReset.html
    │   │   ├── resetPassword.html
    │   │   ├── sendPasswordResetInfo.html
    │   │   └── views.xml
    │   ├── preference
    │   │   ├── address.html
    │   │   ├── email.html
    │   │   ├── password.html
    │   │   ├── preferenceMenu.html
    │   │   └── views.xml
    │   ├── search
    │   │   ├── advertisement.html
    │   │   ├── body.html
    │   │   ├── childminderAdvertisementSearchForm.html
    │   │   ├── childminderAdvertisementSearchResults.html
    │   │   ├── familyAdvertisementSearchForm.html
    │   │   ├── familyAdvertisementSearchResults.html
    │   │   ├── view.html
    │   │   └── views.xml
    │   ├── signin
    │   │   ├── signin.html
    │   │   ├── standardSignin.html
    │   │   └── views.xml
    │   └── signup
    │       ├── signup.html
    │       ├── standardSignup.html
    │       └── views.xml
    └── web.xml

23 directories, 92 files
Était-ce utile?

La solution

Can I specify public: '../src/main/webapp' as a path in config.coffee and safely use brunch without fear that it will delete content from src/main/webapp?

yes

Can I leave my Thymeleaf templates in WEB-INF/web-templates?

yes

Is there any other points to take into account?

I would suggest making "webapp" 100% auto-generated so that you could delete it freely. Also, to not keep generated stuff in repository.

This can be accomplished by moving all your stuff to app/assets directory, for example. Things from assets directories are copied as-is to public directory. But it's up to you.

Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top