mstenta / farm_client_module_template

Template for building a farmOS Field Module project.
GNU General Public License v2.0
0 stars 0 forks source link

Do not include src JavaScript #4

Open mstenta opened 4 years ago

mstenta commented 4 years ago

Creating a separate issue to address @jgaehring's comment here: https://github.com/jgaehring/farm_precipitation/pull/3#issuecomment-612148323

I assume it's the former. And if so, I wonder if it would make sense to restructure the PHP stuff, particularly so we're not necessarily including src files in the distribution package. Perhaps there are some best practices for how to do this in the Drupal world? Or perhaps it really doesn't matter?

Yes! We can omit the JS src files from the source. But we will also want to keep PHP that's in src, if the repo dev has provided it.

For example: farm_precipitation/src/FieldModule/Precipitation/Precipitation.php

But we could remove farm_precipitation/src/FieldModule/Precipitation/js/* (because that gets built by webpack into the dist folder).

So maybe we just delete anything that is within a js directory in src/FieldModule/[name], but leave other stuff alone (if it exists).