Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

gulp-archieml

Package Overview
Dependencies
Maintainers
5
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

gulp-archieml - npm Package Compare versions

Comparing version 1.0.0 to 1.1.0

CHANGELOG.md

50

index.js

@@ -1,30 +0,30 @@

'use strict';
const archieml = require('archieml');
const PluginError = require('plugin-error');
const replaceExt = require('replace-ext');
const through = require('through2');
var gutil = require('gulp-util'),
through = require('through2'),
archieml = require('archieml');
module.exports = function () {
return through.obj(function(file, enc, cb) {
if (file.isNull()) {
cb(null, file);
return;
}
module.exports = () => through.obj(function archieToJson(file, enc, cb) {
if (file.isNull()) {
cb(null, file);
return;
}
if (file.isStream()) {
cb(new gutil.PluginError('gulp-archieml', 'Streaming not supported'));
return;
}
if (file.isStream()) {
cb(new PluginError('gulp-archieml', 'Streaming not supported'));
return;
}
try {
var parsed = archieml.load(file.contents.toString());
file.contents = new Buffer(JSON.stringify(parsed));
file.path = gutil.replaceExtension(file.path, '.json');
this.push(file);
} catch (err) {
this.emit('error', new gutil.PluginError('gulp-archieml', err));
}
try {
const parsed = archieml.load(file.contents.toString());
const jsonFile = Object.assign(file, {
contents: Buffer.from(JSON.stringify(parsed)),
path: replaceExt(file.path, '.json'),
});
this.push(jsonFile);
} catch (err) {
this.emit('error', new PluginError('gulp-archieml', err));
}
cb();
});
};
cb();
});
{
"name": "gulp-archieml",
"version": "1.0.0",
"version": "1.1.0",
"description": "A Gulp plugin for parsing ArchieML files.",

@@ -12,6 +12,7 @@ "license": "MIT",

"engines": {
"node": ">=0.10.0"
"node": ">=6.4.0"
},
"scripts": {
"test": "./node_modules/jshint/bin/jshint index.js && ./node_modules/mocha/bin/mocha test"
"lint": "eslint index.js",
"test": "istanbul cover _mocha test && istanbul report html"
},

@@ -25,12 +26,19 @@ "files": [

"dependencies": {
"archieml": "^0.3.1",
"gulp-util": "^3.0.1",
"archieml": "^0.4.2",
"plugin-error": "^1.0.1",
"replace-ext": "^1.0.0",
"through2": "^0.6.3"
},
"devDependencies": {
"assert": "^1.3.0",
"jshint": "^2.9.1",
"mocha": "^2.4.5",
"assert": "^1.4.1",
"eslint": "^4.19.1",
"eslint-config-airbnb": "^17.0.0",
"eslint-plugin-import": "^2.13.0",
"eslint-plugin-jsx-a11y": "^6.1.1",
"eslint-plugin-react": "^7.10.0",
"istanbul": "^0.4.5",
"mocha": "^5.2.0",
"mocha-junit-reporter": "^1.17.0",
"vinyl-fs": "^2.4.2"
}
}
# gulp-archieml
![CircleCI](https://img.shields.io/circleci/project/github/DallasMorningNews/gulp-archieml.svg) [![npm](https://img.shields.io/npm/v/gulp-archieml.svg)](https://github.com/DallasMorningNews/gulp-archieml) [![GitHub license](https://img.shields.io/github/license/DallasMorningNews/gulp-archieml.svg)](https://github.com/DallasMorningNews/gulp-archieml/blob/master/LICENSE)
[![Circle CI](https://circleci.com/gh/DallasMorningNews/gulp-archieml.svg?style=svg)](https://circleci.com/gh/DallasMorningNews/gulp-archieml)
A Gulp plugin for parsing Archie Markup Language (ArchieML) files into JSON using [archieml-js](https://github.com/newsdev/archieml-js).

@@ -24,10 +23,8 @@

```js
var gulp = require('gulp'),
archieml = require('gulp-archieml');
const gulp = require('gulp');
const archieml = require('gulp-archieml');
gulp.task('test', function() {
return gulp.src('./path/to/*.aml')
.pipe(archieml())
.pipe(gulp.dest('./path/to/json/output/'));
});
gulp.task('test', () => gulp.src('./path/to/*.aml')
.pipe(archieml())
.pipe(gulp.dest('./path/to/json/output/')));
```

@@ -43,5 +40,11 @@

Coverage is calculated using Istanbul and output to the _coverage_ folder:
```
$ open coverage/index.html
```
## License
MIT ©2016 [The Dallas Morning News](https://github.com/DallasMorningNews)
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc