Atom: Deploy Multiple Packages


#1

I use Atom to teach web skills, but it always needs to be installed onto freshly imaged machines in the training rooms.

There are a number of packages which I think are most useful in web development, so I would like to install them as simply as possible.

Currently, I simply copy a folder full of packages onto the individual machines, but this is tedious and not 100% reliable:

  • The folders have zillions of files, so it takes a long time
  • Due to an issue with the way the Windows image was created, I run into the notorious pathname too long problem.

The question is, is there a way I can get Atom to install the packages from a list or something like that?


#2

You can if you use package-sync.


#3

Thanks for your suggestion.

I have had a look at it, but it appears to be a very big package once it includes the node modules. It also requires the package to be installed, which is one of the things I was trying to minimise.

Looking further into the package, it occurred to me that the apm command line program will do exactly that. In particular:

apm install --packages-file …

will install the packages from a text file.

In my testing, I found that I could include it in a batch file and it worked. However, it was very slow installing one or two of the packages.

I don’t run windows at home, so I had to test on a virtual machine (VirtualBox running Windows 10). Next week I will try it out on a training machine.


#4

Hello.

May I make a suggestion?

How about following the procedure mentioned in the Flight-Manual for creating a portable installation. The files for the packages can be prepared before and the directory that contains these can be archived as a single ZIP / 7Z file.

Deploying the archived package files could be done with some scripting (like Powershell). The portable installation makes it possible to create generic paths. The downside of the updates of the software not happening automatically, is in this case a positive.

Depending on the budget, every student can receive a USB key that already contains the required files. Atom install and packages. For the classroom environment it would be best for everyone to be on the same versions of software.

A caution - the startup of portable version is slower.

Currently my Beta version is installed as a portable version:
image

Regards.


#5

An alternative, more complex solution would be to download the source code of the packages you want, compress those folders without installing any of them (no node_modules means a very manageable number of files) and have your batch file uncompress them and traverse the folders to run npm install on each. I’m reasonably sure that that would be the fastest way of doing it.