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

@nrk/core-css

Package Overview
Dependencies
Maintainers
110
Versions
28
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@nrk/core-css - npm Package Compare versions

Comparing version 1.10.0 to 1.10.1

25

bin/build.js

@@ -1,7 +0,11 @@

const fs = require('fs');
const path = require('path');
const {version} = require('../package.json');
const lib = path.join(__dirname, '../lib');
const fs = require('fs')
const path = require('path')
const { version } = require('../package.json')
const lib = path.join(__dirname, '../lib')
const autoprefixer = require('autoprefixer')
const postcss = require('postcss')
const minifyCss = (css) => String(css) // Work with file as string
const prefixer = autoprefixer({ browsers: ['last 1 version', '> .1%', 'ie 9-11'] })
const minifyCss = css => String(css) // Work with file as string
.replace(/\/\*[^!][^*]*\*\//g, '') // Strip comments

@@ -12,9 +16,10 @@ .replace(/\s*(^|[>:;,{}/]|$)\s*/g, '$1') // Strip white space around tokens

.resolve(fs.readFileSync(path.join(lib, 'core-css.css')))
.then((css) => `/*! Core CSS v${version} - Copyright (c) 2015-${new Date().getFullYear()} NRK <opensource@nrk.no> */\n${css}`)
.then((css) => fs.writeFileSync(path.join(lib, 'core-css.min.css'), minifyCss(css)))
.then(css => `/*! Core CSS v${version} - Copyright (c) 2015-${new Date().getFullYear()} NRK <opensource@nrk.no> */\n${css}`)
.then(css => postcss([prefixer]).process(css, { from: 'lib/core-css.css', to: 'lib/core-css.min.css' }))
.then(css => fs.writeFileSync(path.join(lib, 'core-css.min.css'), minifyCss(css)))
const buildDocs = () => Promise
.resolve(fs.readFileSync(path.join(lib, 'docs.md')))
.then((md) => String(md).replace(/\/major\/\d+/, `/major/${version.match(/\d+/)}`))
.then((md) => fs.writeFileSync(path.join(lib, 'docs.md'), md))
.then(md => String(md).replace(/\/major\/\d+/, `/major/${version.match(/\d+/)}`))
.then(md => fs.writeFileSync(path.join(lib, 'docs.md'), md))

@@ -24,2 +29,2 @@ buildCss()

.then(() => console.log('Built CSS and docs'))
.catch((err) => console.log(err.stack))
.catch(err => console.log(err.stack))

6

package.json

@@ -6,3 +6,3 @@ {

"author": "NRK <opensource@nrk.no> (https://www.nrk.no/)",
"version": "1.10.0",
"version": "1.10.1",
"license": "MIT",

@@ -23,4 +23,6 @@ "scripts": {

"devDependencies": {
"http-server": "0.11.1"
"autoprefixer": "9.4.0",
"http-server": "0.11.1",
"postcss": "7.0.6"
}
}

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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