<commit_before>/*
  Configures webpack to build all elements of the site.

  This file imports the basic configuration of actions (e.g. webpack.tests.js),
  and decorates them with path configurations and other project-specific setups.

  Note that configurations defined here are imported and further extended by webpack.production.config.js,
  meaning that changes here apply to debug and production builds unless they are undone in the production file.

  Where possible, favor making changes in webpack configuration from here as opposed
  to the shared configurations to keep it easy to apply upgrades.
*/
const path = require('path');
const webpackMerge = require('webpack-merge');
const ExtractTextPlugin = require('extract-text-webpack-plugin');
const PostCssPipelineWebpackPlugin = require('postcss-pipeline-webpack-plugin');
const HtmlWebpackPlugin = require('html-webpack-plugin');
const ProgressBarPlugin = require('progress-bar-webpack-plugin');
const CopyWebpackPlugin = require('copy-webpack-plugin');
const WebpackNotifierPlugin = require('webpack-notifier');
const OfflinePlugin = require('offline-plugin');
const FaviconsWebpackPlugin = require('favicons-webpack-plugin');

const skeletonConfig = require('../lib/skeleton-html-config.js');
const browserWorkflow = require('./browser');
const { source, baseUrl } = require('../../lib/path-helpers');
const {
  build: buildPipeline,
  linting: lintingPipeline
} = require('../lib/postcss-plugins.js');


/*
 *
 * CREATE WEBPACK CONFIGURATIONS
 * The shared base configurations imported earlier are augmented with paths and specific details here.
 *
 */

module.exports = (
  webpackMerge(
    browserWorkflow,
    {
      resolveLoader: {
        alias: {
          'prefix-variables-loader': path.resolve(__dirname, '../lib/prefix-variables-loader')
        }
      },
      module: {
        rules: [
          {
            test: /\.css$/,
            enforce: 'pre',
            loader: 'postcss-loader', // linting
            options: {
              plugins: lintingPipeline
            }
          },
          {
            test: /\.css$/,
            use: ExtractTextPlugin.extract('css-loader?-minimize&sourceMap')
          },
          {
            test: /\.css$/,
            use: 'prefix-variables-loader',
            include: [
              source('tags'),
              source('components'),
              source('styleguide/tags'),
              source('stylguide/components')
            ]
          }
        ]
      },
      plugins: [
        new ProgressBarPlugin(),
        new ExtractTextPlugin('assets/[name]-[hash].css'),
        new PostCssPipelineWebpackPlugin({
          suffix: undefined,
          pipeline: buildPipeline
        }),
        new WebpackNotifierPlugin({
          title: 'FC Build'
        }),
        new FaviconsWebpackPlugin({
          logo: source('favicon.png'),
          prefix: 'assets/favicons/[hash:8]-',
          icons: {
            android: true,
            appleIcon: true,
            appleStartup: false,
            coast: false,
            favicons: true,
            firefox: true,
            opengraph: false,
            twitter: false,
            yandex: false,
            windows: false
          }
        }),
        new CopyWebpackPlugin([{
          from: source('static'),
          to: 'assets/static'
        }], {
          ignore: ['README.md']
        }),
        new OfflinePlugin({
          publicPath: baseUrl,
          excludes: [
            '**/_*',
            '**/.*',
            '**/*.map'
          ],
          ServiceWorker: {
            output: 'assets/offline/sw.js'
          },
          AppCache: false
        }),
        new HtmlWebpackPlugin(Object.assign({}, skeletonConfig, {
          filename: '_skeleton.styleguide.html',
          mode: 'styleguide',
          baseUrl
        })),
        new HtmlWebpackPlugin(Object.assign({}, skeletonConfig, {
          filename: '_skeleton.html',
          excludeChunks: ['styleguide'],
          mode: 'page',
          baseUrl
        }))
      ]
    }
  )
);
<commit_msg>remove style guide skeleton from webpack<commit_after>/*
  Configures webpack to build all elements of the site.

  This file imports the basic configuration of actions (e.g. webpack.tests.js),
  and decorates them with path configurations and other project-specific setups.

  Note that configurations defined here are imported and further extended by webpack.production.config.js,
  meaning that changes here apply to debug and production builds unless they are undone in the production file.

  Where possible, favor making changes in webpack configuration from here as opposed
  to the shared configurations to keep it easy to apply upgrades.
*/
const path = require('path');
const webpackMerge = require('webpack-merge');
const ExtractTextPlugin = require('extract-text-webpack-plugin');
const PostCssPipelineWebpackPlugin = require('postcss-pipeline-webpack-plugin');
const HtmlWebpackPlugin = require('html-webpack-plugin');
const ProgressBarPlugin = require('progress-bar-webpack-plugin');
const CopyWebpackPlugin = require('copy-webpack-plugin');
const WebpackNotifierPlugin = require('webpack-notifier');
const OfflinePlugin = require('offline-plugin');
const FaviconsWebpackPlugin = require('favicons-webpack-plugin');

const skeletonConfig = require('../lib/skeleton-html-config.js');
const browserWorkflow = require('./browser');
const { source, baseUrl } = require('../../lib/path-helpers');
const {
  build: buildPipeline,
  linting: lintingPipeline
} = require('../lib/postcss-plugins.js');


/*
 *
 * CREATE WEBPACK CONFIGURATIONS
 * The shared base configurations imported earlier are augmented with paths and specific details here.
 *
 */

module.exports = (
  webpackMerge(
    browserWorkflow,
    {
      resolveLoader: {
        alias: {
          'prefix-variables-loader': path.resolve(__dirname, '../lib/prefix-variables-loader')
        }
      },
      module: {
        rules: [
          {
            test: /\.css$/,
            enforce: 'pre',
            loader: 'postcss-loader', // linting
            options: {
              plugins: lintingPipeline
            }
          },
          {
            test: /\.css$/,
            use: ExtractTextPlugin.extract('css-loader?-minimize&sourceMap')
          },
          {
            test: /\.css$/,
            use: 'prefix-variables-loader',
            include: [
              source('tags'),
              source('components'),
              source('styleguide/tags'),
              source('stylguide/components')
            ]
          }
        ]
      },
      plugins: [
        new ProgressBarPlugin(),
        new ExtractTextPlugin('assets/[name]-[hash].css'),
        new PostCssPipelineWebpackPlugin({
          suffix: undefined,
          pipeline: buildPipeline
        }),
        new WebpackNotifierPlugin({
          title: 'FC Build'
        }),
        new FaviconsWebpackPlugin({
          logo: source('favicon.png'),
          prefix: 'assets/favicons/[hash:8]-',
          icons: {
            android: true,
            appleIcon: true,
            appleStartup: false,
            coast: false,
            favicons: true,
            firefox: true,
            opengraph: false,
            twitter: false,
            yandex: false,
            windows: false
          }
        }),
        new CopyWebpackPlugin([{
          from: source('static'),
          to: 'assets/static'
        }], {
          ignore: ['README.md']
        }),
        new OfflinePlugin({
          publicPath: baseUrl,
          excludes: [
            '**/_*',
            '**/.*',
            '**/*.map'
          ],
          ServiceWorker: {
            output: 'assets/offline/sw.js'
          },
          AppCache: false
        }),
        new HtmlWebpackPlugin(Object.assign({}, skeletonConfig, {
          filename: '_skeleton.html',
          excludeChunks: ['styleguide'],
          mode: 'page',
          baseUrl
        }))
      ]
    }
  )
);

{'fraction_non_alphanumeric': 0.11818746120422098, 'fraction_numerical': 0.00024829298572315333, 'mean_word_length': 2.0160988393859975, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, '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': '4868419', 'n_tokens_mistral': 2136, 'n_tokens_neox': 2099, 'n_words': 515}