-
Notifications
You must be signed in to change notification settings - Fork 10
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
Migrate asset pipeline to Webpack, use TS & React #95
Conversation
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.
Couple minor issues, but nice one @eessex 👍 I see there are plans on the horizon... for horizon
consumer.subscriptions.create( | ||
{ | ||
channel: "ProjectChannel", | ||
organization_id: $("#organization_subscription_identifier").val(), |
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.
If jquery isn't cool and you prefer a more modern/react-friendly alternative, this might be its only usage.
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.
Oo good call - going to make a follow-up task to remove jQuery and update this logic.
@jonallured - not sure what volts setup looks like, but at the min we should turn on |
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.
Whoa, nice one!! I don't have much to add here other than props for this heroic work. 🏆
Oh I do have one suggestion: by convention the default rake task on a Rails project runs all the linters/formatters/tests so I setup Convection like so:
https://github.com/artsy/convection/blob/master/Rakefile#L34
And then Circle just runs that same task:
https://github.com/artsy/convection/blob/master/hokusai/ci.sh#L29
I think this is handy because it means while deving I can run a bundle exec rake
and if it's green then I can reliably predict that CI will be green too. I realize that some of this is unnecessary for those that use VS Code and git hooks, but I think it's worth it to set this up so as to be friendly to other setups. What do you think?
@jonallured excellent suggestion! I've added a default rake task and am running prettier there now. |
"dependencies": {} | ||
"scripts": { | ||
"lint": "eslint ./app --ext ts,tsx,js,jsx --fix", | ||
"prettier": "prettier --write 'app/**/*.(ts|tsx|js|jsx)'", |
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 you'd want an additional script like this:
https://github.com/artsy/convection/blob/master/package.json#L6
This ensures that the rake task will fail if there are prettier violations - otherwise the rake task will write those files and happily return 0!!
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.
Will follow up to add this & rubocop
Adds TS/React front end toolchain:
webpacker
gem and compile JS assets via Webpacktypescript
,react
,@artsy/palette
andstyled-components