<commit_before>#! /usr/bin/env node

const shelljs = require('shelljs');

const sourceDir = "./src/scss";
const outputDir = "./dist";
const compiledFile = `${outputDir}/gaiden.css`;
const minifiedFile = `${outputDir}/gaiden.min.css`;

const options = {
  sass: ` --include-path ${sourceDir} \
    --output-style compressed \
    -o ${outputDir}`,
  cssnano: `--replace true \
    --no-autoprefixer \
    --safe \
    --sourcemap false`,
  mqpacker: `-s`,
  postcss: `--use autoprefixer -o ${minifiedFile} ${compiledFile}`,
  sasslint: `-c ./sass-lint.yml -v`
}

const sassLintExec = shelljs.exec(`sass-lint ${options.sasslint}`);

if (sassLintExec.code !== 0) {
  return shelljs.error(sassLintExec.stderr);
}

shelljs.echo('SassLint ok!');

shelljs.exec(`node-sass ${options.sass} ${sourceDir} ${compiledFile}`);
shelljs.exec(`mqpacker ${options.mqpacker} ${compiledFile} ${compiledFile}`);
shelljs.exec(`cssnano ${options.cssnano} ${compiledFile} ${minifiedFile}`);
shelljs.exec(`postcss ${options.postcss}`);<commit_msg>Inverting options of postcss CLI. Before we aren't using autoprefixer correctly<commit_after>#! /usr/bin/env node

const shelljs = require('shelljs');

const sourceDir = "./src/scss";
const outputDir = "./dist";
const compiledFile = `${outputDir}/gaiden.css`;
const minifiedFile = `${outputDir}/gaiden.min.css`;

const options = {
  sass: ` --include-path ${sourceDir} \
    --output-style compressed \
    -o ${outputDir}`,
  cssnano: `--replace true \
    --no-autoprefixer \
    --safe \
    --sourcemap false`,
  mqpacker: `-s`,
  postcss: `--use autoprefixer ${compiledFile} -o ${minifiedFile}`,
  sasslint: `-c ./sass-lint.yml -v`
}

const sassLintExec = shelljs.exec(`sass-lint ${options.sasslint}`);

if (sassLintExec.code !== 0) {
  return shelljs.error(sassLintExec.stderr);
}

shelljs.echo('SassLint ok!');

shelljs.exec(`node-sass ${options.sass} ${sourceDir} ${compiledFile}`);
shelljs.exec(`mqpacker ${options.mqpacker} ${compiledFile} ${compiledFile}`);
shelljs.exec(`cssnano ${options.cssnano} ${compiledFile} ${minifiedFile}`);
shelljs.exec(`postcss ${options.postcss}`);
{'fraction_non_alphanumeric': 0.1924170616113744, 'fraction_numerical': 0.0009478672985781991, 'mean_word_length': 4.4689119170984455, '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': '2602505', 'n_tokens_mistral': 783, 'n_tokens_neox': 780, 'n_words': 151}