Git Product home page Git Product logo

Comments (8)

bago avatar bago commented on May 20, 2024

Well, I'm not sure this would be ok. I think a template should include its own images.
The makeThumbs is just an helper function: you may want to use or not use it, you may want to generate your own thumbnail differently from the autogenerated ones.
So, I think it is ok to commit them.

They are not built as part of the library building, we just ignore what the library build builds.

from mosaico.

bwl21 avatar bwl21 commented on May 20, 2024

I understand. But this repository is a development repository. And If I understand right, the templates are primarily intended for demonstration. Shouldn't we consider the thumbnails of these templates therefore as part of the library build.

I do not insist ... please close the issue according to your decision.

from mosaico.

bago avatar bago commented on May 20, 2024

I have to think a bit about this. On the "other side" I evaluated to commit also the "dist" folder so that some users could run it without building (expecially using the php backend). Many js libraries do this, expecially when you want other tools to easily depend on your repository (e.g: via bower).

from mosaico.

bwl21 avatar bwl21 commented on May 20, 2024

I see your point. The github repository may not be able to serve both, a development repository and an "run out of the box" thing. Could we build the latter as a zip-File and deliver it as release. I ha(d)ve many questions until I learned that mosaico does not provide a ready to use application but

  • a library (dist)
  • an example application (index.html, editor.html, backend)
  • a sample set of templates (templates)

If one wants to play out of the box, mosaico.it is pretty fine. If one wants to run it on his local box, a mosaico-sample.zip is fine. For integrators it should be a mosaico-runtime.zip which contains the dist - folder only. These files should be integrated but not touched.

This brings me back to the point that if one clones the mosaico repository, he should perform the appropriate grunt tasks. In order to contribute back, no unintended change/commit of a file should happen.

from mosaico.

bago avatar bago commented on May 20, 2024

makeThumbs is not a "compiler" is a "generator" (precompiler?): you MAY want to use it or you MAY want to provide your own images. So, images generated by that "task" are not necessarily derived by the sources but are part of the sources (otherwise I would have added makeThumbs to the backend features and autogenerated them at runtime, in a working folder, the first time a template was loaded).

I'm convinced that at this time splitting mosaico would slow down the development and I don't want to over-engineering things.

Maybe in future we'll have a respository for each template and a website with a gallery of templates (free, opensource, commercial, who knows) and maybe we will have plenty of backends and demo applications, and also that we'll split mosaico.js in different projects (it already contains modules that could be used standalone or replaced) but in the mean time I like to have a single place to look.

Let's wait for more developers to approach the project and let's fix the issues once they give us problems.

(I updated the README so to avoid some confusion about the use of makeThumbs)

from mosaico.

bwl21 avatar bwl21 commented on May 20, 2024

I agree to your thoughts - even if they do not solve my issue: during development of my template I regenerate parts of the distribution which I then manually have to reset.

Would it be possible to change makeThumbs to have an argument with the template name. In this case I can utilize it for my own templates without regenerating the images for the templates provided by the distribution.

from mosaico.

bago avatar bago commented on May 20, 2024

Simply don't call "makeThumbs"
Call "makeThumbs:main:yourtemplatename" (README.md was saying this) only if you want to generate/update thumbnails.
If this makeThumbs update the thumbnails, push them to git.

Do you have other "generated files"?

from mosaico.

bwl21 avatar bwl21 commented on May 20, 2024

sorry, now I got it. It was my fault. I did not spot the change in commit 7310532

thanks

from mosaico.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.