Skip to content

Instantly share code, notes, and snippets.

@Melindrea
Last active August 29, 2015 14:19
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Melindrea/412f72cc7f8494828276 to your computer and use it in GitHub Desktop.
Save Melindrea/412f72cc7f8494828276 to your computer and use it in GitHub Desktop.
Errors in plugin
// Removed everything that doesn't have to do with this specific thing
var assemble = require('assemble'),
bufferPages = require('./pages.js');
assemble.task('buffer', function () {
assemble.src('*.md')
.pipe(bufferPages())
.pipe(assemble.dest('data'));
});
/home/marie/projects/smaty.se/node_modules/gulp-util/lib/PluginError.js:102
return ' ' + prop + ': ' + self[prop];
^
TypeError: Cannot convert object to primitive value
at stringifyProperty (/home/marie/projects/smaty.se/node_modules/gulp-util/lib/PluginError.js:102:33)
at Array.map (native)
at PluginError._messageDetails (/home/marie/projects/smaty.se/node_modules/gulp-util/lib/PluginError.js:101:27)
at PluginError._messageWithDetails (/home/marie/projects/smaty.se/node_modules/gulp-util/lib/PluginError.js:80:22)
at PluginError.toString (/home/marie/projects/smaty.se/node_modules/gulp-util/lib/PluginError.js:124:16)
at Stream.<anonymous> (/home/marie/projects/smaty.se/node_modules/assemble/node_modules/assemble-utils/node_modules/session-cache/node_modules/continuation-local-storage/context.js:78:13)
at Stream.emit (events.js:104:17)
at Stream.emitted [as emit] (/home/marie/projects/smaty.se/node_modules/assemble/node_modules/assemble-utils/node_modules/session-cache/node_modules/continuation-local-storage/node_modules/emitter-listener/listener.js:122:21)
at DestroyableTransform.handleEnd (/home/marie/projects/smaty.se/node_modules/assemble/node_modules/event-stream/node_modules/duplexer/index.js:81:21)
at DestroyableTransform.emit (events.js:129:20)
shortTitle pageTitle layout hasTwitter tweetables excerpt
Home
So, what's this about?
index
true
You like my writing? Sign up for my monthly newsletter!
Not everything is as it seems. Magic exists in the shadows …
Norns weave destiny; I weave stories. Mystic threads from then to now
Småty is a term for supernatural critters, and if you're interested in magical realism or Scandinavial folklore, this is a good place to start.

This page is about a world that exists in my imagination, at least mainly. It’s called Småty since that’s a dialectal word from Bohuslän, Sweden, for the various supernatural critters in the world. If you are interested in Viking historical fiction and contemporary magical realism inspired by Scandinavian folklore (including the Norse gods), this is a good place to be.

The stories are a mix of historical (mainly the iron age, both before the so-called Viking age and during) and contemporary, something in the magical realism line. They are all set in Sweden, generally with connection to Bohuslän, which in old times was known as either Alfheim or Ranrike. I prefer Ranrike, so that is the term used in my world.

Check out the characters (which includes interviews and bios), the locations and their real-world inspiration, or the stories, which has excerpts of longer works as well as both microfiction (up to 140 characters) and flash fiction (up to about 1000 words).

{
"devDependencies": {
"assemble": "git://github.com/assemble/assemble.git#v0.6.0",
"through2": "^0.6.3",
"vinyl": "^0.4.6"
}
}
'use strict';
var through = require('through2'),
path = require('path'),
entries = [];
module.exports = function () {
return through.obj(function (file, enc, cb) {
var fp = file.path,
extname = path.extname(fp),
filename = path.basename(fp, extname),
link = path.dirname(fp) + '/' + filename + '/',
tweetables = file.data.tweetables || [];
tweetables = tweetables.filter(function (tweetable) {
return tweetable.length >= 50 && tweetable.length <= 70;
});
console.log(tweetables);
cb();
},
function (cb) {
var contents = '{}',
File = require('vinyl'),
file = new File({
cwd: process.cwd(),
base: '/data/',
path: '/data/files.json',
contents: new Buffer(contents)
});
this.push(file);
cb();
});
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment