Templates for building your Atom package and running its specs:
2014-9-14 Atom editor is one of the most awaited editor in developers zone. Atom is modular and that means if we want to add some extra feature to our editor we can write some lines of code and add them as module. This module’s are called ‘packages’. In this post i am going to list down 5 must have. Download Atom by following the instructions on the Atom website. We will also need to install apm, the Atom Package Manager command line tool. Atom packages can be lazy loading. We can tell Atom to load our package only when certain commands are run by the user. These commands.
- macOS and Ubuntu Linux: Using Travis CI
- Windows: Using Appveyor
- Ubuntu Linux / Docker: Using CircleCI
Setting up CI for your package
Travis CI
2015-10-1 1: 应该是atom吧 2: 请参考如下步骤 cd ~/.atom/packages git clone cd emmet-atom npm install 来源 https://github.com. Recommended GitHub Atom Packages for Web Developers 17 Mar 2014. I’ve been using GitHub’s Atom editor for the past couple of weeks and I’ve really enjoyed it. At first there weren’t very many extensions/packages available, but the community has been quick to fill in that gap.
- Sign up for an account on Travis CI
- Copy .travis.ymlto the root of your package's repository
- Setup the Travis CI hook on your package's repository
💥 Your package will now build and run its specs; you can see an exampleof a configured package here
Appveyor
- Sign up for an account on Appveyor
- Add a new project
- Ensure the Ignore appveyor.yml setting in Settings > General is unchecked
- Copy appveyor.ymlto the root of your package's repository
💥 Your package will now build and run its specs; you can see an exampleof a configured package here
CircleCI
- Sign up for an account on CircleCI
- Create a
.circleci
directory at the root of your project - Copy config.ymlto the new directory
- Commit the changes and push them up to GitHub
- Add a new project on CircleCI
💥 Your package will now build and run its specs; you can see an exampleof a configured package here
FAQ
How do I install other Atom packages that my package build depends on?
Set the APM_TEST_PACKAGES
environment variable in your .travis.yml
or .circleci/config.yml
fileto a space-separated list of packages to install before your package's testsrun.
What version of Atom is used to run the specs?
It will always download the latest available version. You can read more aboutthe latest Atom release here.
How does it work?
The apm test
command assumes your package is using Jasminespecs. You can run the specs locally using Atom's spec runner UI from theView > Developer > Run Package Specs menu or by pressing cmd-ctrl-alt-p
. Youcan run apm help test
to learn more about that command.
Travis CI
The .travis.yml
template downloads the build-package.shfrom this repository. This script then downloads the latest Atom release,installs your package's dependencies, and runs the apm test
command to runyour package's specs.
Appveyor
The appveyor.yml
template uses Chocolatey todownload and install the latest version of Atom.apm install
is run in your package directory to ensure any node dependenciesare available. Finally, the script runs the apm test
command to run yourpackage's specs.
CircleCI
The .circleci/config.yml
template runs the same script that is used in the Travis-CI builds.