Skip to content
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

Support for Rails "//= require" #377

Closed
dalexj opened this issue Jan 8, 2016 · 6 comments

Comments

@dalexj
Copy link

commented Jan 8, 2016

I would love = be added to the allowed characters after comments to support Rails's javascript manifest file

The file has lines such as:

//= require jquery
@bcomnes

This comment has been minimized.

Copy link
Member

commented Jan 8, 2016

Overloading comments seems inconsistent with standards alignment with commonjs' require statement. Why not just var $ = require('jquery') ?

@rstacruz

This comment has been minimized.

Copy link
Member

commented Jan 8, 2016

I develop Rails apps, and sorry, getting a CommonJS require/import workflow with Rails is more trouble than its worth. As a workaround, use this instead:

/*
 *= require jquery
 *= require turbolinks
 *= require such_and_such
 */

@rstacruz rstacruz closed this Jan 8, 2016

@dalexj

This comment has been minimized.

Copy link
Author

commented Jan 8, 2016

this works for me, thanks @rstacruz

@bcomnes

This comment has been minimized.

Copy link
Member

commented Jan 8, 2016

@rstacruz thanks for the clarification. 👍

@bcomnes

This comment has been minimized.

Copy link
Member

commented Jan 8, 2016

Should we add this to the FAQ?

@rstacruz

This comment has been minimized.

Copy link
Member

commented Jan 9, 2016

sure, sounds reasonable.

@lock lock bot locked as resolved and limited conversation to collaborators May 10, 2018

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
3 participants
You can’t perform that action at this time.