imagine-js

0.0.2 • Public • Published

Imagine.js - tool for imaginary data*

* — WIP

  1. Populate regexp-like syntax:

    imagine(/https?:\/\/(?:www.)?(?:google.com|yandex.ru)/);
  2. Populate json-generator notation:

    imagine([
        '{{repeat(5, 7)}}',
        {
            type: 'article',
            id: '{{ index }}',
            isPublished: '{{ bool }}',
            …
        }
    ])
  3. Use set of primitives

    imagine.int(0,10);
    imagine.float(-23.12,100.12);
    imagine.any("a", "b", "c");
    imagine.bool();
  4. Use localized data-providers …

Motivation

My proccess of making site was similar to:

  1. Paint design or sketches
  2. Do markup (HTML)
  3. Fill markup with some fake content
  4. Write styles
  5. Check how does everything look: if it’s bad, go to 2.
  6. Implement templates code based on the markup …

I'd feel better doing this:

  1. Paint design or sketches
  2. Implement templates. They are filled automatically with random data.
  3. Write CSS iteratively, testing it on different content …

It’s main goal of imagine.js.

Readme

Keywords

none

Package Sidebar

Install

npm i imagine-js

Weekly Downloads

0

Version

0.0.2

License

none

Last publish

Collaborators

  • dfcreative