Skip to content

Commit

Permalink
coffee test
Browse files Browse the repository at this point in the history
  • Loading branch information
amarcruz committed Oct 12, 2016
1 parent 4af5506 commit 6fd2637
Show file tree
Hide file tree
Showing 7 changed files with 21 additions and 5 deletions.
4 changes: 4 additions & 0 deletions .codeclimate.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@
engines:
fixme:
enabled: true
config:
strings:
- FIXME
- BUG

engines:
eslint:
Expand Down
1 change: 0 additions & 1 deletion .eslintrc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,6 @@ rules:
- 2
- "all"
- conditionalAssign: false
returnAssign: false
no-unexpected-multiline: 2 # Avoid code that looks like two expressions but is actually one
valid-jsdoc:
- 2
Expand Down
2 changes: 1 addition & 1 deletion lib/jscc.es.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion lib/jscc.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions src/check-options.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,13 +26,13 @@ export default function checkOptions (opts) {
values._VERSION = version
}

Object.keys(opts.values).forEach(v => {
Object.keys(opts.values).forEach((v) => {
if (!VARNAME.test(v)) {
throw new Error(`Invalid memvar name: ${v}`)
}
})

// sequence starting a directive, default is `//|/*` (JS comment)
// sequence starting a directive
const prefixes = opts.prefixes
if (!prefixes) {
opts.prefixes = ['//', '/*', '<!--']
Expand Down
7 changes: 7 additions & 0 deletions test/fixtures/ex-coffee1.coffee
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# #set _DEBUG true

### #if _DEBUG
console.log "debug mode"
### #else
console.log "production"
# #endif
6 changes: 6 additions & 0 deletions test/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -385,4 +385,10 @@ describe('Examples:', function () {
testFile('ex-hidden-blocks')
})

it('Changing prefixes to work with CoffeScript', function () {
testStr('ex-coffee1.coffee', 'debug mode', {
prefixes: ['# ', '### ']
})
})

})

0 comments on commit 6fd2637

Please sign in to comment.