"Fossies" - the Fresh Open Source Software Archive

Member "Atom/resources/app/apm/node_modules/cuint/build.js" (8 Mar 2017, 577 Bytes) of archive /windows/misc/atom-windows.zip:


As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) Javascript source code syntax highlighting (style: standard) with prefixed line numbers and code folding option. Alternatively you can here view or download the uninterpreted source code file.

    1 var fs = require('fs')
    2 var path = require('path')
    3 var minify = require('minify')
    4 
    5 minify.optimize('lib/uint32.js', { returnName: true, callback: save('build/uint32.min.js') })
    6 fs.writeFileSync( 'build/uint32.js', fs.readFileSync('lib/uint32.js') )
    7 
    8 minify.optimize('lib/uint64.js', { returnName: true, callback: save('build/uint64.min.js') })
    9 fs.writeFileSync( 'build/uint64.js', fs.readFileSync('lib/uint64.js') )
   10 
   11 function save (filename) {
   12     return function (p) {
   13         console.log('Renaming ' + path.basename(p.name) + ' to ' + filename)
   14         fs.renameSync( p.name, filename )
   15     }
   16 }