Skip to content

Application Structure

Chris Hutchinson edited this page Nov 17, 2016 · 3 revisions
  • cardkit.js -- A built version of the core CardKit library, for use in Node.js and Webpack/Browserify environments
  • dom.js -- A built version of the CardKitDOM library, for use in Webpack/Browserify environments
  • server.js -- A built version of the CardKitServer library, for use in Node.js environments
  • dist -- All core, built files
    • cardkit.js -- The built core CardKit library to use in a <script> tag
    • dom.js -- The built CardKitDOM library for use in a <script> tag
    • README.md -- An example of how to use the files in this directory
  • docs/ -- The demo and documentation found at https://times.github.io/cardkit
  • examples/ -- Examples for how to use CardKit in all available environments
  • src/ -- All core, unbuilt files
    • cardkit.js -- The core CardKit library
    • demo-dom.js -- A demonstration file used when $ npm start is run in a local environment
    • helpers.js -- A helpers file that contains methods used across the app
    • index.html -- A simple HTML file that is used when $ npm start is run in a local environment
    • renderers/ -- Contains all the renderers
      • dom/ -- All code for CardKitDOM
        • ui/ -- The React-based UI for CardKitDOM
        • dom.js -- The base library for CardKitDOM
        • svgToImage.js -- A helper library used for converting an SVG to an image in the browser
      • server/ -- All code for CardKitServer
        • server.js -- The base library for CardKitServer
      • shared/ -- Code that is shared between the two bundled renderers
        • base.js -- A file that provides base logic for all renderers. Can be use to create custom renderers
        • Card.js -- A React component that renders the Card. Used for output in CardKitDOM, and for rendering to string in CardKitServer
  • test/ -- Unit tests for the entire library
  • webpack/ -- Webpack configuration for local serving and distribution