Coder Social home page Coder Social logo

jthoms1 / docz-plugin-stencil Goto Github PK

View Code? Open in Web Editor NEW

This project forked from danielnetzer/docz-plugin-stencil

0.0 1.0 0.0 638 KB

Integrates Stencil auto generated markdown files into Docz with ease

JavaScript 10.22% CSS 0.01% TypeScript 84.25% HTML 5.52%

docz-plugin-stencil's Introduction

docz-plugin-stencil

Commitizen friendly Docz plugin to integrate easily with stenciljs

Example

Installation

  1. install the plugin and dev dependencies:
$ yarn add docz-plugin-stencil wait-on concurrently --dev
  1. add the plugin on your doczrc.js:
// doczrc.js
import { stencil } from 'docz-plugin-stencil'

export default {
  plugins: [
    stencil()
  ]
}
  1. modify package.json scripts to run docz in parallel with stencil
"scripts": {
    "docz:dev": "wait-on http://localhost:3333/ && docz dev",
    "docz:build": "docz build",
    "stencil:dev": "stencil build --watch --serve --docs",
    "stencil:build": "stencil build --docs",
    "build": "npm run stencil:build && npm run docz:build",
    "start": "concurrently \"npm run stencil:dev\" \"npm run docz:dev\"",
    ...
  }
  1. update stencil.config.ts file
  • if you want to use docz as the development platform you can remove the red diff
 outputTargets: [
    { type: "dist", esmLoaderPath: "../docs/loader" },
    ...
-   {
-     type: 'www',
-     serviceWorker: null, // disable service workers
-   },
    ]

Api

Playground files

each component that will have a playground.md file in his root directory, the plugin will auto generate a docz playground section accordingly.

Params

-- no params are allowed at the moment besides outputPath but it's preffered not to change it, if you do want to change that outputPath from docs then don't forget to update your stencil.config.js in the esmLoaderPath: "../<outputPath>/loader".

Contribution

All contribs are welcome, whether its unit tests for the plugin, further enhancements on the file system operations, better API control, enhancements to the props generated by the plugin so it'll support inner routes and auto generate playground's based on component's props.

License : MIT

docz-plugin-stencil's People

Contributors

ajitbohra avatar danielnetzer avatar felipeptcho avatar pedronauck avatar phamtm avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.