All files / packages/design-system/scripts/helpers paths.js

0% Statements 0/6
100% Branches 0/0
100% Functions 0/0
0% Lines 0/6

Press n or j to go to the next uncovered block, b, p or k for the previous block.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67                                                                                                                                     
// Copyright (c) 2015-present, salesforce.com, inc. All rights reserved
// Licensed under BSD 3-Clause - see LICENSE.txt or git.io/sfdc-license
 
const path = require('path');
 
const root = path.resolve(__dirname, '../../');
const rootPath = path.resolve.bind(path, root);
 
const node_modules = path.resolve(__dirname, '../../../../node_modules');
 
const watchPaths = {
  css: [rootPath('assets/**/*.css')],
  sass: [rootPath('ui/**/*.scss'), rootPath('design-tokens/*.yml')],
  js: [rootPath('app_modules/**/*.{js,jsx}'), rootPath('ui/**/*.{js,jsx}'), rootPath('site/**/*.{js,jsx}')],
  tokens: [
    rootPath('ui/**/tokens/*.yml'),
    rootPath('design-tokens/**/*.yml'),
    '!' + rootPath('design-tokens/components.yml'),
  ],
};
 
module.exports = {
  root,
  rootPath,
  node_modules,
 
  assets: rootPath('assets'),
  ui: rootPath('ui'),
  designTokens: rootPath('design-tokens'),
  designPrimitiveTokens: path.resolve(node_modules, '@salesforce-ux/design-system-primitive-tokens'),
  sldsStylingHooksProps: rootPath('styling-hooks'),
  /**
   * Note: The path to the sdsStylingHooksProps below are related to WCAG.
   * In v2 of the sds-styling-hooks package, the props are no longer available.
   * Due to these structural changes, props files from v1 are copied over temporarily.
   * Those files can be removed once we merge WCAG with the global hooks.
   * See:
   * - `design-system-internal/scripts/gulp/generate/styling-hooks.js`
   * - `design-system-internal/styling-hooks/slds-hooks.json`
   */
  // Old sds-styling-hooks package 1.1.0-alpha.2
  // sdsStylingHooksProps: path.resolve(
  //   node_modules,
  //   '@salesforce-ux/sds-styling-hooks/src/props'
  // ),
  // New sds-styling-hooks package 2.0.0.beta.5
  sdsStylingHooksProps: path.resolve(
    root,
    'styling-hooks/@salesforce-ux-old-temp/sds-styling-hooks/src/props',
  ),
  sdsStylingAliases: path.resolve(node_modules, '@salesforce-ux/sds-styling-aliases/dist'),
  icons: path.resolve(node_modules, '@salesforce-ux/icons/dist/salesforce-lightning-design-system-icons'),
  uiKit: path.resolve(node_modules, '@salesforce-ux/design-system-ui-kit'),
 
  css: rootPath('.css'),
  dist: rootPath('dist'),
  build: rootPath('.build'),
  generated: rootPath('.generated'),
  html: rootPath('.html'),
  tmp: rootPath('.tmp'),
  test: rootPath('.test'),
  logs: rootPath('.logs'),
  reports: rootPath('.reports'),
 
  watch: watchPaths,
};