Why are bower_components in .gitignore when they're needed for deploy?

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

Why are bower_components in .gitignore when they're needed for deploy?

patmaddox
I've been developing an amber application and am now ready to deploy. I've noticed that the bower_components folder is automatically added to .gitignore as part of the amber init process.

However, the index.html file requires files from bower_components!

    <script type='text/javascript' src='bower_components/amber/support/requirejs/require.min.js'></script>
    <script type='text/javascript' src='bower_components/amber/support/amber.js'></script>

If those script tags don't show up, it's two lines requiring the files:

bower_components/amber/support/requirejs/require.min.js
bower_components/amber/support/amber.js

I also noticed that it ignores jquery files as well.

I have deleted the .gitignore files so that these necessary javascript files get added to the repository, and I'm pleased to say that my application is now running in production and working.

I have questions though.

1) Why are necessary files ignored from git?
2) If it's because you deploy amber differently from developing it, where can I find the necessary documentation on how to deploy? (I've looked on the site, wiki, and group and haven't found anything useful)

Thank you,
Pat

--
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: Why are bower_components in .gitignore when they're needed for deploy?

philippeback

Because one would do a bower init during deployment.

So no need to commit external content into the repo.

Phil
Le 7 sept. 2014 06:54, "Pat Maddox" <[hidden email]> a écrit :
>
> I've been developing an amber application and am now ready to deploy. I've noticed that the bower_components folder is automatically added to .gitignore as part of the amber init process.
>
> However, the index.html file requires files from bower_components!
>
>     <script type='text/javascript' src='bower_components/amber/support/requirejs/require.min.js'></script>
>     <script type='text/javascript' src='bower_components/amber/support/amber.js'></script>
>
> If those script tags don't show up, it's two lines requiring the files:
>
> bower_components/amber/support/requirejs/require.min.js
> bower_components/amber/support/amber.js
>
> I also noticed that it ignores jquery files as well.
>
> I have deleted the .gitignore files so that these necessary javascript files get added to the repository, and I'm pleased to say that my application is now running in production and working.
>
> I have questions though.
>
> 1) Why are necessary files ignored from git?
> 2) If it's because you deploy amber differently from developing it, where can I find the necessary documentation on how to deploy? (I've looked on the site, wiki, and group and haven't found anything useful)
>
> Thank you,
> Pat
>
> --
> 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: Why are bower_components in .gitignore when they're needed for deploy?

patmaddox
okay ... is there any documentation on how to do a deployment with amber?

for those of us who don't know bower and are seeing it for the first time due to amber, are you able to provide basic steps of going from development to deployment?

i.e. I have forcefully committed all the bower_components to my repo so they're available in my deploy. Evidently that is not what I need to do. What do I need to do instead?

Pat


On Saturday, September 6, 2014 10:48:50 PM UTC-7, [hidden email] wrote:

Because one would do a bower init during deployment.

So no need to commit external content into the repo.

Phil
Le 7 sept. 2014 06:54, "Pat Maddox" <<a href="javascript:" target="_blank" gdf-obfuscated-mailto="ObWVfpMrftoJ" onmousedown="this.href='javascript:';return true;" onclick="this.href='javascript:';return true;">patm...@...> a écrit :
>
> I've been developing an amber application and am now ready to deploy. I've noticed that the bower_components folder is automatically added to .gitignore as part of the amber init process.
>
> However, the index.html file requires files from bower_components!
>
>     <script type='text/javascript' src='bower_components/amber/support/requirejs/require.min.js'></script>
>     <script type='text/javascript' src='bower_components/amber/support/amber.js'></script>
>
> If those script tags don't show up, it's two lines requiring the files:
>
> bower_components/amber/support/requirejs/require.min.js
> bower_components/amber/support/amber.js
>
> I also noticed that it ignores jquery files as well.
>
> I have deleted the .gitignore files so that these necessary javascript files get added to the repository, and I'm pleased to say that my application is now running in production and working.
>
> I have questions though.
>
> 1) Why are necessary files ignored from git?
> 2) If it's because you deploy amber differently from developing it, where can I find the necessary documentation on how to deploy? (I've looked on the site, wiki, and group and haven't found anything useful)
>
> Thank you,
> Pat
>
> --
> 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 <a href="javascript:" target="_blank" gdf-obfuscated-mailto="ObWVfpMrftoJ" onmousedown="this.href='javascript:';return true;" onclick="this.href='javascript:';return true;">amber-lang+...@googlegroups.com.
> For more options, visit <a href="https://groups.google.com/d/optout" target="_blank" onmousedown="this.href='https://groups.google.com/d/optout';return true;" onclick="this.href='https://groups.google.com/d/optout';return true;">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: Why are bower_components in .gitignore when they're needed for deploy?

patmaddox
well, I'm even more confused now because there's already a bower.json file in my project, presumably from the amber init command? so do I even need the bower_components and node_modules folder in the first place?

any step-by-step instructions on how to deploy an amber application would be awesome.

On Saturday, September 6, 2014 11:47:42 PM UTC-7, Pat Maddox wrote:
okay ... is there any documentation on how to do a deployment with amber?

for those of us who don't know bower and are seeing it for the first time due to amber, are you able to provide basic steps of going from development to deployment?

i.e. I have forcefully committed all the bower_components to my repo so they're available in my deploy. Evidently that is not what I need to do. What do I need to do instead?

Pat


On Saturday, September 6, 2014 10:48:50 PM UTC-7, [hidden email] wrote:

Because one would do a bower init during deployment.

So no need to commit external content into the repo.

Phil
Le 7 sept. 2014 06:54, "Pat Maddox" <[hidden email]> a écrit :
>
> I've been developing an amber application and am now ready to deploy. I've noticed that the bower_components folder is automatically added to .gitignore as part of the amber init process.
>
> However, the index.html file requires files from bower_components!
>
>     <script type='text/javascript' src='bower_components/amber/support/requirejs/require.min.js'></script>
>     <script type='text/javascript' src='bower_components/amber/support/amber.js'></script>
>
> If those script tags don't show up, it's two lines requiring the files:
>
> bower_components/amber/support/requirejs/require.min.js
> bower_components/amber/support/amber.js
>
> I also noticed that it ignores jquery files as well.
>
> I have deleted the .gitignore files so that these necessary javascript files get added to the repository, and I'm pleased to say that my application is now running in production and working.
>
> I have questions though.
>
> 1) Why are necessary files ignored from git?
> 2) If it's because you deploy amber differently from developing it, where can I find the necessary documentation on how to deploy? (I've looked on the site, wiki, and group and haven't found anything useful)
>
> Thank you,
> Pat
>
> --
> 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 amber-lang+...@googlegroups.com.
> For more options, visit <a href="https://groups.google.com/d/optout" target="_blank" onmousedown="this.href='https://groups.google.com/d/optout';return true;" onclick="this.href='https://groups.google.com/d/optout';return true;">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: Why are bower_components in .gitignore when they're needed for deploy?

Herby Vojčík
In reply to this post by patmaddox
It's not about deployment per se.

You have same problem when you clone your repo. All dependencies are still missing.

It's by design. After running one command (which amber init runs for you when initially setting up the project for you):

bower install

all dependencies of the project are installed. Magic which enables it is bower.json. That one must of course be in the repo.

And for cli development tooling (not for the running code) you need node.js dependencies as well, but for those there is `npm install` (also ran for you by amber init) with its `package.json`.

Last but not least, for production you may run bower install with --production option. It will install only things the code needs, not things that development needs but are not needed in production (devDependencies in bower.json).

And of course, do not add your dependencies by hand! You have bower install pkg --save, bower install pkg --save-dev, bower uninstall pkg --save and bower uninstall pkg --save-dev for that (same for npm, but that you likely won't need to change, as it's about development tooling).

Pat Maddox <[hidden email]>napísal/a:

I've been developing an amber application and am now ready to deploy. I've noticed that the bower_components folder is automatically added to .gitignore as part of the amber init process.

However, the index.html file requires files from bower_components!

    <script type='text/javascript' src='bower_components/amber/support/requirejs/require.min.js'></script>
    <script type='text/javascript' src='bower_components/amber/support/amber.js'></script>

If those script tags don't show up, it's two lines requiring the files:

bower_components/amber/support/requirejs/require.min.js
bower_components/amber/support/amber.js

I also noticed that it ignores jquery files as well.

I have deleted the .gitignore files so that these necessary javascript files get added to the repository, and I'm pleased to say that my application is now running in production and working.

I have questions though.

1) Why are necessary files ignored from git?
2) If it's because you deploy amber differently from developing it, where can I find the necessary documentation on how to deploy? (I've looked on the site, wiki, and group and haven't found anything useful)

Thank you,
Pat

--
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: Why are bower_components in .gitignore when they're needed for deploy?

patmaddox
Okay thanks, things are making a lot more sense now. I was confused by the first reply which said I'd run "bower init" during deploys, and when I tried that out it prompted me to create the bower file again.

Understanding that it's a dependency manager, and all I need to do is run `bower install` helps out a lot.

I do still think I want to check dependencies in so that I don't have to rely on being able to download them from somewhere. But now at least I think I understand enough to be able to use it and make decisions about checking in dependencies vs installing them during deploy.

Thanks,
Pat

On Sunday, September 7, 2014 2:12:09 AM UTC-7, Herby wrote:
It's not about deployment per se.

You have same problem when you clone your repo. All dependencies are still missing.

It's by design. After running one command (which amber init runs for you when initially setting up the project for you):

bower install

all dependencies of the project are installed. Magic which enables it is bower.json. That one must of course be in the repo.

And for cli development tooling (not for the running code) you need node.js dependencies as well, but for those there is `npm install` (also ran for you by amber init) with its `package.json`.

Last but not least, for production you may run bower install with --production option. It will install only things the code needs, not things that development needs but are not needed in production (devDependencies in bower.json).

And of course, do not add your dependencies by hand! You have bower install pkg --save, bower install pkg --save-dev, bower uninstall pkg --save and bower uninstall pkg --save-dev for that (same for npm, but that you likely won't need to change, as it's about development tooling).

Pat Maddox <<a href="javascript:" target="_blank" gdf-obfuscated-mailto="ajCwa64eoL4J" onmousedown="this.href='javascript:';return true;" onclick="this.href='javascript:';return true;">patm...@...>napísal/a:

I've been developing an amber application and am now ready to deploy. I've noticed that the bower_components folder is automatically added to .gitignore as part of the amber init process.

However, the index.html file requires files from bower_components!

    <script type='text/javascript' src='bower_components/amber/support/requirejs/require.min.js'></script>
    <script type='text/javascript' src='bower_components/amber/support/amber.js'></script>

If those script tags don't show up, it's two lines requiring the files:

bower_components/amber/support/requirejs/require.min.js
bower_components/amber/support/amber.js

I also noticed that it ignores jquery files as well.

I have deleted the .gitignore files so that these necessary javascript files get added to the repository, and I'm pleased to say that my application is now running in production and working.

I have questions though.

1) Why are necessary files ignored from git?
2) If it's because you deploy amber differently from developing it, where can I find the necessary documentation on how to deploy? (I've looked on the site, wiki, and group and haven't found anything useful)

Thank you,
Pat

--
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 <a href="javascript:" target="_blank" gdf-obfuscated-mailto="ajCwa64eoL4J" onmousedown="this.href='javascript:';return true;" onclick="this.href='javascript:';return true;">amber-lang+...@googlegroups.com.
For more options, visit <a href="https://groups.google.com/d/optout" target="_blank" onmousedown="this.href='https://groups.google.com/d/optout';return true;" onclick="this.href='https://groups.google.com/d/optout';return true;">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: Why are bower_components in .gitignore when they're needed for deploy?

Herby Vojčík
In reply to this post by patmaddox


Pat Maddox <[hidden email]>napísal/a:

Understanding that it's a dependency manager, and all I need to do is run `bower install` helps out a lot.

I do still think I want to check dependencies in so that I don't have to rely on being able to download them from somewhere.

---

It may be worthwhile to mention that thers is `bower install --offline` which installs from the local cache. So if you have CI server that takes care of deployment, you may as well use --offline as a fallback in case bower is temporarily off.

--
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: Why are bower_components in .gitignore when they're needed for deploy?

philippeback

Yeah install not init.

amber init
bower install

My bad.

Phil

Le 7 sept. 2014 12:36, "Herby Vojčík" <[hidden email]> a écrit :


Pat Maddox <[hidden email]>napísal/a:

Understanding that it's a dependency manager, and all I need to do is run `bower install` helps out a lot.

I do still think I want to check dependencies in so that I don't have to rely on being able to download them from somewhere.

---

It may be worthwhile to mention that thers is `bower install --offline` which installs from the local cache. So if you have CI server that takes care of deployment, you may as well use --offline as a fallback in case bower is temporarily off.

--
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: Why are bower_components in .gitignore when they're needed for deploy?

sebastianconcept
In reply to this post by patmaddox


sebastian

o/

> On 07/09/2014, at 01:54, Pat Maddox <[hidden email]> wrote:
>
> 1) Why are necessary files ignored from git?

bower_components files in js projects are part of the build that a continuous integration server would install in each build. So you want versioned the definition and not the actual code

same happens to node_modules, with less to css and probably any other dir with built stuff

> 2) If it's because you deploy amber differently from developing it, where can I find the necessary documentation on how to deploy? (I've looked on the site, wiki, and group and haven't found anything useful)

of course is different yeah
I'm not sure how mature is our deploy   feature for the current version. That's why you don't see documentation or how-tos

@team maybe we have news on progress about deploying?

--
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: Why are bower_components in .gitignore when they're needed for deploy?

Herby Vojčík


sebastian wrote:

>
> sebastian
>
> o/
>
>> On 07/09/2014, at 01:54, Pat Maddox<[hidden email]>  wrote:
>>
>> 1) Why are necessary files ignored from git?
>
> bower_components files in js projects are part of the build that a continuous integration server would install in each build. So you want versioned the definition and not the actual code
>
> same happens to node_modules, with less to css and probably any other dir with built stuff
>
>> 2) If it's because you deploy amber differently from developing it, where can I find the necessary documentation on how to deploy? (I've looked on the site, wiki, and group and haven't found anything useful)
>
> of course is different yeah
> I'm not sure how mature is our deploy   feature for the current version. That's why you don't see documentation or how-tos
>
> @team maybe we have news on progress about deploying?

ah, deploy. yes, in 0.13 you just build everything into single .js using r.js. Atm you must do it by calling r.js by
hand. Maybe calling r.js with appropriate params could be added to cli... @mkroehnert as well as other people did this successfully - 0.13 amber init provides you with app.build.js config file for use with r.js, so it's batteries included, but you must install them ;-)

or, you can just git clone / git pull and bower install --production, of course. Then, files will be separate, as in development.

Herby

--
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: Why are bower_components in .gitignore when they're needed for deploy?

philippeback
On Sun, Sep 7, 2014 at 10:12 PM, Herby Vojčík <[hidden email]> wrote:

>
>
>
> sebastian wrote:
>>
>>
>> sebastian
>>
>> o/
>>
>>> On 07/09/2014, at 01:54, Pat Maddox<[hidden email]>  wrote:
>>>
>>> 1) Why are necessary files ignored from git?
>>
>>
>> bower_components files in js projects are part of the build that a continuous integration server would install in each build. So you want versioned the definition and not the actual code
>>
>> same happens to node_modules, with less to css and probably any other dir with built stuff
>>
>>> 2) If it's because you deploy amber differently from developing it, where can I find the necessary documentation on how to deploy? (I've looked on the site, wiki, and group and haven't found anything useful)
>>
>>
>> of course is different yeah
>> I'm not sure how mature is our deploy   feature for the current version. That's why you don't see documentation or how-tos
>>
>> @team maybe we have news on progress about deploying?
>
>
> ah, deploy. yes, in 0.13 you just build everything into single .js using r.js. Atm you must do it by calling r.js by hand. Maybe calling r.js with appropriate params could be added to cli... @mkroehnert as well as other people did this successfully - 0.13 amber init provides you with app.build.js config file for use with r.js, so it's batteries included, but you must install them ;-)

Interesting resource:

 http://tech.pro/blog/1639/using-rjs-to-optimize-your-requirejs-project

npm install -g requirejs
r.js -o app.build.js

Is that the right stance?

Phil


>
> or, you can just git clone / git pull and bower install --production, of course. Then, files will be separate, as in development.
>
> Herby
>
> --
> 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: Why are bower_components in .gitignore when they're needed for deploy?

Herby Vojčík


[hidden email] wrote:

> On Sun, Sep 7, 2014 at 10:12 PM, Herby Vojčík <[hidden email]
> <mailto:[hidden email]>> wrote:
>  >
>  >
>  >
>  > sebastian wrote:
>  >> of course is different yeah
>  >> I'm not sure how mature is our deploy   feature for the current
> version. That's why you don't see documentation or how-tos
>  >>
>  >> @team maybe we have news on progress about deploying?
>  >
>  >
>  > ah, deploy. yes, in 0.13 you just build everything into single .js
> using r.js. Atm you must do it by calling r.js by hand. Maybe calling
> r.js with appropriate params could be added to cli... @mkroehnert as
> well as other people did this successfully - 0.13 amber init provides
> you with app.build.js config file for use with r.js, so it's batteries
> included, but you must install them ;-)
>
> Interesting resource:
>
> http://tech.pro/blog/1639/using-rjs-to-optimize-your-requirejs-project
>
> npm install -g requirejs
> r.js -o app.build.js
>
> Is that the right stance?

Yes.

But you must manually update packages you want to load - change
amber/devel to amber/deploy or amber/lang, removed unit tests if you don
not want them in production etc. before running r.js. The good solution
for this part wasn't found yet (see also
https://github.com/amber-smalltalk/amber/issues/952 which was planned
for 0.13 but was moved to 1.0 as problems arised).

--
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.