Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 6 years ago.
Improve this question
I have an angularjs project with gulp configuration.
In my gulpfile.js I merge all my code to a bundle.js file. I also add 3rd party library code there, minify it and it works fine. I don't understand what it will improve. I read a lot of articles, but couldn't find anything to make me understand. All it writes is how it is better than requirejs. I don't even use requirejs.
Browserify is a particular way to merge all your code. If you're already doing so and it works well for you, then you don't need it.
Once your project grows bigger, you're probably going to need a better way to structure your code into modules. That's where browserify helps you a lot. It also makes it easy to use many of the modules you find on npm.
Related
Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 1 year ago.
Improve this question
hi my friends I have a question
how can I create multi language site with Nuxt?
my site is ssr and I don't want use any package beacuse client wants to me handle this without package
Not sure why you don't want to use the i18n package but as told before: You can create your own solution with some vanilla code I guess.
IMO, you will lose quite some time doing this. I'd prefer to use a package who does that well rather than trying to achieve it myself because I'd probably bump into un-expected edge cases.
You can always get inspiration from the i18n module source code itself but then, why not use it directly. Using a battle tested package in the JS world is not a bad idea. Especially if it's mantained well (by Pooia).
Reminds me of this one: https://imgs.xkcd.com/comics/standards.png
Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 3 years ago.
Improve this question
I got a weird question while I'm about to deploy my node.js code. like we create a build version for angular, do i need to generate build version before deploying?(minifying js etc.,). First time deploying node.js, please help! Thanks in advance!
No, you don’t need that
Minifying is used to decrease the amount of traffic, served to users. You don’t need this for a server-side code.
As an analogy, you can ask yourself "Do you minify your php or ruby code?"
Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 4 years ago.
Improve this question
At the moment Im using a bunch of script elements which are referring cdn/local files which is not so great.
I think I would like to declare all required packages using npm/yarn and serve cdn files with self hosted fallback (is this even a good idea?).
Should i go for a webpack/browserify solution or is this overkill for this purpose (because AngularJs is already handling dependency injection by itself)? Im getting somewhat lost in the amount of frameworks/information about this topic.
This is an opinion question, so we can only try to figure out what we would do given our knowledge of your needs. With that grain of salt:
What you are describing sounds like way overkill. Unless your performance needs are huge, manage your dependencies with npm and package them with your releases. If you really need to, use a build tool to minify and package your resources together (like webpack).
There are tons of great JS build tools, and if all of the boilerplate is overwhelming, take a look at something like Yeoman which can help out with that.
In my opinion, a self hosted CDN is probably the worst option possible, because it adds huge support requirements with almost no benefits, because as soon as you stop caring about this project someone else will have to refactor all of your code to new CDNs or local resources.
Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 9 years ago.
Improve this question
I come from the Java/C# world where namespaces are absolutely necessary. However, comments like these make me think that modules are of no utility in typescript (and javascript). For large typescript/javascript programs (probably several hundred .ts/.js files by the time we're done), are modules a good practice or do they just get in the way?
ps - I know that opinion questions are not allowed here. But, IMO, this is more a "please explain how javascript works" question.
Having a deep namespace hierarchy is mostly an overkill. Having a single top level namespace is definitely a good idea though.
e.g.
module appName{
class Foo{}
}
instead of
class Foo{}
But not so if you are using already using external modules (commonjs / requirejs) as they isolate code for each file.
Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 9 years ago.
Improve this question
Most programming/markup languages that I know have commands called include, import, load, require, input, etc. that call subfiles from the main file, but as far as I know, JavaScript does not have such feature, and a suggestion that I often see for such case is to insert a <script> tag into the dom (programmatically from the main file), which I think is very indirect. Why does JavaScript lack such feature? Was there any design decision?
who said no? Read about this tool: Helios Kernel
But will it be is conveniently for you?
If you use it with node.js for instance, it does have require().
Unlike most languages, JavaScript is generally client-side. If you want to do this from the client, how would you do that if the file you want to include is actually located on the server? JavaScript does have eval() and many other useful functions to do this, but you need to understand that you are dealing with requests through http and not files on a file system.