Compilers, package managers & importing - looking for clear product info


#1

I can’t find clear product info on working with Glitch. Would be very helpful to have simple directions on getting started.

Specifically, how does Glitch work with:

  • Other standard tools for node.js dev: Compilers & package managers (ie Babel & npm). I’ve seen some projects that seem to handle some of these things, but it’s all fuzzy.

  • Importing: Step-by-step directions on starting a project and importing other libraries - from Github or upload. Seen some discussion threads that are likewise unclear. For importing I’ve seen threads say; refresh page to see project, or project gets hidden and needs to be called in package.json.


#2

Other standard tools for node.js dev

  • Every glitch instance has console access, meaning that if your “npm install; npm start” is not sufficient for you, you can always hop in the console and run the commands manually.
  • The console can be opened by opening a project, click the name (top left corner) to display a dropdown, click advance options and click “Open console”.
  • These instances have a multiple of node versions, they are using nvm as the version manager ($ nvm list).
  • The installation of global packages can be a pain but it’s possible ($ npm install -g pkg).
  • Babel, bower and other technologies can be use inside glitch, check out the examples in the community directory.
  • By the default the instances will run npm install and npm prune after every reload.
  • Any package installed using the console will be removed, you need to add them to the package.json file or via command line using the --save flag. There’s a known issue regarding using github repositories instead of versions, so using specific versions is encouraged.

Importing

  • Starting a project is as easy as clicking a button at glitch.com
  • If you need to import a project from Github just create a new project, click the name (top left corner) to display a dropdown, click advance options and you’ll see the import and export buttons (you need to grant access first).
  • If you want to use git, open the terminal and use it from there. If you want to clone something inside your project you can even use the git clone command.
  • There’s a gotcha with imported repositories, the .gitignore command will hide files from the tree view in the editor, but they’re available (either by removing them from gitignore or from the console).

Hope this helps you out. Have a good one and hack away.