Conversation
|
|
|
I'll look into this PR later but generally I think it's the right way to go, kudos! |
| @@ -0,0 +1 @@ | |||
| { "stage": 1 } No newline at end of file | |||
There was a problem hiding this comment.
Why use Babel 5? Here's a config for Babel 6:
{
"presets": [
"es2015",
"stage-1",
"react"
],
"plugins": [
"transform-decorators-legacy"
]
}Shouldn't we also have babel in the devDependencies:
"babel-core": "^6.9.0",
"babel-plugin-transform-decorators-legacy": "^1.3.4",
"babel-preset-es2015": "^6.9.0",
"babel-preset-react": "^6.5.0",
"babel-preset-stage-1": "^6.5.0",There was a problem hiding this comment.
Whoops, you are right. I was using babel6, I think that babel6 is just backwards-compatible?
I was enabling stage:1 to turn on decorators.
There was a problem hiding this comment.
Umm, Babel 6 is not backwards compatible, you must have Babel 5 running somehow (?). Decorators have been removed from stage 1 and are now in the transform-decorators-legacy plugin. So I guess this could be the config:
{
"presets": [
"es2015",
"react"
],
"plugins": [
"transform-decorators-legacy"
]
} "babel-core": "^6.9.0",
"babel-plugin-transform-decorators-legacy": "^1.3.4",
"babel-preset-es2015": "^6.9.0",
"babel-preset-react": "^6.5.0",There was a problem hiding this comment.
Sorry, I was confused. The repo is using babelify version 6.1.2, which uses babel-core version 5: https://github.com/babel/babelify/blob/v6.1.2/package.json
Anyway, upgrading to babel6 is something that we should do, but it's out-of-scope for this PR.
There was a problem hiding this comment.
babelify is only intended for demos that using ES6 syntax, the module itself (index.js) is written in pure ES5 so no transformation is needed.
But I guess it's been a long time since I released this repo initially, the tool chains changed a lot, maybe it worth upgrading to state of the art.
|
Any ideas on how to use this? |
@jasonslyvia
This is for issue #7
A few changes that should have a discerning eye:
src/core.jsactivate.call(this, rowIdentifier, handler);. I think the user should bind their handler themselves. I'll call that out in the documentation.require('react-menu-aim/decorator')work with this setup?Left to do:
/importing