particles.js icon indicating copy to clipboard operation
particles.js copied to clipboard

npm particles.min.js

Open pjebs opened this issue 9 years ago • 17 comments

I downloaded this using npm. Unfortunately the particles.min.js file doesn't get downloaded. Can you please correct this.

pjebs avatar Jun 19 '16 01:06 pjebs

Same here.

hongbo-miao avatar Jun 24 '16 17:06 hongbo-miao

@VincentGarreau I wanted to draw your attention to this as NPM compatibility is pretty important for frontend libraries these days.

adrianmcli avatar Jul 14 '16 21:07 adrianmcli

Is still missing

montogeek avatar Sep 08 '16 19:09 montogeek

Also no entry point?

rhys-vdw avatar Sep 13 '16 02:09 rhys-vdw

@VincentGarreau I understand you're a good looking guy based on your photo. I'm in that club too. It's actually an unwritten club policy to help the others out. It'll only take a few minutes max. Can you do that champ?

pjebs avatar Sep 15 '16 00:09 pjebs

Why do you need a minified version of the package if you're using npm? Wont your package builder uglify your dependencies, @pjebs?

rhys-vdw avatar Sep 15 '16 06:09 rhys-vdw

It depends on how you are using npm. You could use it with require or import statements and combine all your dependencies into 1 javascript file etc etc.

OR you could use npm basically as a nice way to update all your dependencies and keep them in one place but use gulp to copy the min file directly from npm_modules to public js directory and use it in the page with a <scrip> tag.

The page I use this file is my site's maintenance page. It's a very very simple page. It's extra hassle to do option 1. Having said that I guess I could use gulp to minify the file during the copy process - but it'll be extra hassle.

pjebs avatar Sep 15 '16 06:09 pjebs

Thanks for elaborating, @pjebs.

rhys-vdw avatar Sep 15 '16 07:09 rhys-vdw

Hmmm I can't find a way to get gulp to minify the file before copying to the public js folder. @rhys-vdw would you know how? I use gulp via Laravel Elixier: https://laravel.com/docs/5.2/elixir

@rhys-vdw BTW, do you go to melbjs

pjebs avatar Sep 15 '16 07:09 pjebs

particles.js doesn't export anything, but it does set window.particlesJS. So require/import the npm package the usual way, then call window.particlesJS to initialize. Works for me (but yucky).

typewriter-software avatar Jul 11 '17 17:07 typewriter-software

@pjebs heh, just saw this. No I don't. I do go to React and Node meetups occasionally and used to go to an Angular meetup.

rhys-vdw avatar Jul 11 '17 23:07 rhys-vdw

Is still missing in 2019, add it guys @VincentGarreau

NishargShah avatar May 21 '19 22:05 NishargShah

If you want to use particles with import/require you can try this: https://github.com/matteobruni/tsparticles It has also wrappers for react, jquery, preact, vuejs and angular ready to use.

matteobruni avatar Jun 14 '20 14:06 matteobruni

@matteobruni What's your secret to getting so many stars in such a short time. WHere did you advertise your library so it got initial attention? Obviously it's quality so it would have picked up steam by itself but how did you get the initial kick?

pjebs avatar Jun 14 '20 15:06 pjebs

Reddit helped a lot for the first stars, Facebook and Twitter weren't so helpful but probably I did something wrong. I replaced the core of a react particles library (more than 10k/downloads on npm monthly) with my library and that helped a lot too, this required a lot of work.

matteobruni avatar Jun 14 '20 15:06 matteobruni

@matteobruni What did you try on facebook and twitter?

pjebs avatar Jun 14 '20 15:06 pjebs

Javascript related groups

matteobruni avatar Jun 14 '20 15:06 matteobruni