Bower install javascript lib but not include in config.js

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
30 messages Options
12
Reply | Threaded
Open this post in threaded view
|

Bower install javascript lib but not include in config.js

Vicnet-2
Hello,

I try to install papaparser (http://papaparse.com/) with this command:
    bower install papaparser --save
    grunt devel

The lib is installed in bower_components and in bower.json but not in config.js nor in the.js.

So the lib could be imported in my package !

What is wrong ?

a+
Vicnet

--
You received this message because you are subscribed to the Google Groups "amber-lang" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: Bower install javascript lib but not include in config.js

Herby Vojčík


Vicnet wrote:

> Hello,
>
> I try to install papaparser (http://papaparse.com/) with this command:
> bower install papaparser --save
> grunt devel
>
> The lib is installed in bower_components and in bower.json but not in
> config.js nor in the.js.
>
> So the lib could be imported in my package !
>
> What is wrong ?

You don't have amd paths mapping.

Which you must must put in <project root>/papaparser.amd.json (in case the directory under bower_components is called papaparser).

> a+
> Vicnet

--
You received this message because you are subscribed to the Google Groups "amber-lang" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: Bower install javascript lib but not include in config.js

Hannes Hirzel
I thought there is a draft for a how for this?

On 4/10/15, Herby Vojčík <[hidden email]> wrote:

>
>
> Vicnet wrote:
>> Hello,
>>
>> I try to install papaparser (http://papaparse.com/) with this command:
>> bower install papaparser --save
>> grunt devel
>>
>> The lib is installed in bower_components and in bower.json but not in
>> config.js nor in the.js.
>>
>> So the lib could be imported in my package !
>>
>> What is wrong ?
>
> You don't have amd paths mapping.
>
> Which you must must put in <project root>/papaparser.amd.json (in case the
> directory under bower_components is called papaparser).
>
>> a+
>> Vicnet
>
> --
> You received this message because you are subscribed to the Google Groups
> "amber-lang" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [hidden email].
> For more options, visit https://groups.google.com/d/optout.
>

--
You received this message because you are subscribed to the Google Groups "amber-lang" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: Bower install javascript lib but not include in config.js

Hannes Hirzel
On the trello board? In the wiki? Or in an issue discussion? In  the
lego metaphor description? On stackoverflow?

On 4/10/15, H. Hirzel <[hidden email]> wrote:

> I thought there is a draft for a how for this?
>
> On 4/10/15, Herby Vojčík <[hidden email]> wrote:
>>
>>
>> Vicnet wrote:
>>> Hello,
>>>
>>> I try to install papaparser (http://papaparse.com/) with this command:
>>> bower install papaparser --save
>>> grunt devel
>>>
>>> The lib is installed in bower_components and in bower.json but not in
>>> config.js nor in the.js.
>>>
>>> So the lib could be imported in my package !
>>>
>>> What is wrong ?
>>
>> You don't have amd paths mapping.
>>
>> Which you must must put in <project root>/papaparser.amd.json (in case
>> the
>> directory under bower_components is called papaparser).
>>
>>> a+
>>> Vicnet
>>
>> --
>> You received this message because you are subscribed to the Google Groups
>> "amber-lang" group.
>> To unsubscribe from this group and stop receiving emails from it, send an
>> email to [hidden email].
>> For more options, visit https://groups.google.com/d/optout.
>>
>

--
You received this message because you are subscribed to the Google Groups "amber-lang" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: Bower install javascript lib but not include in config.js

Herby Vojčík
In reply to this post by Hannes Hirzel


H. Hirzel wrote:
> I thought there is a draft for a how for this?

I don't know, sorry. Not to mention I am that much forward that I can't
even imagine what real users out there struggle with when trying to
catch up from pre-0.13 (or even older) codebases. For me, 0.13 is
already antiquity.

I hope you have better overview, after Sebastian disappeared from the
documentation work, I hope you are now the best candidate for The One
Who Knows His Way Around Docs.

> On 4/10/15, Herby Vojčík<[hidden email]>  wrote:
>>
>> Vicnet wrote:
>>> Hello,
>>>
>>> I try to install papaparser (http://papaparse.com/) with this command:
>>> bower install papaparser --save
>>> grunt devel
>>>
>>> The lib is installed in bower_components and in bower.json but not in
>>> config.js nor in the.js.
>>>
>>> So the lib could be imported in my package !
>>>
>>> What is wrong ?
>> You don't have amd paths mapping.
>>
>> Which you must must put in<project root>/papaparser.amd.json (in case the
>> directory under bower_components is called papaparser).
>>
>>> a+
>>> Vicnet
>> --
>> You received this message because you are subscribed to the Google Groups
>> "amber-lang" group.
>> To unsubscribe from this group and stop receiving emails from it, send an
>> email to [hidden email].
>> For more options, visit https://groups.google.com/d/optout.
>>
>

--
You received this message because you are subscribed to the Google Groups "amber-lang" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: Bower install javascript lib but not include in config.js

Hannes Hirzel
Vicnet

As Herby notes you need to construct a file

   papaparse.amd.json

(Note: not papaparser.amd.json; your bower command uses a wrong name).

More on this here

http://stackoverflow.com/questions/27374889/how-to-add-a-non-amber-library-with-bower-for-example-processing-js

HTH

--Hannes

BTW which is the repo you are working with?

On 4/10/15, Herby Vojčík <[hidden email]> wrote:

>
>
> H. Hirzel wrote:
>> I thought there is a draft for a how for this?
>
> I don't know, sorry. Not to mention I am that much forward that I can't
> even imagine what real users out there struggle with when trying to
> catch up from pre-0.13 (or even older) codebases. For me, 0.13 is
> already antiquity.
>
> I hope you have better overview, after Sebastian disappeared from the
> documentation work, I hope you are now the best candidate for The One
> Who Knows His Way Around Docs.
>
>> On 4/10/15, Herby Vojčík<[hidden email]>  wrote:
>>>
>>> Vicnet wrote:
>>>> Hello,
>>>>
>>>> I try to install papaparser (http://papaparse.com/) with this command:
>>>> bower install papaparser --save
>>>> grunt devel
>>>>
>>>> The lib is installed in bower_components and in bower.json but not in
>>>> config.js nor in the.js.
>>>>
>>>> So the lib could be imported in my package !
>>>>
>>>> What is wrong ?
>>> You don't have amd paths mapping.
>>>
>>> Which you must must put in<project root>/papaparser.amd.json (in case
>>> the
>>> directory under bower_components is called papaparser).
>>>
>>>> a+
>>>> Vicnet
>>> --
>>> You received this message because you are subscribed to the Google
>>> Groups
>>> "amber-lang" group.
>>> To unsubscribe from this group and stop receiving emails from it, send
>>> an
>>> email to [hidden email].
>>> For more options, visit https://groups.google.com/d/optout.
>>>
>>
>
> --
> You received this message because you are subscribed to the Google Groups
> "amber-lang" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [hidden email].
> For more options, visit https://groups.google.com/d/optout.
>

--
You received this message because you are subscribed to the Google Groups "amber-lang" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: Bower install javascript lib but not include in config.js

Vicnet-2
Here is my repo:
https://github.com/vicnet/benevoles

What I have done:
  • bower install papaparse --save
the lib is install in bower_components/papaparse and contains the main file papaparse.js
  • create a papaparse.amd.json with
{ "paths": { "papaparse": "." }  }
  • grunt devel
  • add 'papaparse/papaparse' into import array of my package
  • reload html main page
a+
Vicnet

--
You received this message because you are subscribed to the Google Groups "amber-lang" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: Bower install javascript lib but not include in config.js

Hannes Hirzel
I understand that the papaparse import does not work yet?

--Hannes

On 4/11/15, Vicnet <[hidden email]> wrote:

> Here is my repo:
> https://github.com/vicnet/benevoles
>
> What I have done:
>
>    - bower install papaparse --save
>
> the lib is install in bower_components/papaparse and contains the main file
>
> papaparse.js
>
>    - create a papaparse.amd.json with
>
> { "paths": { "papaparse": "." }  }
>
>    - grunt devel
>
>
>>>    - add 'papaparse/papaparse' into import array of my package
>>>
>>>
>    - reload html main page
>
> a+
> Vicnet
>
> --
> You received this message because you are subscribed to the Google Groups
> "amber-lang" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [hidden email].
> For more options, visit https://groups.google.com/d/optout.
>

--
You received this message because you are subscribed to the Google Groups "amber-lang" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: Bower install javascript lib but not include in config.js

Herby Vojčík
In reply to this post by Vicnet-2


Vicnet wrote:

> Here is my repo:
> https://github.com/vicnet/benevoles
>
> What I have done:
>
>   * bower install papaparse --save
>
> the lib is install in bower_components/papaparse and contains the main
> file papaparse.js
>
>   * create a papaparse.amd.json with
>
> { "paths": { "papaparse": "." } }

Did you map "." consciously? IOW, is papaparse set of many files and so
you need to map the path and use it as a prefix? Mostly, libraries
consist of just one usable file and then that one should be mapped to
use the name directly to load the module.

--
You received this message because you are subscribed to the Google Groups "amber-lang" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: Bower install javascript lib but not include in config.js

Vicnet-2

Did you map "." consciously?

No, just try different values until ok.
 
IOW, is papaparse set of many files and so
you need to map the path and use it as a prefix? Mostly, libraries
consist of just one usable file and then that one should be mapped to
use the name directly to load the module.

 Ok, thanks for the explanation.
I will correct my code nearly.

a+
Vicnet

--
You received this message because you are subscribed to the Google Groups "amber-lang" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: Bower install javascript lib but not include in config.js

Hannes Hirzel
/benevoles/bower_components/papaparse $ ls -1
bower.json
Gruntfile.js
LICENSE
package.json
papaparse.js
papaparse.min.js
README.md


On 4/12/15, Vicnet <[hidden email]> wrote:

>
>
>> Did you map "." consciously?
>
>
> No, just try different values until ok.
>
>
>> IOW, is papaparse set of many files and so
>> you need to map the path and use it as a prefix? Mostly, libraries
>> consist of just one usable file and then that one should be mapped to
>> use the name directly to load the module.
>>
>
>  Ok, thanks for the explanation.
> I will correct my code nearly.
>
> a+
> Vicnet
>
> --
> You received this message because you are subscribed to the Google Groups
> "amber-lang" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [hidden email].
> For more options, visit https://groups.google.com/d/optout.
>

--
You received this message because you are subscribed to the Google Groups "amber-lang" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: Bower install javascript lib but not include in config.js

Hannes Hirzel
And also have a look at
https://github.com/amber-smalltalk/amber/wiki/FAQ#why-should-i-not-refer-to-min-files-in-amdjson-files

On 4/12/15, H. Hirzel <[hidden email]> wrote:

> /benevoles/bower_components/papaparse $ ls -1
> bower.json
> Gruntfile.js
> LICENSE
> package.json
> papaparse.js
> papaparse.min.js
> README.md
>
>
> On 4/12/15, Vicnet <[hidden email]> wrote:
>>
>>
>>> Did you map "." consciously?
>>
>>
>> No, just try different values until ok.
>>
>>
>>> IOW, is papaparse set of many files and so
>>> you need to map the path and use it as a prefix? Mostly, libraries
>>> consist of just one usable file and then that one should be mapped to
>>> use the name directly to load the module.
>>>
>>
>>  Ok, thanks for the explanation.
>> I will correct my code nearly.
>>
>> a+
>> Vicnet
>>
>> --
>> You received this message because you are subscribed to the Google Groups
>> "amber-lang" group.
>> To unsubscribe from this group and stop receiving emails from it, send an
>> email to [hidden email].
>> For more options, visit https://groups.google.com/d/optout.
>>
>

--
You received this message because you are subscribed to the Google Groups "amber-lang" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: Bower install javascript lib but not include in config.js

Herby Vojčík
In reply to this post by Hannes Hirzel


H. Hirzel wrote:
> /benevoles/bower_components/papaparse $ ls -1
> bower.json
> Gruntfile.js
> LICENSE
> package.json
> papaparse.js
> papaparse.min.js
> README.md

Yeah, so typical one-file lib. It should have the file mapped directly and "papaparse" should be the full module name.

> On 4/12/15, Vicnet<[hidden email]>  wrote:
>>
>>> Did you map "." consciously?
>>
>> No, just try different values until ok.
>>
>>
>>> IOW, is papaparse set of many files and so
>>> you need to map the path and use it as a prefix? Mostly, libraries
>>> consist of just one usable file and then that one should be mapped to
>>> use the name directly to load the module.
>>>
>>   Ok, thanks for the explanation.
>> I will correct my code nearly.
>>
>> a+
>> Vicnet
>>
>> --
>> You received this message because you are subscribed to the Google Groups
>> "amber-lang" group.
>> To unsubscribe from this group and stop receiving emails from it, send an
>> email to [hidden email]
om.
>> For more options, visit https://groups.google.com/d/optout.
>>
>

--
You received this message because you are subscribed to the Google Groups "amber-lang" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: Bower install javascript lib but not include in config.js

Hannes Hirzel
So something like here

https://github.com/hhzl/benevoles/blob/amd.json.fix/papaparse.amd.json

{
    "paths": {
                     "papaparse": "papaparse.js"
                }
}



On 4/12/15, Herby Vojčík <[hidden email]> wrote:

>
>
> H. Hirzel wrote:
>> /benevoles/bower_components/papaparse $ ls -1
>> bower.json
>> Gruntfile.js
>> LICENSE
>> package.json
>> papaparse.js
>> papaparse.min.js
>> README.md
>
> Yeah, so typical one-file lib. It should have the file mapped directly and
> "papaparse" should be the full module name.
>
>> On 4/12/15, Vicnet<[hidden email]>  wrote:
>>>
>>>> Did you map "." consciously?
>>>
>>> No, just try different values until ok.
>>>
>>>
>>>> IOW, is papaparse set of many files and so
>>>> you need to map the path and use it as a prefix? Mostly, libraries
>>>> consist of just one usable file and then that one should be mapped to
>>>> use the name directly to load the module.
>>>>
>>>   Ok, thanks for the explanation.
>>> I will correct my code nearly.
>>>
>>> a+
>>> Vicnet
>>>
>>> --
>>> You received this message because you are subscribed to the Google
>>> Groups
>>> "amber-lang" group.
>>> To unsubscribe from this group and stop receiving emails from it, send
>>> an
>>> email to [hidden email]
> om.
>>> For more options, visit https://groups.google.com/d/optout.
>>>
>>
>
> --
> You received this message because you are subscribed to the Google Groups
> "amber-lang" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [hidden email].
> For more options, visit https://groups.google.com/d/optout.
>

--
You received this message because you are subscribed to the Google Groups "amber-lang" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: Bower install javascript lib but not include in config.js

Herby Vojčík


H. Hirzel wrote:
> So something like here
>
> https://github.com/hhzl/benevoles/blob/amd.json.fix/papaparse.amd.json
>
> {
>      "paths": {
>                       "papaparse": "papaparse.js"

No ".js"!

>                  }
> }
>
>
>
> On 4/12/15, Herby Vojčík<[hidden email]>  wrote:
>>
>> H. Hirzel wrote:
>>> /benevoles/bower_components/papaparse $ ls -1
>>> bower.json
>>> Gruntfile.js
>>> LICENSE
>>> package.json
>>> papaparse.js
>>> papaparse.min.js
>>> README.md
>> Yeah, so typical one-file lib. It should have the file mapped directly and
>> "papaparse" should be the full module name.
>>
>>> On 4/12/15, Vicnet<[hidden email]>   wrote:
>>>>> Did you map "." consciously?
>>>> No, just try different values until ok.
>>>>
>>>>
>>>>> IOW, is papaparse set of many files and so
>>>>> you need to map the path and use it as a prefix? Mostly, libraries
>>>>> consist of just one usable file and then that one should be mapped to
>>>>> use the name directly to load the modu
le.

>>>>>
>>>>    Ok, thanks for the explanation.
>>>> I will correct my code nearly.
>>>>
>>>> a+
>>>> Vicnet
>>>>
>>>> --
>>>> You received this message because you are subscribed to the Google
>>>> Groups
>>>> "amber-lang" group.
>>>> To unsubscribe from this group and stop receiving emails from it, send
>>>> an
>>>> email to [hidden email]
>> om.
>>>> For more options, visit https://groups.google.com/d/optout.
>>>>
>> --
>> You received this message because you are subscribed to the Google Groups
>> "amber-lang" group.
>> To unsubscribe from this group and stop receiving emails from it, send an
>> email to [hidden email].
>> For more options, visit https://groups.google.com/d/optout.
>>
>

--
You received this message because you are subscribed to the Google Groups "amber-lang" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: Bower install javascript lib but not include in config.js

Hannes Hirzel
OK done

https://github.com/hhzl/benevoles/blob/amd.json.fix/papaparse.amd.json


The same as

the processing.amd.json library mapping file

{
"paths": {
            "processing" : "processing"
         }
}

(from:
http://stackoverflow.com/questions/27374889/how-to-add-a-non-amber-library-with-bower-for-example-processing-js
)





On 4/13/15, Herby Vojčík <[hidden email]> wrote:

>
>
> H. Hirzel wrote:
>> So something like here
>>
>> https://github.com/hhzl/benevoles/blob/amd.json.fix/papaparse.amd.json
>>
>> {
>>      "paths": {
>>                       "papaparse": "papaparse.js"
>
> No ".js"!
>
>>                  }
>> }
>>
>>
>>
>> On 4/12/15, Herby Vojčík<[hidden email]>  wrote:
>>>
>>> H. Hirzel wrote:
>>>> /benevoles/bower_components/papaparse $ ls -1
>>>> bower.json
>>>> Gruntfile.js
>>>> LICENSE
>>>> package.json
>>>> papaparse.js
>>>> papaparse.min.js
>>>> README.md
>>> Yeah, so typical one-file lib. It should have the file mapped directly
>>> and
>>> "papaparse" should be the full module name.
>>>
>>>> On 4/12/15, Vicnet<[hidden email]>   wrote:
>>>>>> Did you map "." consciously?
>>>>> No, just try different values until ok.
>>>>>
>>>>>
>>>>>> IOW, is papaparse set of many files and so
>>>>>> you need to map the path and use it as a prefix? Mostly, libraries
>>>>>> consist of just one usable file and then that one should be mapped to
>>>>>> use the name directly to load the modu
> le.
>>>>>>
>>>>>    Ok, thanks for the explanation.
>>>>> I will correct my code nearly.
>>>>>
>>>>> a+
>>>>> Vicnet
>>>>>
>>>>> --
>>>>> You received this message because you are subscribed to the Google
>>>>> Groups
>>>>> "amber-lang" group.
>>>>> To unsubscribe from this group and stop receiving emails from it, send
>>>>> an
>>>>> email to [hidden email]
>>> om.
>>>>> For more options, visit https://groups.google.com/d/optout.
>>>>>
>>> --
>>> You received this message because you are subscribed to the Google
>>> Groups
>>> "amber-lang" group.
>>> To unsubscribe from this group and stop receiving emails from it, send
>>> an
>>> email to [hidden email].
>>> For more options, visit https://groups.google.com/d/optout.
>>>
>>
>
> --
> You received this message because you are subscribed to the Google Groups
> "amber-lang" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [hidden email].
> For more options, visit https://groups.google.com/d/optout.
>

--
You received this message because you are subscribed to the Google Groups "amber-lang" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: Bower install javascript lib but not include in config.js

NorbertHartl
I do not want to hijack this thread but I have a similar question right now.

I have three javascript files that I need to have loaded with require.js (along with other modules). So

- having an amd.json file is it only possible to declare a single file in one amd.json (having one key to depend on). I can define more entries in an amd json but then I have also three new keys I need to depend on elsewhere. Or do I define three things and add dependencies between them in the same amd.json file?
- Having an amd.json file that is not bower module (because it is already in my git repo) is somewhat difficult. There is code in the amd processing that assumes at least there is a directory in bower_components with the same name. Creating a directory helps but is no solution.
- The assumption that everything in an amd.json file is a bower_module makes use ../../dir/[basename of js file] a lot

So I struggle that much that I have the feeling I doing something wrong. What would be the best way to integrate javascript files into the require.js process that are no bower components?

thanks,

Norbert

> Am 13.04.2015 um 15:00 schrieb H. Hirzel <[hidden email]>:
>
> OK done
>
> https://github.com/hhzl/benevoles/blob/amd.json.fix/papaparse.amd.json
>
>
> The same as
>
> the processing.amd.json library mapping file
>
> {
> "paths": {
>            "processing" : "processing"
>         }
> }
>
> (from:
> http://stackoverflow.com/questions/27374889/how-to-add-a-non-amber-library-with-bower-for-example-processing-js
> )
>
>
>
>
>
> On 4/13/15, Herby Vojčík <[hidden email]> wrote:
>>
>>
>> H. Hirzel wrote:
>>> So something like here
>>>
>>> https://github.com/hhzl/benevoles/blob/amd.json.fix/papaparse.amd.json
>>>
>>> {
>>>     "paths": {
>>>                      "papaparse": "papaparse.js"
>>
>> No ".js"!
>>
>>>                 }
>>> }
>>>
>>>
>>>
>>> On 4/12/15, Herby Vojčík<[hidden email]>  wrote:
>>>>
>>>> H. Hirzel wrote:
>>>>> /benevoles/bower_components/papaparse $ ls -1
>>>>> bower.json
>>>>> Gruntfile.js
>>>>> LICENSE
>>>>> package.json
>>>>> papaparse.js
>>>>> papaparse.min.js
>>>>> README.md
>>>> Yeah, so typical one-file lib. It should have the file mapped directly
>>>> and
>>>> "papaparse" should be the full module name.
>>>>
>>>>> On 4/12/15, Vicnet<[hidden email]>   wrote:
>>>>>>> Did you map "." consciously?
>>>>>> No, just try different values until ok.
>>>>>>
>>>>>>
>>>>>>> IOW, is papaparse set of many files and so
>>>>>>> you need to map the path and use it as a prefix? Mostly, libraries
>>>>>>> consist of just one usable file and then that one should be mapped to
>>>>>>> use the name directly to load the modu
>> le.
>>>>>>>
>>>>>>   Ok, thanks for the explanation.
>>>>>> I will correct my code nearly.
>>>>>>
>>>>>> a+
>>>>>> Vicnet
>>>>>>
>>>>>> --
>>>>>> You received this message because you are subscribed to the Google
>>>>>> Groups
>>>>>> "amber-lang" group.
>>>>>> To unsubscribe from this group and stop receiving emails from it, send
>>>>>> an
>>>>>> email to [hidden email]
>>>> om.
>>>>>> For more options, visit https://groups.google.com/d/optout.
>>>>>>
>>>> --
>>>> You received this message because you are subscribed to the Google
>>>> Groups
>>>> "amber-lang" group.
>>>> To unsubscribe from this group and stop receiving emails from it, send
>>>> an
>>>> email to [hidden email].
>>>> For more options, visit https://groups.google.com/d/optout.
>>>>
>>>
>>
>> --
>> You received this message because you are subscribed to the Google Groups
>> "amber-lang" group.
>> To unsubscribe from this group and stop receiving emails from it, send an
>> email to [hidden email].
>> For more options, visit https://groups.google.com/d/optout.
>>
>
> --
> You received this message because you are subscribed to the Google Groups "amber-lang" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
> For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "amber-lang" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: Bower install javascript lib but not include in config.js

Herby Vojčík


Norbert Hartl wrote:
> I do not want to hijack this thread but I have a similar question right now.
>
> I have three javascript files that I need to have loaded with require.js (along with other modules). So
>
> - having an amd.json file is it only possible to declare a single file in one amd.json (having one key to depend on). I can define more entries in an amd json but then I have also three new keys I need to depend on elsewhere. Or do I define three things and add dependencies between them in the same amd.json file?

You choose. Either define three keys, each for a module to load, or define just the path prefix, and module id will contain that path prefix. It depends solely on what your client code needs (codemirror, for example, wants to load using path prefix, because it internally uses "../lib/codemirror" or similar ids in plugins).

> - Having an amd.json file that is not bower module (because it is already in my git repo) is somewhat difficult. There is code in th
e amd

Every git repo is in bower ;-) if read "installable via bower". You can bower install not only already registered name, but directly a git url. Of course, you must comply to bower versioning (semver tags) to be able to reap the most benefits, but it works even without that, by using #branch or #tag directly).

processing that assumes at least there is a directory in bower_components with the same name. Creating a directory helps but is no solution.

Directory is not needed in bower_components, in fact, it can be anywhere. But bower is great to use. Just add bower.json to your lib, it will manage dependencies for you _and_ for client of your lib.

> - The assumption that everything in an amd.json file is a bower_module makes use ../../dir/[basename of js file] a lot

NOT TRUE.

Not to mention, don't use '../../dir/whatever' unless you move within your own filetree. And if you do, you can, as mentioned with codemirror and its plugins a few paragraphs above (then, map ju
st the path and load modules with path-like module ids).


--
You received this message because you are subscribed to the Google Groups "amber-lang" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: Bower install javascript lib but not include in config.js

NorbertHartl

> Am 13.04.2015 um 15:36 schrieb Herby Vojčík <[hidden email]>:
>
>
>
> Norbert Hartl wrote:
>> I do not want to hijack this thread but I have a similar question right now.
>>
>> I have three javascript files that I need to have loaded with require.js (along with other modules). So
>>
>> - having an amd.json file is it only possible to declare a single file in one amd.json (having one key to depend on). I can define more entries in an amd json but then I have also three new keys I need to depend on elsewhere. Or do I define three things and add dependencies between them in the same amd.json file?
>
> You choose. Either define three keys, each for a module to load, or define just the path prefix, and module id will contain that path prefix. It depends solely on what your client code needs (codemirror, for example, wants to load using path prefix, because it internally uses "../lib/codemirror" or similar ids in plugins).
>
I'm not sure I understand the differences. I can see that codemirror referes to a directory. And then there is a shim config for codemirror/lib/codemirror. But I cannot see what it does and how it works. How is the codemirror/lib/codemirror loaded in order to have require.js dependencies? It's not self explaining to me.

>> - Having an amd.json file that is not bower module (because it is already in my git repo) is somewhat difficult. There is code in th
> e amd
> Every git repo is in bower ;-) if read "installable via bower". You can bower install not only already registered name, but directly a git url. Of course, you must comply to bower versioning (semver tags) to be able to reap the most benefits, but it works even without that, by using #branch or #tag directly).
>

> processing that assumes at least there is a directory in bower_components with the same name. Creating a directory helps but is no solution.
>
> Directory is not needed in bower_components, in fact, it can be anywhere. But bower is great to use. Just add bower.json to your lib, it will manage dependencies for you _and_ for client of your lib.
>
Well, the javascript files are in the same repository as the amber project. So it isn't that easy to check them out. And those are not modules more kind of a configuration for angular/ionic. Basically I want to use amber for ionic (mostly angular) wiring. I need to load ionic/angular base first, the n amber and finally a few javascript files making the wires between angular and amber.
 
>> - The assumption that everything in an amd.json file is a bower_module makes use ../../dir/[basename of js file] a lot
>
> NOT TRUE.
>
> Not to mention, don't use '../../dir/whatever' unless you move within your own filetree. And if you do, you can, as mentioned with codemirror and its plugins a few paragraphs above (then, map ju
> st the path and load modules with path-like module ids).
>
Everything is arranged in my file tree. Otherwise I wouldn't use ../ I can try to use the path prefix thing. But I'm not sure where to put the dependencies for all of them three.

Norbert

>
> --
> You received this message because you are subscribed to the Google Groups "amber-lang" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
> For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "amber-lang" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: Bower install javascript lib but not include in config.js

Herby Vojčík


Norbert Hartl wrote:
> Everything is arranged in my file tree. Otherwise I wouldn't use ../ I can try to use the path prefix thing. But I'm not sure where to put the dependencies for all of them three.

Are they proper AMD (if you write them yourself, then you can make them so, easily)? If yes, then dependencies are in define call, as in every other AMD module. If not, you must shim the dependencies. So, in that case, in shim section of the corresponding .amd.json.

--
You received this message because you are subscribed to the Google Groups "amber-lang" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/d/optout.
12