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

contentful-metalsmith

Package Overview
Dependencies
Maintainers
1
Versions
13
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

contentful-metalsmith - npm Package Compare versions

Comparing version 0.0.0 to 0.1.0

18

lib/index.js

@@ -18,7 +18,7 @@ 'use strict';

return function(files, metalsmith, done){
var keys = Object.keys(files),
doneWithFile = partialDone(keys.length, done);
var keys = Object.keys(files);
each(keys, processFile);
each(keys, processFile, done);
//TODO: switch to bluebird promises
function processFile(file, fileProcessedCallback){

@@ -28,3 +28,2 @@ var fileMetadata = files[file], client, query;

if (!fileMetadata.contentful) {
doneWithFile();
fileProcessedCallback();

@@ -54,3 +53,3 @@ return;

client.entries(query).then(onSuccessfulEntriesFetch(fileMetadata.contentful, doneWithFile), onErroneousEntriesFetch(doneWithFile));
client.entries(query).then(onSuccessfulEntriesFetch(fileMetadata.contentful, fileProcessedCallback), onErroneousEntriesFetch(fileProcessedCallback));

@@ -61,3 +60,2 @@ /*

debug('Processed file ' + file );
fileProcessedCallback();
}

@@ -90,9 +88,2 @@

function partialDone(pendingFiles, globalDone){
return function(){
pendingFiles -= 1;
if (pendingFiles == 0) globalDone();
};
}
function pushEntryToContentType(contentTypes, contentType, entry){

@@ -105,2 +96,3 @@ contentTypes[contentType].push(entry);

var file,
//TODO: fix the contentType
contentType = options.contentType ? contentType : entry.sys.contentType.sys.id;

@@ -107,0 +99,0 @@

{
"name": "contentful-metalsmith",
"version": "0.0.0",
"version": "0.1.0",
"description": "A Metalsmith's plugin to get content from Contentful",

@@ -5,0 +5,0 @@ "main": "lib/index.js",

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