Package example in JavaScript


#1

Can someone point me to a template for creating an Atom package using JavaScript? Just one little example that does what the generated package does, with a little popup window and two files, one that imports what the other exports.

There is a project that supposedly generates packages in JavaScript, but it is broken and hasn’t (and likely won’t) be upgraded to work with the latest Atom API.


#2

You can easily take the coffeescript files and compile them to javascript. Just do coffee -c *.coffee. Coffee produces very readable javascript. Or, better yet, take 10 minutes to learn how to read CS files.


#3

I created a package named command-executor entirely in JavaScript, you can go to its repo to view its code. However, if my code is too complicated to be understood, you should use atom package generator to create a template in CoffeeScript then compile it to JavaScript


#4

toggle-quotes is a simple package written in JavaScript.


#5

You can use apm to create either an CoffeeScript or JavaScript ES6 package:

$ apm help init
Usage:
  apm init -p <package-name>
  apm init -p <package-name> --syntax <javascript-or-coffeescript>