Comments (8)
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.
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.
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.
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.
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.
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.
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.
sorry, now I got it. It was my fault. I did not spot the change in commit 7310532
thanks
from mosaico.
Related Issues (20)
- tinymce changed its license to MIT. Does mosaico want to change too? HOT 1
- File upload broken HOT 2
- Responsive issues for custom template HOT 1
- Deal with imagesSources declaration with missing keys HOT 1
- Docker HOT 3
- Template preview generator ignores statements and thus moves content around. HOT 5
- Shift-enter in single line editables introduces <p> tags! (regression)
- Unexpected empty line at the end of editable contents in Chrome 95+
- Possibility to delete images HOT 2
- Placeholder generator HOT 3
- tinymce 4.x has a vulnerability, could mosaico be distributed with 5.x by default?
- The querystring API is considered Legacy. new code should use the URLSearchParams API instead HOT 2
- [help] Error code: STATUS_BREAKPOINT
- activate extended colorwheel
- boolean variable sets default to true instead of false HOT 2
- How to control which tiny editor is used in editable block
- tiny editor not full HOT 4
- [Feature] Fediverse social media buttons HOT 1
- Feature request: gif support HOT 2
- default value for select widget HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from mosaico.