<commit_before># Installation

 Babel and Webpack are recommended but not required. React Styleguidist works with Webpack 1 and Webpack 2.

1. Install from npm:

   ```bash
   npm install --save-dev react-styleguidist
   ```

2. Add a **`styleguide.config.js`** file into your project’s root folder. A simplest possible config looks like this:

   ```javascript
   module.exports = {
     title: 'My Great Style Guide',
     components: './lib/components/**/*.js',
   };
  ```

3. If you use transpilers to run your project files (JSX → JS, SCSS → CSS, etc.), you need to set them up for the style guide too.

   Styleguidist generates a Webpack config required for the style guide itself but you need to configure [Webpack loaders](https://webpack.github.io/docs/configuration.html#module-loaders) for your project.

   Add the `updateWebpackConfig` function to your `styleguide.config.js`:

   ```javascript
   const path = require('path');<commit_msg>Getting started: update installation instructions.<commit_after># Installation

*Webpack is a peer dependency but your project doesn’t have to use it. React Styleguidist works with Webpack 1 and Webpack 2. Babel is recommended but not required.*

1. Install Styleguidist and peer dependencies from npm:

   ```bash
   npm install --save-dev react-styleguidist react react-dom webpack
   ```

2. Add a **`styleguide.config.js`** file into your project’s root folder. A simplest possible config looks like this:

   ```javascript
   module.exports = {
     title: 'My Great Style Guide',
     components: './lib/components/**/*.js',
   };
  ```

3. If you use transpilers to run your project files (JSX → JS, SCSS → CSS, etc.), you need to set them up for the style guide too.

   Styleguidist generates a Webpack config required for the style guide itself but you need to configure [Webpack loaders](https://webpack.github.io/docs/configuration.html#module-loaders) for your project.

   Add the `updateWebpackConfig` function to your `styleguide.config.js`:

   ```javascript
   const path = require('path');
{'fraction_non_alphanumeric': 0.0994180407371484, 'fraction_numerical': 0.004849660523763337, 'mean_word_length': 3.7865429234338746, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 2, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4516077', 'n_tokens_mistral': 588, 'n_tokens_neox': 572, 'n_words': 249}