intro-storybook-svelte-template Svelte Themes

Intro Storybook Svelte Template

About Boilerplate template for the Intro to Storybook tutorial for Svelte

Chromatic

Chromatic's Intro to Storybook Svelte template

This template ships with the main Svelte and Storybook configuration files you'll need to get up and running fast.

πŸš… Quick start

  1. Create the application.

    Use degit to get this template.

    # Clone the template
    npx degit chromaui/intro-storybook-svelte-template taskbox
    
  2. Install the dependencies.

    Navigate into your new site’s directory and install the necessary dependencies.

    # Navigate to the directory
    cd taskbox/
    
    # Install the dependencies
    yarn
    
  3. Open the source code and start editing!

    Open the taskbox directory in your code editor of choice and building your first component!

  4. Browse your stories!

    Run yarn storybook to see your component's stories at http://localhost:6006

πŸ”Ž What's inside?

A quick look at the top-level files and directories included with this template.

.
β”œβ”€β”€ .storybook
β”œβ”€β”€ node_modules
β”œβ”€β”€ public
β”œβ”€β”€ src
β”œβ”€β”€ .gitignore
β”œβ”€β”€ index.html
β”œβ”€β”€ jsconfig.json
β”œβ”€β”€ LICENSE
β”œβ”€β”€ package.json
β”œβ”€β”€ README.md
β”œβ”€β”€ svelte.config.js
β”œβ”€β”€ vite.config.js
└── yarn.lock
  1. .storybook: This directory contains Storybook's configuration files.

  2. node_modules: This directory contains all of the modules of code that your project depends on (npm packages).

  3. public: This directory will contain the development and production build of the site.

  4. src: This directory will contain all of the code related to what you will see on your application.

  5. .gitignore: This file tells git which files it should not track or maintain during the development process of your project.

  6. .index.html: This file is the main HTML page for your site. It's the template HTML file that Svelte will use to generate your site.

  7. jsconfig.json: This is a configuration file for VSCode that tells the editor how to handle the Svelte files.

  8. LICENSE: The template is licensed under the MIT licence.

  9. package.json: Standard manifest file for Node.js projects, which typically includes project specific metadata (such as the project's name, the author among other information). It's based on this file that npm will know which packages are necessary to the project.

  10. README.md: A text file containing useful reference information about the project.

  11. svelte.config.js: This is a configuration file for Svelte that tells the compiler how to handle the Svelte files.

  12. vite.config.js: This is a configuration file for Vite that tells the bundler how to build the project, which plugins to use and other settings.

  13. yarn.lock: This is an automatically generated file based on the exact versions of your npm dependencies that were installed for your project. (Do not change it manually).

Contribute

If you encounter an issue with the template, we encourage you to open an issue in this template's repository.

Learning Storybook

  1. Read our introductory tutorial at Learn Storybook.
  2. Learn how to transform your component libraries into design systems in our Design Systems for Developers tutorial.
  3. See our official documentation at Storybook.

Top categories

Loading Svelte Themes