Why Gemfury? Push, build, and install  RubyGems npm packages Python packages Maven artifacts PHP packages Go Modules Debian packages RPM packages NuGet packages

Repository URL to install this package:

Details    
@skava/bs / src / distPostProcess.ts
Size: Mime:
import { read, write } from 'flipfile'
import jetpack from 'fs-jetpack'
import { resolveToRoot } from './resolveToRoot'

const distManifest = resolveToRoot('dist/dist/bundled/client/assets.json')

const manifest = require(distManifest)
const fileName = manifest.index.js.split('/').pop()
const first = `${resolveToRoot('dist/dist/bundled/client')}/${fileName}`
console.log(first)

const code = read(first)
const matchNewLineOrTwoSpaces = /(\;( {2})|\n)/gm
const stripped = code.replace(/(\;( )+)/gm, '').replace(/\;(\n)+/gm, '')

console.log(`before: ${code.length}`)
console.log(`after: ${stripped.length}`)

const backup = `${first}.dev`
// write(backup, code)
// write(first, stripped)