-
Notifications
You must be signed in to change notification settings - Fork 11
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
refactor: get rid of coffeescript #29
Conversation
dbushong
commented
Jul 13, 2017
- port src/assertive.coffee to readable lib/assertive.js
- port test/*.test.coffee to js
- remove coffee dependencies & mocha linkage
- remove build step
- update README.md
- install working eslint modules & rules
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some small questions but looks great overall!
package.json
Outdated
"test": "mocha", | ||
"posttest": "nlm verify", | ||
"test-run": "coffeelint src test && mocha", | ||
"watch": "coffee --no-header -wcbo lib src & nodemon -w lib -w test -e coffee,js,json -x \"mocha\"" | ||
"test-run": "eslint lib test && mocha" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this still a thing? Looks like this effectively does the same as npm test
?
test/promisified.test.js
Outdated
// test the auto-promise-awarified versions of common tests | ||
|
||
const Bluebird = require('bluebird'); | ||
const assert = require('../lib/assertive'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we generally prefer require('../')
to ensure that the entry point works correctly.
test/assertive.test.js
Outdated
|
||
// helper from decaffeinate - useful for now | ||
/* eslint-disable */ | ||
function __range__(left, right, inclusive) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we want to add lodash
to the test dependencies for this?
* port src/assertive.coffee to readable lib/assertive.js * port test/*.test.coffee to js * remove coffee dependencies & mocha linkage * remove build step * update README.md * install working eslint modules & rules
there is an error being thrown when running
test-bundle.js: },{}],16:[function(require,module,exports){
(function (process){
'use strict';
/*
...
*/
// eat _ off the global scope, or require it ourselves if missing
// eslint-disable-next-line no-new-func
const global = Function('return this')();
let assert;
// eslint-disable-next-line global-require
const _ = global._ || require('lodash');
... |
D'oh. OK, pin the old version for the moment - I guess we'll use babel ;; |
@aaarichter should be fix as of #31 - will ship in a sec |
Hey David - no problem. A hint to use babel should do it too 😉 We will add babel to our js asset pipeline |