1
0
Эх сурвалжийг харах

Convert app.config to .js

Simon Legner 1 жил өмнө
parent
commit
5eaad64057

+ 0 - 18
assets/javascripts/app/config.coffee.erb

@@ -1,18 +0,0 @@
-app.config =
-  db_filename: 'db.json'
-  default_docs: <%= App.default_docs.to_json %>
-  docs_origin: '<%= App.docs_origin %>'
-  env: '<%= App.environment %>'
-  history_cache_size: 10
-  index_filename: 'index.json'
-  index_path: '/<%= App.docs_prefix %>'
-  max_results: 50
-  production_host: 'devdocs.io'
-  search_param: 'q'
-  sentry_dsn: '<%= App.sentry_dsn %>'
-  version: <%= Time.now.to_i %>
-  release: <%= Time.now.utc.httpdate.to_json %>
-  mathml_stylesheet: '/mathml.css'
-  favicon_spritesheet: '<%= image_path('sprites/docs.png') %>'
-  service_worker_path: '/service-worker.js'
-  service_worker_enabled: <%= App.environment == :production || ENV['ENABLE_SERVICE_WORKER'] == 'true' %>

+ 19 - 0
assets/javascripts/app/config.js.erb

@@ -0,0 +1,19 @@
+app.config = {
+  db_filename: 'db.json',
+  default_docs: <%= App.default_docs.to_json %>,
+  docs_origin: '<%= App.docs_origin %>',
+  env: '<%= App.environment %>',
+  history_cache_size: 10,
+  index_filename: 'index.json',
+  index_path: '/<%= App.docs_prefix %>',
+  max_results: 50,
+  production_host: 'devdocs.io',
+  search_param: 'q',
+  sentry_dsn: '<%= App.sentry_dsn %>',
+  version: <%= Time.now.to_i %>,
+  release: <%= Time.now.utc.httpdate.to_json %>,
+  mathml_stylesheet: '/mathml.css',
+  favicon_spritesheet: '<%= image_path('sprites/docs.png') %>',
+  service_worker_path: '/service-worker.js',
+  service_worker_enabled: <%= App.environment == :production || ENV['ENABLE_SERVICE_WORKER'] == 'true' %>,
+}