Permalink
Browse files

start the versioning process

  • Loading branch information...
1 parent 94f0e06 commit dfcf8af1b296b0b7f4e000d9f29186de97ac9b2b @maxtaco committed Jun 3, 2014
Showing with 11 additions and 8,789 deletions.
  1. +2 −1 CHANGELOG.md
  2. +8 −3 Cakefile
  3. +0 −12 extras/coffee-script-min.js
  4. +0 −8,772 extras/coffee-script.js
  5. +1 −1 package.json
View
@@ -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.
View
@@ -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()
@@ -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'
@@ -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

Large diffs are not rendered by default.

Oops, something went wrong.
Oops, something went wrong.

0 comments on commit dfcf8af

Please sign in to comment.