How to use the @jetbrains/ring-ui/webpack.config.componentsPath function in @jetbrains/ring-ui

To help you get started, we’ve selected a few @jetbrains/ring-ui examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github JetBrains / ring-ui / packages / docs / webpack.config.js View on Github external
const docpackSetup = require('./webpack-docs-plugin.setup');
const createEntriesList = require('./create-entries-list');

// Borrowed from webpack-dev-server
const colorInfo = msg => `\u001b[1m\u001b[34m${msg}\u001b[39m\u001b[22m`;

const ringUiPath = path.dirname(
  require.resolve('@jetbrains/ring-ui/package.json')
);
const publicPath = '/';
const distDir = 'dist';
const contentBase = path.resolve(__dirname, distDir);
const siteComponents = path.resolve(__dirname, 'components');

// For docs-app entry point
webpackConfig.componentsPath.push(siteComponents);
webpackConfig.loaders.svgSpriteLoader.include.push(
  require('@jetbrains/logos'),
  path.dirname(require.resolve('octicons/package.json'))
);

module.exports = (env = {}) => {
  const {server, production} = env;
  const envString = production ? 'production' : 'development';
  const envDefinition = {
    'process.env': {
      NODE_ENV: JSON.stringify(envString)
    }
  };
  const devtool = production ? false : 'cheap-eval-source-map';
  const dllPath = `dll-${envString}`;
  const optimizePlugins = production
github JetBrains / ring-ui / packages / docs / webpack.config.js View on Github external
const docpackSetup = require('./webpack-docs-plugin.setup');
const createEntriesList = require('./create-entries-list');

// Borrowed from webpack-dev-server
const colorInfo = msg => `\u001b[1m\u001b[34m${msg}\u001b[39m\u001b[22m`;

const ringUiPath = path.dirname(
  require.resolve('@jetbrains/ring-ui/package.json')
);
const publicPath = '/';
const distDir = 'dist';
const contentBase = path.resolve(__dirname, distDir);
const siteComponents = path.resolve(__dirname, 'components');

// For docs-app entry point
webpackConfig.componentsPath.push(siteComponents);
webpackConfig.loaders.svgSpriteLoader.include.push(
  require('@jetbrains/logos'),
  path.dirname(require.resolve('octicons/package.json'))
);

module.exports = (env = {}) => {
  const {server, production} = env;
  const envString = production ? 'production' : 'development';
  const envDefinition = {
    'process.env': {
      NODE_ENV: JSON.stringify(envString)
    }
  };
  const devtool = production ? false : 'cheap-eval-source-map';
  const dllPath = `dll-${envString}`;
  const optimizePlugins = production