Skip to content

Instantly share code, notes, and snippets.

@come-maiz
Created September 28, 2016 00:02
Show Gist options
  • Save come-maiz/2aacc0a2fe66dc9cbdce7cf25bc5dd4f to your computer and use it in GitHub Desktop.
Save come-maiz/2aacc0a2fe66dc9cbdce7cf25bc5dd4f to your computer and use it in GitHub Desktop.
Metalsmith snap testing

Smoke tests for the Metalsmith snap

First, build and install the snap:

$ sudo apt install git snapcraft
$ git clone https://github.com/elopio/metalsmith
$ cd metalsmith
$ git checkout snapcraft
$ snapcraft
$ sudo snap install *.snap --force-dangerous

Print the help:

$ metalsmith -h
$ metalsmith --help

  Usage: _metalsmith [options]

  Options:
  [...]

Print the version:

$ metalsmith -V
$ metalsmith --version
2.2.0

Go to the example directory:

$ cd examples/wintersmith

Install some plugins:

$ /snap/metalsmith/current/bin/npm install metalsmith-markdown
$ /snap/metalsmith/current/bin/npm install metalsmith-permalinks
$ /snap/metalsmith/current/bin/npm install metalsmith-layouts
$ /snap/metalsmith/current/bin/npm install jade

Build the site:

$ metalsmith

  Metalsmith · successfully built to [...]/metalsmith/examples/wintersmith/build

Open the site:

$ firefox build/index.html
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment