A Grunt plugin for parsing Archie Markup Language (ArchieML) files into JSON using archieml-js.
ArchieML (or "AML") was created at The New York Times to make it easier to write and edit structured text on deadline that could be rendered in web pages, or more specifically, rendered in interactive graphics.
This plugin requires Grunt
If you haven't used Grunt before, be sure to check out the Getting Started guide, as it explains how to create a Gruntfile as well as install and use Grunt plugins. Once you're familiar with that process, you may install this plugin with this command:
npm install grunt-archieml --save-dev
The "archieml" task
In your project's Gruntfile, add a section named
archieml to the data object passed into
A function that will be run on each processed file, after it has been processed by ArchieML. The function is passed three parameters: the parsed file contents, the file's index within the array of files and the complete array of files.
In this example, we're parsing a folder of AML files into a single JSON file. The final JSON file,
dest/data.json, with be an array with each array item being the parsed contents of a single file in the
In this example, we're doing some processing on the parsed file contents before writing them to the final JSON file.
In lieu of a formal styleguide, take care to maintain the existing coding style. Add unit tests for any new or changed functionality. Lint and test your code using Grunt.
|2015-06-29||v0.1.1||Update archieml-js dependency to v0.3.x|