Questions tagged [requirejs-text]

45 questions
11
votes
1 answer

Inlining require.js text! using Grunt

I've been experimenting with Grunt and Require JS this afternoon. I'm a big fan of the text module and use it to bring in my templates. In non-Grunt based projects I used the inlineText and stubModules Require JS options to in-line the template…
10
votes
5 answers

Invoke the text plugin from requirejs mapping

I'm writing a web app using TypeScript, Backbone, and Mustache. I want to use Requirejs for dependency loading. I'm also using the Web Essentials visual studio plugin for TypeScript with the AMD compilation option turned on. For those that are not…
Khoi Pham
  • 189
  • 1
  • 10
10
votes
1 answer

RequireJS - Isolating jQuery versions and plugins within contexts

I have a project which utilizes multiple require contexts and dynamically loaded jQuery versions and plugins. (The jQuery versions will be centrally sourced and will not be inlined). jQuery integrity for the host and each context as well as plugin…
leachryanb
  • 151
  • 4
9
votes
3 answers

Read local file in AngularJS

I used to work with RequireJS and Backbone and used requirejs/text and requirejs-plugins to load local json files I normally use for configuration. How does one achieve the same with AngularJS? Everyone seems to suggest to use $http, but is this the…
user1241320
  • 453
  • 3
  • 7
  • 16
5
votes
2 answers

Building Durandal with Grunt (R.js + Text)

I would like to use Grunt to build a Durandal project, because Weyland remains completely undocumented and isn't as standard as Grunt. To do this, the grunt task needs to pull in all the js and html files during optimization, but I am unable to get…
Kyeotic
  • 19,153
  • 10
  • 64
  • 125
4
votes
1 answer

How does the text! plugin use the baseUrl?

I'm having an issue getting the text! plugin to work in my requirejs site. It's always including lib/ in the request url, however all of the other files (not using text!) are being successfully found and loaded. Here is my directory…
keithstric
  • 1,053
  • 1
  • 11
  • 21
4
votes
1 answer

RequireJS text plugin adding '.js' to file name but on same domain

I have an optimized RequireJS setup using the text plugin. I seem to be running into the '.js' filename being added to my module. I'm looking at this in Firefox 17. I read this entry, but I am pretty sure all my files are on the same domain. Why…
Stephen
  • 1,983
  • 2
  • 24
  • 53
3
votes
0 answers

Unhandled rejection Error: Load timeout for modules: template-registry-entry

We've created a plugin, and its local demo works. https://github.com/shaunluttin/aurelia-open-id-connect/tree/master/src Installing the plugin into another project, though, fails with this sequence of two errors, which are complaining about the…
Shaun Luttin
  • 107,550
  • 65
  • 332
  • 414
3
votes
1 answer

How can I use the require-js text-plugin with karma

I am trying to get the require-js text plugin to work with the karma-testrunner I downloaded both with npm. I got karma working with requirejs, it is only the text-plugin that is making me some trouble. When I add the text.js file to the files that…
ddd
  • 209
  • 4
  • 14
3
votes
1 answer

Marionette, how to change view's template on fly

I'm doing a single page webApp with Marionette and RequireJs, basically it is a Layout view nested with a lots of ItemView and compositeView. I want the page change to a new design by one click, so I want to ask a best practice about changing the…
Hetfield Joe
  • 1,401
  • 5
  • 15
  • 25
3
votes
1 answer

Is there a more concise way of including dependencies in RequireJS

Suppose I have a module that starts like the following: define(['jquery', 'actions', 'util', 'text!../templates/dialog.html!strip', 'text!../templates/requestRow.html!strip', 'text!../templates/respondForm.html!strip'], function($, actions, util,…
Patrick Grimard
  • 6,599
  • 6
  • 43
  • 63
3
votes
1 answer

requirejs text plugin interpret html as script

Im using the require.js text plugin (https://github.com/requirejs/text) to load my html modules from the server. The server has an other host so a allow coss-domain-request by useing Xhr in the require.config object. text: { useXhr: function…
Stefan B.
  • 242
  • 3
  • 12
3
votes
2 answers

Configure location of text.js

I'm using requirejs with the text plugin. By default, requirejs assumes text.js lives in your baseUrl. However, I want to keep it somewhere else. Where/how/when do I need to configure requirejs?
pje
  • 19,409
  • 9
  • 50
  • 67
2
votes
3 answers

RequireJS text plugin: cannot load HTML from other domain

I'd like to fetch some html from another domain with require.js. I know that CORS policies doesn't allow this easily. Note: I have configured the web server (with Access-Control-Allow-Origin "*" and other directives) and require.js so far that all…
robsch
  • 8,466
  • 8
  • 56
  • 87
2
votes
1 answer

Symfony and RequireJS - How to serve static html files?

RequireJS text plugin (https://github.com/requirejs/text) needs files with .html extension. It seems that the .html requirement cannot be changed. My html files are located in the web folder of my Symfony project. With the default configuration it…
Xavier13
  • 761
  • 7
  • 16
1
2 3