import { sass } from '@stencil/sass';
const { distDirs } = require('./package.json');
export const config = {
  namespace: 'ges-disc-components',
  buildEs5: false,
  taskQueue: 'async',
  plugins: [
    sass({
      includePaths: ['./node_modules'],
    }),
  ],
  globalScript: 'src/shared/scripts.ts',
  globalStyle: 'src/shared/styles.scss',
  devServer: {
    reloadStrategy: 'hmr',
    openBrowser: false,
  },
  outputTargets: [
    // creates /dist dir
    {
      type: 'dist',
      dir: distDirs.stencil,
    },
    // one file in es6
    {
      type: 'dist-custom-elements-bundle',
      dir: 'dist-bundled',
    },
    // creates readme.md for components
    {
      type: 'docs-readme',
      dir: distDirs.stencil,
    },
    // create components(.d.ts|json) into dist
    {
      type: 'docs-json',
      file: `${distDirs.stencil}/components.json`,
    },
    // create components ready for webapp
    {
      type: 'www',
      buildDir: 'components',
    },
  ],
};
