Merge branch 'decaffeinate-the-docs' into 'master'
Remove leftover references to coffeescript from comments and docs. I was looking at the front-end helper spec and noticed some outdated coffeescript refs in it. So I figured it wouldn't hurt to take a few minutes and remove all the coffeescript references in CE that we don't need anymore. I didn't touch any coffeescript references that could potentially break anything. Just docs and code comments. - [x] All builds are passing See merge request !7151
This commit is contained in:
commit
aba94f65f0
|
@ -1,6 +1,6 @@
|
|||
/* eslint-disable */
|
||||
// This is a manifest file that'll be compiled into including all the files listed below.
|
||||
// Add new JavaScript/Coffee code in separate files in this directory and they'll automatically
|
||||
// Add new JavaScript code in separate files in this directory and they'll automatically
|
||||
// be included in the compiled file accessible from http://example.com/assets/application.js
|
||||
// It's not advisable to add code directly here, but if you do, it'll appear at the bottom of the
|
||||
// the compiled file.
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/* eslint-disable */
|
||||
// This is a manifest file that'll be compiled into including all the files listed below.
|
||||
// Add new JavaScript/Coffee code in separate files in this directory and they'll automatically
|
||||
// Add new JavaScript code in separate files in this directory and they'll automatically
|
||||
// be included in the compiled file accessible from http://example.com/assets/application.js
|
||||
// It's not advisable to add code directly here, but if you do, it'll appear at the bottom of the
|
||||
// the compiled file.
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/* eslint-disable */
|
||||
// This is a manifest file that'll be compiled into including all the files listed below.
|
||||
// Add new JavaScript/Coffee code in separate files in this directory and they'll automatically
|
||||
// Add new JavaScript code in separate files in this directory and they'll automatically
|
||||
// be included in the compiled file accessible from http://example.com/assets/application.js
|
||||
// It's not advisable to add code directly here, but if you do, it'll appear at the bottom of the
|
||||
// the compiled file.
|
||||
|
|
|
@ -41,9 +41,9 @@ Rubocop](https://gitlab.com/gitlab-org/gitlab-ce/blob/8-4-stable/.rubocop.yml#L9
|
|||
|
||||
[Exception]: http://stackoverflow.com/q/10048173/223897
|
||||
|
||||
## Don't use inline CoffeeScript/JavaScript in views
|
||||
## Don't use inline JavaScript in views
|
||||
|
||||
Using the inline `:coffee` or `:coffeescript` Haml filters comes with a
|
||||
Using the inline `:javascript` Haml filters comes with a
|
||||
performance overhead. Using inline JavaScript is not a good way to structure your code and should be avoided.
|
||||
|
||||
_**Note:** We've [removed these two filters](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/config/initializers/hamlit.rb)
|
||||
|
@ -51,9 +51,7 @@ in an initializer._
|
|||
|
||||
### Further reading
|
||||
|
||||
- Pull Request: [Replace CoffeeScript block into JavaScript in Views](https://git.io/vztMu)
|
||||
- Stack Overflow: [Why you should not write inline JavaScript](http://programmers.stackexchange.com/questions/86589/why-should-i-avoid-inline-scripting)
|
||||
- Stack Overflow: [Performance implications of using :coffescript filter inside HAML templates?](http://stackoverflow.com/a/17571242/223897)
|
||||
|
||||
## ID-based CSS selectors need to be a bit more specific
|
||||
|
||||
|
|
|
@ -36,8 +36,8 @@ the command line via `bundle exec teaspoon`, or via a web browser at
|
|||
`http://localhost:3000/teaspoon` when the Rails server is running.
|
||||
|
||||
- JavaScript tests live in `spec/javascripts/`, matching the folder structure of
|
||||
`app/assets/javascripts/`: `app/assets/javascripts/behaviors/autosize.js.coffee` has a corresponding
|
||||
`spec/javascripts/behaviors/autosize_spec.js.coffee` file.
|
||||
`app/assets/javascripts/`: `app/assets/javascripts/behaviors/autosize.js.es6` has a corresponding
|
||||
`spec/javascripts/behaviors/autosize_spec.js.es6` file.
|
||||
- Haml fixtures required for JavaScript tests live in
|
||||
`spec/javascripts/fixtures`. They should contain the bare minimum amount of
|
||||
markup necessary for the test.
|
||||
|
|
|
@ -28,7 +28,7 @@
|
|||
// setTimeout(Teaspoon.execute, 1000)
|
||||
// Matching files
|
||||
// By default Teaspoon will look for files that match
|
||||
// _spec.{js,js.coffee,.coffee}. Add a filename_spec.js file in your spec path
|
||||
// _spec.{js,js.es6}. Add a filename_spec.js file in your spec path
|
||||
// and it'll be included in the default suite automatically. If you want to
|
||||
// customize suites, check out the configuration in teaspoon_env.rb
|
||||
// Manifest
|
||||
|
|
Loading…
Reference in New Issue