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

flagpack

Package Overview
Dependencies
Maintainers
1
Versions
24
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

flagpack - npm Package Compare versions

Comparing version 1.0.2 to 1.0.3

helpers/sass.js

27

builder.js

@@ -1,26 +0,7 @@

const sass = require('node-sass');
const path = require('path');
const fs = require('fs');
const pathToFlagStyles = path.join(__dirname, './src/')
const sass = require('./helpers/sass');
function compileSass(input, output){
sass.render({
file: path.join(pathToFlagStyles, input + '.scss'),
outputStyle: 'compressed'
}, function (err, result) {
if (!err) {
fs.writeFile(path.join(__dirname, './dist/', output + '.css'), result.css, function (err) {
if (!err) {
console.log('File written to: ', pathToFlagStyles)
} else {
console.error(err)
}
});
} else {
console.error(err)
}
})
}
sass.compile('flagpack', 'flagpack');
compileSass('flagpack', 'flagpack');
{
"name": "flagpack",
"version": "1.0.2",
"version": "1.0.3",
"description": "A lightweight flag icon toolkit for the web",

@@ -10,3 +10,3 @@ "main": "builder.js",

"scripts": {
"build": "node builder.js"
"compile:sass": "node builder.js"
},

@@ -13,0 +13,0 @@ "repository": {

@@ -43,3 +43,3 @@ # Flagpack

_[visit flag.pk](https://flag.pk/world) to quickly copy your countries code for you project._
_[visit flag.pk](https://flag.pk/world) to quickly copy your countries code for your project._

@@ -92,3 +92,3 @@ ---

## Why use this library?
Most flag libraries out there either use low quality png's or overly complex svg's. Flagpack is around `125kb gzipped` this is including all the svgs (both **1x1** and **4x3** formats) plus the css. making it about **10x** smaller than [flag-icon-css](https://github.com/lipis/flag-icon-css).
Most flag libraries out there either use low quality png's or overly complex svg's that don't scale down well. Flagpack is around `125kb gzipped` this is including all the svgs (both **1x1** and **4x3** formats) plus the css. making it about **10x** smaller than [flag-icon-css](https://github.com/lipis/flag-icon-css).

@@ -95,0 +95,0 @@ Using only **1x1** or **4x3** formats will reduce the size to around `60kb`.

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