Create a nodejs application, which will decompose big svg to small pieces and save them as new svg files
Find target file in this repository, named paris_test.svg
Example:
Teh goal is to achieve each of these components as separate svg files. For example, after decompose, you will have some directory with files like
tower.svg moon.svg
and so on
Things should be implemented:
- Teh file should be uploaded through web browser.
- No fancy design needed, no ui, there can be just single button, that opens choose file dialog.
- Upload your code to your github account, and give us a link ;)
- Should be a clear instruction how to launch application
- Preserving element dimensions is not required, but will be a big plus.
Tips:
- Think about memory and disk efficiency
- Do not overlook things. The main goal, is to generate valid svg files with appropriate content.
- There is no difference, what you use, express /koa/ plain nodejs
- Exporting only tower == success. Exporting all items === double success
- Forget about texts.
You can use phantomjs, to calculate each component dimensions. This will significantly improve overall score, but not required.