<commit_before>const { src, dest } = require('gulp');
const rename = require('gulp-rename');

function copyFA() {
  return src(require.resolve('@fortawesome/fontawesome/styles.css'))
    .pipe(rename('fontawesome.css'))
    .pipe(dest('dist/assets/icons'));
}

function copyAssets() {
  return src('src/patternfly/assets/**').pipe(dest('static/assets'));
}

function copySource(sassFiles) {
  return Promise.all([
    // Copy source files
    src(sassFiles).pipe(dest('dist')),
    // Copy excluded source files
    src([
      'src/patternfly/_*.scss',
      'src/patternfly/**/_all.scss',
      'src/patternfly/patternfly-imports.scss',
      'src/patternfly/{components,layouts,patterns,utilities}/**/*.scss'
    ]).pipe(dest('dist')),
    src('src/patternfly/sass-utilities/*').pipe(dest('dist/sass-utilities')),
    // Assets
    src('static/assets/images/**/*').pipe(dest('dist/assets/images/')),
    src('src/patternfly/assets/**/*').pipe(dest('dist/assets/')),
    // Icons
    src('src/icons/definitions/*').pipe(dest('dist/icons/')),
    src('src/icons/PfIcons/*').pipe(dest('dist/icons/PfIcons/')),
    // For NPM
    src('README.md').pipe(dest('dist')),
    src('package.json').pipe(dest('dist'))
  ]);
}

function copyDocs() {
  return Promise.all([
    src('src/site/**').pipe(dest('dist/site')),
    src('src/patternfly/{components,layouts,patterns,utilities}/**/*.{md,hbs,css}').pipe(dest('dist/site/docs')),
    src('RELEASE-NOTES.md').pipe(dest('dist'))
  ]);
}

module.exports = {
  copyAssets,
  copyFA,
  copySource,
  copyDocs
};
<commit_msg>fix(demos): publish demos to NPM (#2908)<commit_after>const { src, dest } = require('gulp');
const rename = require('gulp-rename');

function copyFA() {
  return src(require.resolve('@fortawesome/fontawesome/styles.css'))
    .pipe(rename('fontawesome.css'))
    .pipe(dest('dist/assets/icons'));
}

function copyAssets() {
  return src('src/patternfly/assets/**').pipe(dest('static/assets'));
}

function copySource(sassFiles) {
  return Promise.all([
    // Copy source files
    src(sassFiles).pipe(dest('dist')),
    // Copy excluded source files
    src([
      'src/patternfly/_*.scss',
      'src/patternfly/**/_all.scss',
      'src/patternfly/patternfly-imports.scss',
      'src/patternfly/{components,layouts,patterns,utilities}/**/*.scss'
    ]).pipe(dest('dist')),
    src('src/patternfly/sass-utilities/*').pipe(dest('dist/sass-utilities')),
    // Assets
    src('static/assets/images/**/*').pipe(dest('dist/assets/images/')),
    src('src/patternfly/assets/**/*').pipe(dest('dist/assets/')),
    // Icons
    src('src/icons/definitions/*').pipe(dest('dist/icons/')),
    src('src/icons/PfIcons/*').pipe(dest('dist/icons/PfIcons/')),
    // For NPM
    src('README.md').pipe(dest('dist')),
    src('package.json').pipe(dest('dist'))
  ]);
}

function copyDocs() {
  return Promise.all([
    src('src/site/**').pipe(dest('dist/site')),
    src('src/patternfly/{components,layouts,patterns,utilities,demos}/**/*.{md,hbs,css}').pipe(dest('dist/site/docs')),
    src('RELEASE-NOTES.md').pipe(dest('dist'))
  ]);
}

module.exports = {
  copyAssets,
  copyFA,
  copySource,
  copyDocs
};

{'fraction_non_alphanumeric': 0.2280923758304334, 'fraction_numerical': 0.0012654223347042075, 'mean_word_length': 4.0673076923076925, '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': '6769729', 'n_tokens_mistral': 1135, 'n_tokens_neox': 1122, 'n_words': 121}