Move JS libraries to vendor/javascript
The silly motivation is that I wanted to remove `.prettierignore`, which just exists to omit that one folder from `npm run format`. But it also seems like this is the standard place to put them—a standard created long after we first set this up lol
This commit is contained in:
parent
0a5d369735
commit
5bf2ef42a0
16 changed files with 14 additions and 12 deletions
|
@ -1 +0,0 @@
|
||||||
/app/assets/javascripts/lib
|
|
|
@ -1,5 +1,6 @@
|
||||||
//= link_tree ../images
|
//= link_tree ../images
|
||||||
//= link_tree ../javascripts .js
|
//= link_tree ../javascripts .js
|
||||||
|
//= link_tree ../../../vendor/javascript .js
|
||||||
//= link_tree ../stylesheets .css
|
//= link_tree ../stylesheets .css
|
||||||
//= link_directory ../fonts .otf
|
//= link_directory ../fonts .otf
|
||||||
//= link_tree ../builds
|
//= link_tree ../builds
|
||||||
|
|
|
@ -24,8 +24,8 @@ class SwfAssetsController < ApplicationController
|
||||||
|
|
||||||
policy.script_src -> {
|
policy.script_src -> {
|
||||||
src_list(
|
src_list(
|
||||||
helpers.javascript_url("lib/easeljs.min"),
|
helpers.javascript_url("easeljs.min"),
|
||||||
helpers.javascript_url("lib/tweenjs.min"),
|
helpers.javascript_url("tweenjs.min"),
|
||||||
helpers.javascript_url("swf_assets/show"),
|
helpers.javascript_url("swf_assets/show"),
|
||||||
@swf_asset.canvas_movie_library_url,
|
@swf_asset.canvas_movie_library_url,
|
||||||
)
|
)
|
||||||
|
|
|
@ -152,7 +152,7 @@
|
||||||
|
|
||||||
- content_for :javascripts do
|
- content_for :javascripts do
|
||||||
= include_javascript_libraries :jquery, :jquery_tmpl
|
= include_javascript_libraries :jquery, :jquery_tmpl
|
||||||
= javascript_include_tag 'ajax_auth', 'lib/jquery.ui', 'lib/jquery.jgrowl',
|
= javascript_include_tag 'ajax_auth', 'jquery.ui', 'jquery.jgrowl',
|
||||||
defer: true
|
defer: true
|
||||||
|
|
||||||
- content_for :javascripts_body do
|
- content_for :javascripts_body do
|
||||||
|
|
|
@ -126,6 +126,6 @@
|
||||||
= page_stylesheet_link_tag "items/show"
|
= page_stylesheet_link_tag "items/show"
|
||||||
|
|
||||||
- content_for :javascripts do
|
- content_for :javascripts do
|
||||||
= javascript_include_tag "lib/idiomorph", async: true
|
= javascript_include_tag "idiomorph", async: true
|
||||||
= javascript_include_tag "outfit-viewer", async: true
|
= javascript_include_tag "outfit-viewer", async: true
|
||||||
= javascript_include_tag "items/show", async: true
|
= javascript_include_tag "items/show", async: true
|
||||||
|
|
|
@ -130,7 +130,7 @@
|
||||||
|
|
||||||
- content_for :javascripts do
|
- content_for :javascripts do
|
||||||
= include_javascript_libraries :jquery, :jquery_tmpl
|
= include_javascript_libraries :jquery, :jquery_tmpl
|
||||||
= javascript_include_tag 'ajax_auth', 'lib/jquery.timeago', defer: true
|
= javascript_include_tag 'ajax_auth', 'jquery.timeago', defer: true
|
||||||
|
|
||||||
- content_for :javascripts_body do
|
- content_for :javascripts_body do
|
||||||
= javascript_include_tag 'outfits/new', defer: true
|
= javascript_include_tag 'outfits/new', defer: true
|
||||||
|
|
|
@ -21,8 +21,8 @@
|
||||||
|
|
||||||
-# Load the scripts: EaselJS libs first, then the asset's "library" file,
|
-# Load the scripts: EaselJS libs first, then the asset's "library" file,
|
||||||
-# then our page script that starts the movie.
|
-# then our page script that starts the movie.
|
||||||
= javascript_include_tag "lib/easeljs.min", defer: true, debug: false
|
= javascript_include_tag "easeljs.min", defer: true, debug: false
|
||||||
= javascript_include_tag "lib/tweenjs.min", defer: true, debug: false
|
= javascript_include_tag "tweenjs.min", defer: true, debug: false
|
||||||
= javascript_include_tag @swf_asset.canvas_movie_library_url, defer: true,
|
= javascript_include_tag @swf_asset.canvas_movie_library_url, defer: true,
|
||||||
id: "canvas-movie-library"
|
id: "canvas-movie-library"
|
||||||
= javascript_include_tag "swf_assets/show", defer: true, debug: false
|
= javascript_include_tag "swf_assets/show", defer: true, debug: false
|
||||||
|
|
|
@ -57,7 +57,6 @@ module OpenneoImpressItems
|
||||||
|
|
||||||
config.assets.enabled = true
|
config.assets.enabled = true
|
||||||
config.assets.version = '1.0'
|
config.assets.version = '1.0'
|
||||||
config.assets.paths << Rails.root.join('app', 'assets', 'fonts')
|
|
||||||
config.assets.precompile << '*.js'
|
config.assets.precompile << '*.js'
|
||||||
config.assets.initialize_on_precompile = false
|
config.assets.initialize_on_precompile = false
|
||||||
config.assets.css_compressor = nil # Sass's compressor can't handle all modern CSS…
|
config.assets.css_compressor = nil # Sass's compressor can't handle all modern CSS…
|
||||||
|
|
|
@ -4,7 +4,10 @@
|
||||||
Rails.application.config.assets.version = "1.0"
|
Rails.application.config.assets.version = "1.0"
|
||||||
|
|
||||||
# Add additional assets to the asset load path.
|
# Add additional assets to the asset load path.
|
||||||
# Rails.application.config.assets.paths << Emoji.images_path
|
Rails.application.config.assets.paths += [
|
||||||
|
Rails.root.join('app', 'assets', 'fonts'),
|
||||||
|
Rails.root.join('vendor', 'javascript'),
|
||||||
|
]
|
||||||
|
|
||||||
# Precompile additional assets.
|
# Precompile additional assets.
|
||||||
# application.js, application.css, and all non-JS/CSS in the app/assets
|
# application.js, application.css, and all non-JS/CSS in the app/assets
|
||||||
|
|
Loading…
Reference in a new issue