How to publish a JavaScript function [closed] - javascript

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 3 years ago.
Improve this question
I have made a JavaScript function that I think could be useful to many people.
How would I do to "publish" it?
How can I make it as easy as possible for other people to include it in their projects?
(I'm not concerned about payment, licensing & such right now. If any, it should be free & permissive, although donations would be appreciated but not required).

For javascript I'd recommend creating an npm package and register it at npmjs.com

1. If you want just to publish it, do it in https://www.npmjs.com/.
2. If you want to store your code in a repository, where other people will be able to contribute and help you building your product, the most popular source control system is https://github.com/. More, you can set up your account to receive donations by other people and companies as well.
3. Next step(not a part of the question) is to automate the whole process of building, testing, deployment from your source control system(https://github.com/ ) to the javascript packages storage(https://www.npmjs.com/) using CI/CD(continuous integration/continuous delivery) tools(e.g. https://jenkins.io/).

There are many ways in which you can do that. For the simpler stuff, you can use Pastebin (https://pastebin.com/) or CodePen (https://codepen.io/) for instance. You can also create a project on GitHub (https://github.com/) or publish a package over at NPM (https://www.npmjs.com/, https://docs.npmjs.com/cli/publish), either of these two being a must for a bigger library.
Also make sure to properly document your code and make it ease to find.

Related

how can I create multi language site with Nuxt? [closed]

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

After I create my code, how do I give it a database? [closed]

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 3 years ago.
Improve this question
I'd say I know how to code fairly well.
I've made 2 recent successful programs for work from using just javascript and html.
But I only know how to create them to where every program I make and share have individual copies.
There's no single database that I can edit the code and in result, subsequently all of my coworkers copies update as well.
Instead, any time I make changes to a program, I have to email them all the updated versions and have them update the programs on their computers.
What's my next steps to making all copies of my programs be manipulated by one database?
If I understood correctly, you are trying to version your code the old fashion way, that means, every time you change something in your code, you create a copy and then send to your co-workers.
You don't need a database for that, instead, you should use version control like git or svn.
There are some serivces like
github
gitlab
bitbucket
where you can store your projects private or public, then give access to your colleagues, and they can also modify the code if you wish.

What is the most sane way to manage dependencies for a AngularJs 1.x webapplication [closed]

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.

Should I have one big angular file for my entire website? [closed]

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 7 years ago.
Improve this question
I'm building a website that will have facebook-ish features (friends and what not) along with a marketplace and some forums. I've decided to use bootstrap as I'm not a good designer and rather than using Jquery I've come across a replacement for their plugins written in angular (UI bootstrap is the name).
Should I just have one giant angular file for my entire website, aka the plugins for UI one and add whatever else I need to do that, or should I load in two different files? One will be the pre-written plugins and the other one will be the web app needed for that page (for example having the marketplace web app in its own file and include both of them on the same page).
This is my first website so I'm trying to make it as efficient as possible, thanks for the input!
I'd do one for the scripts that you wrote and another for the vendor scripts.
But if you are starting new to gulp or grunt you should really consider using a scaffolding tool such as yeoman. If you use angular-fullstack generator you will see some good examples for both angular and grunt, as well as node.
Definitely not, you should only have one angular component per file. Working with a scaffolding tool such as Yeoman or Slush will make this much easier.
Additionally, I would recommend reading some of the AngularJS styleguides out there. John Papa's guide and Todd Motto's guide are good places to start. Here's a full list of AngularJS resources to get you started. Good luck!

ExtJS license issue [closed]

Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 10 years ago.
Improve this question
We need to develop a project for a government organisation that needs a javascript dev library to build the front end.
Having exploring quite a bit options in the market, we decided to go for ExtJS library as it provides an abundant set of widgets and UI tools that come in handy and ready to use. We also identified there are two licenses, one for Open source and the other for commercial use.
We are unsure which license to go for for our project. The project is not-for-profit and the established website will be open for use by public (which means the ExtJS and our own codes will be open?). We are not going to modify any part of ExtJS library source code, only just to use it.
Please help. Thanks!
Alex
I don't think that qualifies as open source.
However you should really be directing this at Sencha company.
As far as I know, open source ExtJS is under GPLv3. In most cases, the code has to be published on request which normally Government will not allow that. However, some cases the exception may apply. For example, if you are contractor hired by government.
To ensure you have correct license, please contact extjs licensing at licensing#extjs.com
Normally,they will reply within 1-3 working days. I also had licensing issues before and they answered it in very details.

Categories