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

async-preloader

Package Overview
Dependencies
Maintainers
1
Versions
48
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

async-preloader - npm Package Compare versions

Comparing version 3.2.0 to 3.3.0

lib/async-preloader.cjs.js

23

package.json
{
"name": "async-preloader",
"version": "3.2.0",
"version": "3.3.0",
"description": "Assets preloader using ES2017 async/await and fetch.",
"main": "lib/async-preloader.js",
"jsnext:main": "lib/async-preloader.module.js",
"module": "lib/async-preloader.module.js",
"main": "lib/async-preloader.cjs.js",
"browser": "lib/async-preloader.umd.js",
"module": "lib/async-preloader.esm.js",
"jsnext:main": "lib/async-preloader.esm.js",
"types": "lib/index.d.ts",

@@ -26,9 +27,11 @@ "license": "MIT",

"scripts": {
"dev": "rollup -c -w -m inline",
"dev": "rollup -c -w -m inline --environment NODE_ENV:development",
"jest": "jest test/ --watch --coverage --no-cache",
"clean": "rm -rf lib && rm -rf docs",
"build": "rollup -c",
"docs": "typedoc --out docs --mode modules --excludeExternals --includeDeclarations --module commonjs --theme default src && echo '' > docs/.nojekyll",
"build": "rollup -c --environment NODE_ENV:production",
"docs": "typedoc --out docs --mode modules --excludeExternals --includeDeclarations --module commonjs --theme default src",
"test": "jest test/",
"prepublishOnly": "npm run build && npm run docs"
"preversion": "npm run clean && npm run test",
"version": "npm run build && npm run docs && git add -A",
"postversion": "git push && git push --tags && npm publish"
},

@@ -68,4 +71,6 @@ "jest": {

"rollup": "^0.56.3",
"rollup-plugin-commonjs": "^9.1.3",
"rollup-plugin-node-resolve": "^3.0.3",
"rollup-plugin-typescript2": "^0.11.1",
"rollup-plugin-uglify": "^4.0.0",
"rollup-watch": "^4.3.1",

@@ -78,3 +83,3 @@ "ts-jest": "^22.4.0",

"dependencies": {
"fontfaceobserver": "^2.0.13",
"fontfaceobserver-es": "^3.2.0",
"lodash-es": "^4.17.10",

@@ -81,0 +86,0 @@ "tslib": "^1.9.0"

import resolve from "rollup-plugin-node-resolve";
import commonjs from "rollup-plugin-commonjs";
import typescript from "rollup-plugin-typescript2";
import { uglify } from "rollup-plugin-uglify";
export default {
input: "src/index.ts",
plugins: [
resolve(),
typescript({
typescript: require("typescript")
})
],
output: [
{
import pkg from "./package.json";
const isDev = process.env.NODE_ENV === "development";
export default [
{
input: "src/index.ts",
plugins: [
resolve(),
commonjs(),
typescript({
typescript: require("typescript")
}),
isDev ? 0 : uglify()
].filter(Boolean),
external: ["tslib", "lodash-es/get", "fontfaceobserver-es"],
output: {
name: "AsyncPreloader",
format: "umd",
file: "lib/async-preloader.js",
name: "AsyncPreloader",
file: pkg.browser,
exports: "named",
globals: {
tslib: "tslib",
lodash: "lodash",
fontfaceobserver: "FontFaceObserver"
"lodash-es/get": "_.get",
"fontfaceobserver-es": "FontFaceObserver"
}
},
{
}
},
{
input: "src/index.ts",
plugins: [
resolve(),
commonjs(),
typescript({
typescript: require("typescript")
}),
isDev ? 0 : uglify()
].filter(Boolean),
external: ["tslib", "lodash-es/get", "fontfaceobserver-es"],
output: {
format: "cjs",
file: pkg.main,
exports: "named"
}
},
{
input: "src/index.ts",
plugins: [
resolve(),
typescript({
typescript: require("typescript")
})
],
external: ["tslib", "lodash-es/get", "fontfaceobserver-es"],
output: {
format: "es",
file: "lib/async-preloader.module.js"
file: pkg.module
}
],
external: ["tslib", "lodash", "fontfaceobserver"]
};
}
];
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