<commit_before>const gulp = require('gulp')
const gulpPlugins = require('gulp-load-plugins')()

const DIST = 'public/dist'
const STUFF_TO_REV = [
  'public/fonts/**/*',
  'public/images/**/*',

  // We javascript_include_tag('require.js') directly from rails
  'public/javascripts/vendor/require.js',
  'public/optimized/vendor/require.js',

  // But for all other javascript, we only load stuff using js_bundle.
  // Meaning that we only include stuff in the "bundles" dir from rails.
  // In prod, the 'optimized' versions of these bundles will include all their deps
  'public/javascripts/compiled/bundles/**/*',
  'public/optimized/compiled/bundles/**/*',

  // Special Cases:

  // These guys have links in their css to images from their own dir
  'public/javascripts/vendor/slickgrid/**/*',
  'public/javascripts/bower/jquery.smartbanner/**/*',
  'public/javascripts/bower/tinymce/skins/lightgray/**/*',

  // Include *everything* from plugins & client_apps
  // so we don't have to worry about their internals
  'public/plugins/**/*',
  'public/javascripts/client_apps**/*'
]


gulp.task('rev', () => {
  gulp.src(STUFF_TO_REV, {
    base: 'public', // tell it to use the 'public' folder as the base of all paths
    follow: true // follow symlinks, so it picks up on images inside plugins and stuff
  })
  .pipe(gulpPlugins.rev())
  .pipe(gulp.dest(DIST))
  .pipe(gulpPlugins.rev.manifest())
  .pipe(gulp.dest(DIST))
})

gulp.task('watch', () => {
  gulp.watch(STUFF_TO_REV, ['rev'])
})

gulp.task('default', ['rev', 'watch'])
<commit_msg>make sure plugin javascript bundles make it to CDN<commit_after>const gulp = require('gulp')
const gulpPlugins = require('gulp-load-plugins')()

const DIST = 'public/dist'
const STUFF_TO_REV = [
  'public/fonts/**/*',
  'public/images/**/*',

  // We javascript_include_tag('require.js') directly from rails
  'public/javascripts/vendor/require.js',
  'public/optimized/vendor/require.js',

  // But for all other javascript, we only load stuff using js_bundle.
  // Meaning that we only include stuff in the "bundles" dir from rails.
  // In prod, the 'optimized' versions of these bundles will include all their deps
  'public/javascripts/compiled/bundles/**/*',
  'public/optimized/compiled/bundles/**/*',
  'public/javascripts/plugins/*/compiled/bundles/**/*',
  'public/optimized/plugins/*/compiled/bundles/**/*',

  // Special Cases:

  // These guys have links in their css to images from their own dir
  'public/javascripts/vendor/slickgrid/**/*',
  'public/javascripts/bower/jquery.smartbanner/**/*',
  'public/javascripts/bower/tinymce/skins/lightgray/**/*',

  // Include *everything* from plugins & client_apps
  // so we don't have to worry about their internals
  'public/plugins/**/*',
  'public/javascripts/client_apps**/*'
]


gulp.task('rev', () => {
  gulp.src(STUFF_TO_REV, {
    base: 'public', // tell it to use the 'public' folder as the base of all paths
    follow: true // follow symlinks, so it picks up on images inside plugins and stuff
  })
  .pipe(gulpPlugins.rev())
  .pipe(gulp.dest(DIST))
  .pipe(gulpPlugins.rev.manifest())
  .pipe(gulp.dest(DIST))
})

gulp.task('watch', () => {
  gulp.watch(STUFF_TO_REV, ['rev'])
})

gulp.task('default', ['rev', 'watch'])

{'fraction_non_alphanumeric': 0.16476396174020363, 'fraction_numerical': 0.0, 'mean_word_length': 3.875187969924812, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 7, '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': '4287121', 'n_tokens_mistral': 1133, 'n_tokens_neox': 1075, 'n_words': 276}