Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
Excluding inline define when optimizing?
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  2 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
itodd  
View profile  
 More options Mar 30 2012, 3:09 pm
From: itodd <t...@adimab.com>
Date: Fri, 30 Mar 2012 12:09:20 -0700 (PDT)
Local: Fri, Mar 30 2012 3:09 pm
Subject: Excluding inline define when optimizing?

I may be doing this the wrong way (I would welcome suggestions on the best
way for bootstrapping my scripts with user-specific data). I have a define
statement that sets some user_data in my main page:

<script>
  define('user_data',{
    ...
  });
</script>

My scripts can import this data using
define('user_data',function(user_data) {});. This has worked for
development. I'm having trouble optimizing:

$ r.js -o build.js
...
Error evaluating module "undefined" at location
"/Users/boland/Projects/..../static/js/build/user_data.js"
...

I have tried adding exclude:['user_data'] and excludeShallow:['user_data']
to my build file (under modules and as a top level attr but haven't been
able overcome this error. Any suggestions?

Thanks,

--
Todd


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Miller Medeiros  
View profile  
 More options Apr 2 2012, 10:25 am
From: Miller Medeiros <lis...@millermedeiros.com>
Date: Mon, 02 Apr 2012 10:25:13 -0400
Local: Mon, Apr 2 2012 10:25 am
Subject: Re: [requirejs] Excluding inline define when optimizing?

Use the special "empty:" path setting instead of excludes..

paths : {
   "user_data" : "empty:"

}

More info: http://requirejs.org/docs/optimization.html#empty

From:  itodd <t...@adimab.com>
Reply-To:  <requirejs@googlegroups.com>
Date:  Fri, 30 Mar 2012 12:09:20 -0700 (PDT)
To:  <requirejs@googlegroups.com>
Subject:  [requirejs] Excluding inline define when optimizing?

I may be doing this the wrong way (I would welcome suggestions on the best
way for bootstrapping my scripts with user-specific data). I have a define
statement that sets some user_data in my main page:

<script>
  define('user_data',{
    ...
  });
</script>

My scripts can import this data using define('user_data',function(user_data)
{});. This has worked for development. I'm having trouble optimizing:

$ r.js -o build.js
...
Error evaluating module "undefined" at location
"/Users/boland/Projects/..../static/js/build/user_data.js"
...

I have tried adding exclude:['user_data'] and excludeShallow:['user_data']
to my build file (under modules and as a top level attr but haven't been
able overcome this error. Any suggestions?

Thanks,

--
Todd


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »