Skip to content

Commit

Permalink
Remove hacky rewrite code to build visibility.js
Browse files Browse the repository at this point in the history
  • Loading branch information
ai committed Feb 27, 2014
1 parent f9f0c5c commit dc65309
Showing 1 changed file with 0 additions and 4 deletions.
4 changes: 0 additions & 4 deletions Cakefile
Expand Up @@ -126,8 +126,6 @@ task 'clean', 'Remove all generated files', ->
for file in fs.readdirSync('./')
fs.removeSync(file) if file.match(/\.gem$/)

fullPack = (file) ->

task 'min', 'Create minimized version of library', ->
uglify = require('uglify-js')

Expand All @@ -140,9 +138,7 @@ task 'min', 'Create minimized version of library', ->
fs.copySync(file, "pkg/#{name}-#{project.version()}.min.js")

core = fs.readFileSync('lib/visibility.core.js').toString()
core = core.replace('})();', '')
timers = fs.readFileSync('lib/visibility.timers.js').toString()
timers = timers.replace(/[\w\W]*var timers/, ' var timers')
fs.writeFileSync("pkg/visibility-#{project.version()}.min.js", core + timers)

packages = fs.readdirSync('pkg/').filter( (i) -> i.match(/\.js$/) )
Expand Down

0 comments on commit dc65309

Please sign in to comment.