Skip to content

Instantly share code, notes, and snippets.

View asyncanup's full-sized avatar

Anup Bishnoi asyncanup

View GitHub Profile
var fs = require('fs'),
UglifyJS = require('uglify-js');
var express = require('express'),
app = express();
var repo = process.argv[2];
var html = fs.readFileSync(__dirname + '/' + repo + '/build/index.html').toString();
var js = UglifyJS.minify(__dirname + '/' + repo + '/build/' + repo + '.bundle.js').code;
//js = fs.readFileSync(__dirname + '/' + repo + '/build/' + repo + '.bundle.js').toString();
html = html.replace('<script src="' + repo + '.bundle.js"></script>', '<script>' + js + '</script>');
#!/usr/bin/env coffee
fs = require 'fs'
sh = require 'execSync'
config = require './package.json'
name = config.name = "#{config.name}-semver"
version = config.version = config.version.replace(/\./g, '') + '.0.0'