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

build-elm-assets

Package Overview
Dependencies
Maintainers
2
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

build-elm-assets - npm Package Compare versions

Comparing version 1.2.0 to 1.2.1

.npmignore

17

index.js

@@ -30,3 +30,13 @@ const dive = require("dive");

},
() => checkForDuplications(assets, callback)
() => {
var sortedAssets =
assets.sort(function(a, b) {
if (a.elmName < b.elmName)
return -1;
if (a.elmName > b.elmName)
return 1;
return 0;
});
checkForDuplications(sortedAssets, callback)
}
);

@@ -160,4 +170,5 @@ } catch (e) {

validateConfig(config);
collectAssets(config, (err, assets) =>
writeElmFile(config, assets, callback));
collectAssets(config, (err, assets) => {
writeElmFile(config, assets, callback);
});
},

@@ -164,0 +175,0 @@ collectAssets,

4

package.json
{
"name": "build-elm-assets",
"version": "1.2.0",
"description": "builds a elm file containing all paths of a assets directory",
"version": "1.2.1",
"description": "Builds an Elm file containing all paths of assets in a directory",
"main": "index.js",

@@ -6,0 +6,0 @@ "scripts": {

Build Elm Assets
================
[![Build Status](https://travis-ci.org/NoRedInk/build-elm-assets.svg?branch=master)](https://travis-ci.org/NoRedInk/build-elm-assets)
> Generates a file containing assets from a given folder and containing a hash in the urls.

@@ -5,0 +7,0 @@

@@ -39,3 +39,3 @@ import test from "ava";

test("collectAssets", t => {
test("collectAssets should invoke the callback with sorted assets", t => {
const { collectAssets } = mockModule(["foo.png", "bar.png"]);

@@ -49,8 +49,8 @@ const config = {

{
elmName: "bar_png",
urlWithHash: "bar-HASH.png"
},
{
elmName: "foo_png",
urlWithHash: "foo-HASH.png"
},
{
elmName: "bar_png",
urlWithHash: "bar-HASH.png"
}

@@ -57,0 +57,0 @@ ];

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