Comparing version 1.0.2 to 1.0.3
@@ -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`. |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
748359
520