docs/build.js
function copyResources() {
  // Source code deps
  fileUtil.copyFile(path.resolve(docsDir, '../dist/leonardo-ui.js'), path.resolve(docsDir, 'dist/leonardo-ui/leonardo-ui.js'));
  fileUtil.copyFile(path.resolve(docsDir, '../dist/leonardo-ui.js.map'), path.resolve(docsDir, 'dist/leonardo-ui/leonardo-ui.js.map'));
  fileUtil.copyFile(path.resolve(docsDir, '../dist/leonardo-ui.css'), path.resolve(docsDir, 'dist/leonardo-ui/leonardo-ui.css'));
  fileUtil.copyFile(path.resolve(docsDir, '../dist/leonardo-ui.css.map'), path.resolve(docsDir, 'dist/leonardo-ui/leonardo-ui.css.map'));
  fileUtil.copyFile(path.resolve(docsDir, '../dist/lui-icons.ttf'), path.resolve(docsDir, 'dist/leonardo-ui/lui-icons.ttf'));
  fileUtil.copyFile(path.resolve(docsDir, '../dist/lui-icons.woff'), path.resolve(docsDir, 'dist/leonardo-ui/lui-icons.woff'));

  // Doc files
  glob.sync(`${path.resolve(docsDir, 'src/img')}/**.*`).forEach((file) => {
    const folder = path.resolve(docsDir, 'src/img/').replace(/\\/g, '/'); // Because glob uses forward slashes on all paths
    const fileName = file.replace(folder, '');
    fileUtil.copyFile(file, path.resolve(docsDir, `dist/resources/${fileName}`));
  });
}
function copyResources() {
  // Source code deps
  fileUtil.copyFile(path.resolve(docsDir, '../dist/leonardo-ui.js'), path.resolve(docsDir, 'dist/leonardo-ui/leonardo-ui.js'));
  fileUtil.copyFile(path.resolve(docsDir, '../dist/leonardo-ui.js.map'), path.resolve(docsDir, 'dist/leonardo-ui/leonardo-ui.js.map'));
  fileUtil.copyFile(path.resolve(docsDir, '../dist/leonardo-ui.css'), path.resolve(docsDir, 'dist/leonardo-ui/leonardo-ui.css'));
  fileUtil.copyFile(path.resolve(docsDir, '../dist/leonardo-ui.css.map'), path.resolve(docsDir, 'dist/leonardo-ui/leonardo-ui.css.map'));
  fileUtil.copyFile(path.resolve(docsDir, '../dist/lui-icons.ttf'), path.resolve(docsDir, 'dist/leonardo-ui/lui-icons.ttf'));
  fileUtil.copyFile(path.resolve(docsDir, '../dist/lui-icons.woff'), path.resolve(docsDir, 'dist/leonardo-ui/lui-icons.woff'));

  // Doc files
  glob.sync(`${path.resolve(docsDir, 'src/img')}/**.*`).forEach((file) => {
    const folder = path.resolve(docsDir, 'src/img/').replace(/\\/g, '/'); // Because glob uses forward slashes on all paths
    const fileName = file.replace(folder, '');
    fileUtil.copyFile(file, path.resolve(docsDir, `dist/resources/${fileName}`));
  });
}
function copyResources ( ) { // Source code deps fileUtil . copyFile ( path . resolve ( docsDir , '../dist/leonardo-ui.js' ) , path . resolve ( docsDir , 'dist/leonardo-ui/leonardo-ui.js' ) ) ; fileUtil . copyFile ( path . resolve ( docsDir , '../dist/leonardo-ui.js.map' ) , path . resolve ( docsDir , 'dist/leonardo-ui/leonardo-ui.js.map' ) ) ; fileUtil . copyFile ( path . resolve ( docsDir , '../dist/leonardo-ui.css' ) , path . resolve ( docsDir , 'dist/leonardo-ui/leonardo-ui.css' ) ) ; fileUtil . copyFile ( path . resolve ( docsDir , '../dist/leonardo-ui.css.map' ) , path . resolve ( docsDir , 'dist/leonardo-ui/leonardo-ui.css.map' ) ) ; fileUtil . copyFile ( path . resolve ( docsDir , '../dist/lui-icons.ttf' ) , path . resolve ( docsDir , 'dist/leonardo-ui/lui-icons.ttf' ) ) ; fileUtil . copyFile ( path . resolve ( docsDir , '../dist/lui-icons.woff' ) , path . resolve ( docsDir , 'dist/leonardo-ui/lui-icons.woff' ) ) ; // Doc files glob . sync ( ` ${ path . resolve ( docsDir , 'src/img' ) } ` ) . forEach ( ( file ) => { const folder = path . resolve ( docsDir , 'src/img/' ) . replace ( / \\ / g , '/' ) ; // Because glob uses forward slashes on all paths const fileName = file . replace ( folder , '' ) ; fileUtil . copyFile ( file , path . resolve ( docsDir , ` ${ fileName } ` ) ) ; } ) ; }
Copy external libraries and images
Copy external libraries and images