Por que exige que tente append um '.js' aos files de model .jst que são cairregados com o plugin de text!

Eu uso uma extensão .jst paira files de model e cairregue estes com o text requerido! plugair. Por exemplo,

define([ 'jquery', 'backbone', 'underscore', 'text!templates/MyView.jst' ], function($, Backbone, _, templateText) { return Backbone.View.extend({ template: _.template(templateText), initialize: function() { }, render: function() { } }); }); 

Isso funciona inundair quando eu testair localmente. No entanto, quando tento fazer isso depois de implementair meus files statics paira o AWS (as pairtes dinâmicas do aplicativo executado no Heroku), ele não consegue cairregair os files .jst e pairece estair tentando append um .js ao seu url's.

  • Como definir o cursor no final em um TEXTAREA? (ao não usair jQuery)
  • adicionando ID paira objects raphael
  • O path completo do vídeo com o Node.js
  • Não é possível configurair a airmadilha "aplicair" paira o object Proxy
  • Técnica Crossbrowser paira adicionair conteúdo HTML à área de transferência do user
  • como configurair o valor da checkbox de text paira cairregair o nome do file usando o javascript?
  • Paira reference, aqui está o meu requirejs config (do main.js)

     requirejs.config({ paths: { //directories plugins: "lib/plugins", //libs jquery: "lib/jquery/1.7.1/jquery", underscore: "lib/underscore/1.3.3/underscore", backbone: "lib/backbone/0.9.2/backbone", moment: "lib/moment", // date lib //require plugins text: "lib/require/plugins/text", domReady: "lib/require/plugins/domReady" }, shim: { //specify all non-AMD javascript files here. backbone: { deps: ['underscore', 'jquery'], exports: 'Backbone' }, underscore: { exports: '_' }, moment: { exports: 'moment' }, 'plugins/jquery.colorbox': ['jquery'], 'util/jquery.dropTree':['jquery'], 'util/common':['jquery'] } }); requirejs.config ({ requirejs.config({ paths: { //directories plugins: "lib/plugins", //libs jquery: "lib/jquery/1.7.1/jquery", underscore: "lib/underscore/1.3.3/underscore", backbone: "lib/backbone/0.9.2/backbone", moment: "lib/moment", // date lib //require plugins text: "lib/require/plugins/text", domReady: "lib/require/plugins/domReady" }, shim: { //specify all non-AMD javascript files here. backbone: { deps: ['underscore', 'jquery'], exports: 'Backbone' }, underscore: { exports: '_' }, moment: { exports: 'moment' }, 'plugins/jquery.colorbox': ['jquery'], 'util/jquery.dropTree':['jquery'], 'util/common':['jquery'] } }); paths: { requirejs.config({ paths: { //directories plugins: "lib/plugins", //libs jquery: "lib/jquery/1.7.1/jquery", underscore: "lib/underscore/1.3.3/underscore", backbone: "lib/backbone/0.9.2/backbone", moment: "lib/moment", // date lib //require plugins text: "lib/require/plugins/text", domReady: "lib/require/plugins/domReady" }, shim: { //specify all non-AMD javascript files here. backbone: { deps: ['underscore', 'jquery'], exports: 'Backbone' }, underscore: { exports: '_' }, moment: { exports: 'moment' }, 'plugins/jquery.colorbox': ['jquery'], 'util/jquery.dropTree':['jquery'], 'util/common':['jquery'] } }); // libs requirejs.config({ paths: { //directories plugins: "lib/plugins", //libs jquery: "lib/jquery/1.7.1/jquery", underscore: "lib/underscore/1.3.3/underscore", backbone: "lib/backbone/0.9.2/backbone", moment: "lib/moment", // date lib //require plugins text: "lib/require/plugins/text", domReady: "lib/require/plugins/domReady" }, shim: { //specify all non-AMD javascript files here. backbone: { deps: ['underscore', 'jquery'], exports: 'Backbone' }, underscore: { exports: '_' }, moment: { exports: 'moment' }, 'plugins/jquery.colorbox': ['jquery'], 'util/jquery.dropTree':['jquery'], 'util/common':['jquery'] } }); }, requirejs.config({ paths: { //directories plugins: "lib/plugins", //libs jquery: "lib/jquery/1.7.1/jquery", underscore: "lib/underscore/1.3.3/underscore", backbone: "lib/backbone/0.9.2/backbone", moment: "lib/moment", // date lib //require plugins text: "lib/require/plugins/text", domReady: "lib/require/plugins/domReady" }, shim: { //specify all non-AMD javascript files here. backbone: { deps: ['underscore', 'jquery'], exports: 'Backbone' }, underscore: { exports: '_' }, moment: { exports: 'moment' }, 'plugins/jquery.colorbox': ['jquery'], 'util/jquery.dropTree':['jquery'], 'util/common':['jquery'] } }); espinha dorsal: { requirejs.config({ paths: { //directories plugins: "lib/plugins", //libs jquery: "lib/jquery/1.7.1/jquery", underscore: "lib/underscore/1.3.3/underscore", backbone: "lib/backbone/0.9.2/backbone", moment: "lib/moment", // date lib //require plugins text: "lib/require/plugins/text", domReady: "lib/require/plugins/domReady" }, shim: { //specify all non-AMD javascript files here. backbone: { deps: ['underscore', 'jquery'], exports: 'Backbone' }, underscore: { exports: '_' }, moment: { exports: 'moment' }, 'plugins/jquery.colorbox': ['jquery'], 'util/jquery.dropTree':['jquery'], 'util/common':['jquery'] } }); deps: ['sublinhado', 'jquery'], requirejs.config({ paths: { //directories plugins: "lib/plugins", //libs jquery: "lib/jquery/1.7.1/jquery", underscore: "lib/underscore/1.3.3/underscore", backbone: "lib/backbone/0.9.2/backbone", moment: "lib/moment", // date lib //require plugins text: "lib/require/plugins/text", domReady: "lib/require/plugins/domReady" }, shim: { //specify all non-AMD javascript files here. backbone: { deps: ['underscore', 'jquery'], exports: 'Backbone' }, underscore: { exports: '_' }, moment: { exports: 'moment' }, 'plugins/jquery.colorbox': ['jquery'], 'util/jquery.dropTree':['jquery'], 'util/common':['jquery'] } }); exportações: 'Backbone' requirejs.config({ paths: { //directories plugins: "lib/plugins", //libs jquery: "lib/jquery/1.7.1/jquery", underscore: "lib/underscore/1.3.3/underscore", backbone: "lib/backbone/0.9.2/backbone", moment: "lib/moment", // date lib //require plugins text: "lib/require/plugins/text", domReady: "lib/require/plugins/domReady" }, shim: { //specify all non-AMD javascript files here. backbone: { deps: ['underscore', 'jquery'], exports: 'Backbone' }, underscore: { exports: '_' }, moment: { exports: 'moment' }, 'plugins/jquery.colorbox': ['jquery'], 'util/jquery.dropTree':['jquery'], 'util/common':['jquery'] } }); }, requirejs.config({ paths: { //directories plugins: "lib/plugins", //libs jquery: "lib/jquery/1.7.1/jquery", underscore: "lib/underscore/1.3.3/underscore", backbone: "lib/backbone/0.9.2/backbone", moment: "lib/moment", // date lib //require plugins text: "lib/require/plugins/text", domReady: "lib/require/plugins/domReady" }, shim: { //specify all non-AMD javascript files here. backbone: { deps: ['underscore', 'jquery'], exports: 'Backbone' }, underscore: { exports: '_' }, moment: { exports: 'moment' }, 'plugins/jquery.colorbox': ['jquery'], 'util/jquery.dropTree':['jquery'], 'util/common':['jquery'] } }); sublinhado: { requirejs.config({ paths: { //directories plugins: "lib/plugins", //libs jquery: "lib/jquery/1.7.1/jquery", underscore: "lib/underscore/1.3.3/underscore", backbone: "lib/backbone/0.9.2/backbone", moment: "lib/moment", // date lib //require plugins text: "lib/require/plugins/text", domReady: "lib/require/plugins/domReady" }, shim: { //specify all non-AMD javascript files here. backbone: { deps: ['underscore', 'jquery'], exports: 'Backbone' }, underscore: { exports: '_' }, moment: { exports: 'moment' }, 'plugins/jquery.colorbox': ['jquery'], 'util/jquery.dropTree':['jquery'], 'util/common':['jquery'] } }); exportações: '_' requirejs.config({ paths: { //directories plugins: "lib/plugins", //libs jquery: "lib/jquery/1.7.1/jquery", underscore: "lib/underscore/1.3.3/underscore", backbone: "lib/backbone/0.9.2/backbone", moment: "lib/moment", // date lib //require plugins text: "lib/require/plugins/text", domReady: "lib/require/plugins/domReady" }, shim: { //specify all non-AMD javascript files here. backbone: { deps: ['underscore', 'jquery'], exports: 'Backbone' }, underscore: { exports: '_' }, moment: { exports: 'moment' }, 'plugins/jquery.colorbox': ['jquery'], 'util/jquery.dropTree':['jquery'], 'util/common':['jquery'] } }); }, requirejs.config({ paths: { //directories plugins: "lib/plugins", //libs jquery: "lib/jquery/1.7.1/jquery", underscore: "lib/underscore/1.3.3/underscore", backbone: "lib/backbone/0.9.2/backbone", moment: "lib/moment", // date lib //require plugins text: "lib/require/plugins/text", domReady: "lib/require/plugins/domReady" }, shim: { //specify all non-AMD javascript files here. backbone: { deps: ['underscore', 'jquery'], exports: 'Backbone' }, underscore: { exports: '_' }, moment: { exports: 'moment' }, 'plugins/jquery.colorbox': ['jquery'], 'util/jquery.dropTree':['jquery'], 'util/common':['jquery'] } }); }, requirejs.config({ paths: { //directories plugins: "lib/plugins", //libs jquery: "lib/jquery/1.7.1/jquery", underscore: "lib/underscore/1.3.3/underscore", backbone: "lib/backbone/0.9.2/backbone", moment: "lib/moment", // date lib //require plugins text: "lib/require/plugins/text", domReady: "lib/require/plugins/domReady" }, shim: { //specify all non-AMD javascript files here. backbone: { deps: ['underscore', 'jquery'], exports: 'Backbone' }, underscore: { exports: '_' }, moment: { exports: 'moment' }, 'plugins/jquery.colorbox': ['jquery'], 'util/jquery.dropTree':['jquery'], 'util/common':['jquery'] } }); } requirejs.config({ paths: { //directories plugins: "lib/plugins", //libs jquery: "lib/jquery/1.7.1/jquery", underscore: "lib/underscore/1.3.3/underscore", backbone: "lib/backbone/0.9.2/backbone", moment: "lib/moment", // date lib //require plugins text: "lib/require/plugins/text", domReady: "lib/require/plugins/domReady" }, shim: { //specify all non-AMD javascript files here. backbone: { deps: ['underscore', 'jquery'], exports: 'Backbone' }, underscore: { exports: '_' }, moment: { exports: 'moment' }, 'plugins/jquery.colorbox': ['jquery'], 'util/jquery.dropTree':['jquery'], 'util/common':['jquery'] } }); 

  • Pairse Text CSS no JSON com Javascript
  • 0 vs '0' com operadores booleans
  • Problema do UserScript com Object.prototype
  • Como obter valor de jQuery.Deferred resolvido ()?
  • API de Spotify Apps: mais documentation?
  • Como atualizair uma propriedade de nó ou borda de visjs usando angulairjs?
  • One Solution collect form web for “Por que exige que tente append um '.js' aos files de model .jst que são cairregados com o plugin de text!”

    Acabei de atualizair o README de text.js com informações que explicam esse problema. É basicamente uma maneira de usair resources de text em todos os domínios, mas requer uma compilation. Existe uma maneira de replace. Detalhes aqui:

    https://github.com/requirejs/text#xhr-restrictions

    JavaScript é a melhor linguagem de programação de script e tem Node.js, AngularJS, vue.js e muitos bons framework JS.