Comparing version 0.0.12 to 1.0.0
The MIT License (MIT) | ||
Copyright (c) 2017 José Luis Quintana <https://git.io/joseluisq> | ||
Copyright (c) 2017-present José Luis Quintana <https://git.io/joseluisq> | ||
@@ -5,0 +5,0 @@ Permission is hereby granted, free of charge, to any person obtaining a copy of |
{ | ||
"name": "printd", | ||
"version": "0.0.12", | ||
"version": "1.0.0", | ||
"description": "Print HTML elements in modern browsers.", | ||
@@ -18,14 +18,21 @@ "repository": "joseluisq/printd", | ||
}, | ||
"main": "./dist/printd.umd.js", | ||
"typings": "./dist/index.d.ts", | ||
"main": "./index.js", | ||
"typings": "./index.d.ts", | ||
"files": [ | ||
"./index.js", | ||
"./index.d.ts", | ||
"./*.min.js", | ||
"./README.md", | ||
"./LICENSE.md" | ||
], | ||
"scripts": { | ||
"version": "npm run build", | ||
"build": "npm run test && npm run clean && npm run compile && npm run minify:browser", | ||
"compile": "tsc --module es2015 && npm run compile:browser", | ||
"compile:browser": "rollup -c && npm run minify:browser", | ||
"minify:browser": "uglifyjs dist/${npm_package_name}.umd.js -cm --source-map -o dist/${npm_package_name}.umd.min.js", | ||
"build": "npm run test && npm run clean && npm run compile", | ||
"compile": "npm run compile:browser && npm run compile:cjs", | ||
"compile:cjs": "tsc --module commonjs --target es5", | ||
"compile:browser": "rollup -c", | ||
"watch": "tsc --watch", | ||
"clean": "rm -rf dist", | ||
"test": "npm run lint && karma start --single-run --reporters spec", | ||
"test:watch": "karma start", | ||
"test:watch": "env NODE_ENV=debug karma start", | ||
"lint": "tslint --format stylish --project tsconfig.json" | ||
@@ -36,16 +43,17 @@ }, | ||
"@types/node": "^8.0.26", | ||
"dcl-tslint-config-standard": "^1.0.1", | ||
"jasmine-core": "^2.8.0", | ||
"jasmine-core": "^3.2.1", | ||
"jasmine-spec-reporter": "^4.2.1", | ||
"karma": "^1.7.1", | ||
"karma": "^2.0.5", | ||
"karma-chrome-launcher": "^2.2.0", | ||
"karma-jasmine": "^1.1.0", | ||
"karma-jasmine-html-reporter": "^0.2.2", | ||
"karma-spec-reporter": "^0.0.31", | ||
"karma-typescript": "^3.0.5", | ||
"rollup": "^0.49.2", | ||
"tslint": "^5.9.1", | ||
"typescript": "^2.8.3", | ||
"uglifyjs": "^2.4.11" | ||
"karma-jasmine": "^1.1.2", | ||
"karma-jasmine-html-reporter": "^1.3.0", | ||
"karma-spec-reporter": "^0.0.32", | ||
"karma-typescript": "^3.0.13", | ||
"rollup": "^0.64.1", | ||
"rollup-plugin-terser": "^1.0.1", | ||
"rollup-plugin-typescript2": "^0.16.1", | ||
"tslint": "^5.11.0", | ||
"tslint-config-standard-plus": "^2.0.1", | ||
"typescript": "^2.9.2" | ||
} | ||
} |
@@ -5,3 +5,3 @@ # Printd [![npm](https://img.shields.io/npm/v/printd.svg)](https://www.npmjs.com/package/printd) [![npm](https://img.shields.io/npm/dt/printd.svg)](https://www.npmjs.com/package/printd) [![Build Status](https://travis-ci.org/joseluisq/printd.svg?branch=master)](https://travis-ci.org/joseluisq/printd) [![JavaScript Style Guide](https://img.shields.io/badge/code_style-standard-brightgreen.svg)](https://standardjs.com) | ||
Printd is a small script to print HTMLElements. Printd opens [the Print Dialog](https://developer.mozilla.org/en-US/docs/Web/API/Window/print) to print elements inside a blank document. It also supports [CSS Text](https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement/style) for custom styles. | ||
Printd is a small (`618 bytes` gzipped) script to print HTMLElements. Printd opens [the Print Dialog](https://developer.mozilla.org/en-US/docs/Web/API/Window/print) to print elements inside a blank document. It also supports [CSS Text](https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement/style) for custom styles. | ||
@@ -87,3 +87,3 @@ - :rocket: [Live demo](https://codepen.io/joseluisq/full/VzRpGb/) | ||
Prints the current `HTMLElement`. | ||
Function to print the current `HTMLElement`. | ||
@@ -94,9 +94,9 @@ Params: | ||
- __cssText:__ Optional [CSS Text](https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement/style) to add custom styles to the current element. | ||
- __callback:__ Optional callback function. _Inside the callback it's necessary to call `launchPrint(win)` to trigger the printing. | ||
- __callback:__ Optional callback function. _Inside the callback it's necessary to call `launchPrint(win)` to trigger the printing._ | ||
- __win__: `Window` reference. | ||
- __doc__: `Document` reference. | ||
- __node__: `HTMLElement` reference. | ||
- __launchPrint__: `Function` reference. | ||
- __launchPrint(win)__: `Function` to trigger the printing on demand. | ||
Basic example: | ||
1. Basic example: | ||
@@ -108,3 +108,3 @@ ```js | ||
Callback example: | ||
2. Callback example: | ||
@@ -153,3 +153,3 @@ ```js | ||
- https://caniuse.com/#feat=beforeafterprint | ||
- https://github.com/Fyrd/caniuse/pull/4086 | ||
- [PR: Update support for before/after print event handlers (Blink)](https://github.com/Fyrd/caniuse/pull/4086) | ||
- https://developer.mozilla.org/en-US/docs/Web/API/WindowEventHandlers/onbeforeprint | ||
@@ -156,0 +156,0 @@ |
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
Deprecated
MaintenanceThe maintainer of the package marked it as deprecated. This could indicate that a single version should not be used, or that the package is no longer maintained and any new vulnerabilities will not be fixed.
Found 1 instance in 1 package
Empty package
Supply chain riskPackage does not contain any code. It may be removed, is name squatting, or the result of a faulty package publish.
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
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
1
7626
16
3
0
1
1