UNPKG

@geolid/ui-kit

Version:
32 lines (25 loc) 1 kB
// THIS FILE MAY NOT BE USEFUL // YOU CAN SAFELY DELETE IT AFTER 2018-03-01 const fs = require('fs'); const process = require('process'); const util = require('./util'); // SASS const cssContent = util.banner + util.renderSass(util.files.sass.src); const compiledCssContent = fs.readFileSync(util.files.sass.dist); const hash = util.md5(cssContent); const compiledHash = util.md5(compiledCssContent); if (hash != compiledHash) { throw new Error('Sass sources has changed. Have you forgot to build and commit your dist files?'); } // JS util.compile(util.files.js.src, {minify: false}).then(code => { const compiledJsContent = fs.readFileSync(util.files.js.dist); const hash = util.md5(code); const compiledHash = util.md5(compiledJsContent); if (hash != compiledHash) { throw new Error('JS sources has changed. Have you forgot to build and commit your dist files?'); } }).catch((err) => { console.log(err); process.exit(1); });