Sha256: 6000324a5f06ac4ad5edbb8792c1927c1c3fad48559a09629ad420277006f9a8

Contents?: true

Size: 671 Bytes

Versions: 30

Compression:

Stored size: 671 Bytes

Contents

#!/usr/bin/env node

'use strict';

let fs = require('fs');
let buildify = require('buildify');
let rimraf = require('rimraf');
let path = 'resources/js';

if (fs.statSync(path).isDirectory()) {
  rimraf.sync(path);
  console.log('Removed existing resources/js files.');
}

fs.mkdirSync(path);
console.log('Created resources/js');

let files = fs.readdirSync('resources/json');

for (let file of files) {
  let name = path + '/' + file.split('.')[0] + '.js';

  buildify()
    .load('resources/json/' + file)
    .perform(function(content) {
      return 'module.exports = ' + content + ';';
    })
    .save(name);
  //console.log('Created ' + name);
}

process.exit();

Version data entries

30 entries across 30 versions & 1 rubygems

Version Path
adiwg-mdcodes-2.8.4 scripts/prepublish.js
adiwg-mdcodes-2.8.3 scripts/prepublish.js
adiwg-mdcodes-2.8.2 scripts/prepublish.js
adiwg-mdcodes-2.8.0 scripts/prepublish.js
adiwg-mdcodes-2.7.5 scripts/prepublish.js
adiwg-mdcodes-2.7.4 scripts/prepublish.js
adiwg-mdcodes-2.7.2 scripts/prepublish.js
adiwg-mdcodes-2.7.1 scripts/prepublish.js
adiwg-mdcodes-2.7.0 scripts/prepublish.js
adiwg-mdcodes-2.6.3 scripts/prepublish.js
adiwg-mdcodes-2.6.2 scripts/prepublish.js
adiwg-mdcodes-2.6.1 scripts/prepublish.js
adiwg-mdcodes-2.6.0 scripts/prepublish.js
adiwg-mdcodes-2.5.0 scripts/prepublish.js
adiwg-mdcodes-2.4.0 scripts/prepublish.js
adiwg-mdcodes-2.3.2 scripts/prepublish.js
adiwg-mdcodes-2.3.0 scripts/prepublish.js
adiwg-mdcodes-2.2.2 scripts/prepublish.js
adiwg-mdcodes-2.2.1 scripts/prepublish.js
adiwg-mdcodes-2.2.0 scripts/prepublish.js