imagine-js
v0.0.2
Published
Generate random schema.org-based data, populate RegExps, swig/django-like template system, sentences generator and more
Downloads
3
Readme
Imagine.js - tool for imaginary data*
* — WIP
Populate regexp-like syntax:
imagine(/https?:\/\/(?:www.)?(?:google.com|yandex.ru)/);
Populate json-generator notation:
imagine([ '{{repeat(5, 7)}}', { type: 'article', id: '{{ index }}', isPublished: '{{ bool }}', … } ])
Use set of primitives
imagine.int(0,10); imagine.float(-23.12,100.12); imagine.any("a", "b", "c"); imagine.bool(); …
Use localized data-providers …
Motivation
My proccess of making site was similar to:
- Paint design or sketches
- Do markup (HTML)
- Fill markup with some fake content
- Write styles
- Check how does everything look: if it’s bad, go to 2.
- Implement templates code based on the markup …
I'd feel better doing this:
- Paint design or sketches
- Implement templates. They are filled automatically with random data.
- Write CSS iteratively, testing it on different content …
It’s main goal of imagine.js.