node package manager
Don’t reinvent the wheel. Reuse code within your team. Create a free org »

eze

EZE

Making creating meaninful demos / styleguides easy ❤️

Build Status NPM version

Powered by your github ⭐s

Install

Install

npm install eze --save-dev --save-exact

Create a ts (tsx) file (e.g. ./src/docs/main.ts)

import { render } from "../index";
 
/** Render documentation */
render({
  outputDir: __dirname + '/../../docs'
}, async eze => {
 
  /** Write some markdown */
  await eze.md(`
  # Demo
  This is the demo for eze
  `);
 
  /** Show some complete application demos */
  await eze.app({ entryPointPath: __dirname + '/app-1.tsx' });
});

Run it npm install ts-node --save --save-exact with package.json:

{
  "scripts": {
    "docs": "ts-node ./src/docs/main"  
  }
}

Now npm run docs builds the demos out to the specified folder. HTML + JavaScript. You can push that folder to s3 or surge.sh or even github 🌹

Ofcourse you can use js / raw node if you want to. But why would you.

Live Preview

For live development just use npm install starts --save-dev:

{
  "scripts": {
    "docs": "ts-node ./src/docs/main",
    "start": "ts-node ./src/starts", 
  }
}

starts.ts:

import { starts } from 'starts';
 
starts({
  serve: {
    dir: './docs',
    port: 4000
  },
  run: [
    { cmd: 'npm run docs', watch: ['src/**'] },
  ]
})

npm start 🌹

Demo

Jump to the demo for eze built with eze 📝