Skip to content

Commit

Permalink
min node version now 0.10
Browse files Browse the repository at this point in the history
  • Loading branch information
balupton committed Mar 7, 2018
1 parent f16296e commit 7cd6b9e
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 7 deletions.
1 change: 1 addition & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ node_js:
matrix:
fast_finish: true
allow_failures:
- node_js: '0.8'
- node_js: '9'
cache:
directories:
Expand Down
1 change: 1 addition & 0 deletions HISTORY.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# History

## v2.7.0 2018 March 7
- Minimum supported node version now 0.10, as that now DocPad's min node version too
- Now uses CoffeeScript v2 for compilation for node versions which support it (at time of testing that is node v6 and above), otherwise uses CoffeeScript v1
- Now compiled with CoffeeScript v2
- Updated base files
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@
"url": "https://github.com/docpad/docpad-plugin-coffeescript.git"
},
"engines": {
"node": ">=0.8"
"node": ">=0.10"
},
"editions": [
{
Expand Down
11 changes: 5 additions & 6 deletions source/coffeescript.plugin.coffee
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
# Import
try
coffee = require('coffeescript')
catch
coffee = require('coffee-script')

# Export Plugin
module.exports = (BasePlugin) ->
Expand All @@ -17,12 +22,6 @@ module.exports = (BasePlugin) ->
{inExtension,outExtension,file} = opts
literate = false

# Import
try
coffee = require('coffeescript')
catch
coffee = require('coffee-script')

# CoffeeScript to JavaScript
if (inExtension in ['coffee','litcoffee'] and outExtension in ['js',null]) or (inExtension in ['md','markdown'] and outExtension is 'js' and literate = true)
# Prepare
Expand Down

0 comments on commit 7cd6b9e

Please sign in to comment.