Skip to content

Commit

Permalink
start the versioning process
Browse files Browse the repository at this point in the history
  • Loading branch information
maxtaco committed Jun 3, 2014
1 parent 94f0e06 commit dfcf8af
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 8,789 deletions.
3 changes: 2 additions & 1 deletion CHANGELOG.md
Expand Up @@ -5,7 +5,8 @@ Features:

- Factor out runtime, which is now available via `iced-runtime`
- Build the browser package via browserify, not via ad-hoc mechanism
- Build both coffee-script.js and coffee-script-min.js
- Build both coffee-script.js and coffee-script-min.js, now renamed
to iced-coffee-script-#{VERSION}.js and iced-coffee-script-#{VERSION}-min.js
- Remove other build packages, since now the main library is sucked in with
browserify.

Expand Down
11 changes: 8 additions & 3 deletions Cakefile
Expand Up @@ -108,6 +108,11 @@ task 'build:parser', 'rebuild the Jison parser (run build first)', ->
parser = require('./lib/coffee-script/grammar').parser
fs.writeFile 'lib/coffee-script/parser.js', parser.generate()

outFileName = (min) ->
{version} = require('./package.json')
fn = "iced-coffee-script-#{version}#{if min then '-min' else ''}.js"
path.join "extras", fn

task 'build:browser', 'rebuild the merged script for inclusion in the browser', ->
browserify = require 'browserify'
b = browserify()
Expand All @@ -116,10 +121,10 @@ task 'build:browser', 'rebuild the merged script for inclusion in the browser',
console.error err if err?
code = "(function(root){\n" + code + "\nroot.CoffeeScript = CoffeeScript;\n})(this);"

fs.writeFileSync 'extras/coffee-script.js', header + '\n' + code
fs.writeFileSync outFileName(false), header + '\n' + code
unless process.env.MINIFY is 'false'
{code} = require('uglify-js').minify code, fromString: true
fs.writeFileSync 'extras/coffee-script-min.js', header + '\n' + code
fs.writeFileSync outFileName(true), header + '\n' + code

console.log "built ... running browser tests:"
invoke 'test:browser'
Expand Down Expand Up @@ -261,7 +266,7 @@ task 'test', 'run the CoffeeScript language test suite', ->
runTests CoffeeScript

task 'test:browser', 'run the test suite against the merged browser script', ->
source = fs.readFileSync 'extras/coffee-script.js', 'utf-8'
source = fs.readFileSync outFileName(true), 'utf-8'
result = {}
global.testingBrowser = yes
(-> eval source).call result
Expand Down
12 changes: 0 additions & 12 deletions extras/coffee-script-min.js

This file was deleted.

0 comments on commit dfcf8af

Please sign in to comment.