<commit_before>//-- Pre/Post Processing
var cfg = require('../config');

var gulp = require('gulp'),
    util = require('gulp-util');


//--
gulp.task('compile:scripts', ['lint:scripts'], function() {
  /* Refs:
      http://browserify.org/articles.html
      https://viget.com/extend/gulp-browserify-starter-faq
      https://egghead.io/lessons/nodejs-introduction-to-browserify-part-1
      https://egghead.io/lessons/javascript-gulp-and-browserify-initial-setup
      https://www.npmjs.com/package/browserify
      https://www.npmjs.com/package/coffeeify
      https://www.npmjs.com/package/vinyl-source-stream
  */
  var browserify = require('browserify'),
       coffeeify = require('coffeeify'),
          source = require('vinyl-source-stream');

  var b = browserify({
    entries: cfg.resources.main_script,
    extensions: ['.coffee'],
    debug: true,
    transform: [coffeeify]
  });

  return b.bundle()
    .on('error', function(e) {
      util.log(e);
    })
    .pipe(source('main.js'))
    .pipe(gulp.dest(cfg.paths.dest + cfg.paths.scripts));
});


//--
gulp.task('compile:styles', ['lint:styles'], function() {
  /* Refs:
      https://www.npmjs.com/package/gulp-sourcemaps
      https://www.npmjs.com/package/gulp-stylus
      https://www.npmjs.com/package/axis
      https://www.npmjs.com/package/rupture
      https://www.npmjs.com/package/typographic
      https://www.npmjs.com/package/gulp-postcss
      https://www.npmjs.com/package/rucksack-css
      https://www.npmjs.com/package/lost
      https://www.npmjs.com/package/autoprefixer
  */
  var sourcemaps = require('gulp-sourcemaps');

  var typographic = require('typographic'),
             axis = require('axis'),
          rupture = require('rupture'),
           stylus = require('gulp-stylus');

  var autoprefixer = require('autoprefixer'),
              lost = require('lost'),
          rucksack = require('rucksack-css'),
           postcss = require('gulp-postcss');

  var processors = [rucksack({fallbacks: true}), lost(), autoprefixer()],
         plugins = [rupture(), typographic()];
//         plugins = [axis(), rupture(), typographic()];

  return gulp.src(cfg.resources.main_style)
    .pipe(sourcemaps.init())
    .pipe(stylus({use: plugins}))
    .pipe(postcss(processors))
    .on('error', function(e) {
      util.log(e);
    })
    .pipe(sourcemaps.write('.', {includeContent: false, sourceRoot: cfg.paths.src.slice(1)}))
    .pipe(gulp.dest(cfg.paths.dest + cfg.paths.styles));
});<commit_msg>Include regular CSS on @import<commit_after>//-- Pre/Post Processing
var cfg = require('../config');

var gulp = require('gulp'),
    util = require('gulp-util');


//--
gulp.task('compile:scripts', ['lint:scripts'], function() {
  /* Refs:
      http://browserify.org/articles.html
      https://viget.com/extend/gulp-browserify-starter-faq
      https://egghead.io/lessons/nodejs-introduction-to-browserify-part-1
      https://egghead.io/lessons/javascript-gulp-and-browserify-initial-setup
      https://www.npmjs.com/package/browserify
      https://www.npmjs.com/package/coffeeify
      https://www.npmjs.com/package/vinyl-source-stream
  */
  var browserify = require('browserify'),
       coffeeify = require('coffeeify'),
          source = require('vinyl-source-stream');

  var b = browserify({
    entries: cfg.resources.main_script,
    extensions: ['.coffee'],
    debug: true,
    transform: [coffeeify]
  });

  return b.bundle()
    .on('error', function(e) {
      util.log(e);
    })
    .pipe(source('main.js'))
    .pipe(gulp.dest(cfg.paths.dest + cfg.paths.scripts));
});


//--
gulp.task('compile:styles', ['lint:styles'], function() {
  /* Refs:
      https://www.npmjs.com/package/gulp-sourcemaps
      https://www.npmjs.com/package/gulp-stylus
      https://www.npmjs.com/package/axis
      https://www.npmjs.com/package/rupture
      https://www.npmjs.com/package/typographic
      https://www.npmjs.com/package/gulp-postcss
      https://www.npmjs.com/package/rucksack-css
      https://www.npmjs.com/package/lost
      https://www.npmjs.com/package/autoprefixer
  */
  var sourcemaps = require('gulp-sourcemaps');

  var typographic = require('typographic'),
             axis = require('axis'),
          rupture = require('rupture'),
           stylus = require('gulp-stylus');

  var autoprefixer = require('autoprefixer'),
              lost = require('lost'),
          rucksack = require('rucksack-css'),
           postcss = require('gulp-postcss');

  /* See https://github.com/jenius/axis/issues/222 */
  var processors = [rucksack({fallbacks: true}), lost(), autoprefixer()],
         plugins = [axis(), rupture(), typographic()];

  return gulp.src(cfg.resources.main_style)
    .pipe(sourcemaps.init())
    .pipe(stylus({'include css': true, use: plugins}))
    .pipe(postcss(processors))
    .on('error', function(e) {
      util.log(e);
    })
    .pipe(sourcemaps.write('.', {includeContent: false, sourceRoot: cfg.paths.src.slice(1)}))
    .pipe(gulp.dest(cfg.paths.dest + cfg.paths.styles));
});
{'fraction_non_alphanumeric': 0.1821790037705894, 'fraction_numerical': 0.0013891645167692002, 'mean_word_length': 2.9375, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 31, 'lorem ipsum': 0, 'www.': 24, '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': '76032', 'n_tokens_mistral': 1734, 'n_tokens_neox': 1637, 'n_words': 228}