Skip to content

Commit

Permalink
chore: release v0.8.0
Browse files Browse the repository at this point in the history
  • Loading branch information
Zizzamia committed Jul 12, 2018
1 parent 7b70296 commit 16eb16f
Show file tree
Hide file tree
Showing 8 changed files with 44 additions and 39 deletions.
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
# Changelog

## 0.8.0 (2018-7-11)

### Bug Fixes

* **fix:** 'PerformanceObserver is undefined' on Edge [#37](https://github.com/Zizzamia/perfume.js/pull/37)
* **fix:** All console logging is now disabled when the `config.logging` flag is set to false [#35](https://github.com/Zizzamia/perfume.js/issues/35)
* **build:** export library with the same name for all bundles [#32](https://github.com/Zizzamia/perfume.js/pull/32)

## 0.7.1 (2018-5-17)

### Feat
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<a href="http://zizzamia.github.io/perfume/"><img src="https://github.com/Zizzamia/perfume.js/blob/master/docs/src/assets/perfume-logo-v0-7-1.png" align="left" width="262" /></a>

# [Perfume.js v0.7.1](http://zizzamia.github.io/perfume/)
# [Perfume.js v0.8.0](http://zizzamia.github.io/perfume/)

[![NPM version](https://badge.fury.io/js/perfume.js.svg)](https://www.npmjs.org/package/perfume.js) [![Build Status](https://travis-ci.org/Zizzamia/perfume.js.svg?branch=master)](https://travis-ci.org/Zizzamia/perfume.js) [![NPM Downloads](http://img.shields.io/npm/dm/perfume.js.svg)](https://www.npmjs.org/package/perfume.js) [![Test Coverage](https://api.codeclimate.com/v1/badges/f813d2f45b274d93b8c5/test_coverage)](https://codeclimate.com/github/Zizzamia/perfume.js/test_coverage) [![JS gzip size](https://img.badgesize.io/https://unpkg.com/perfume.js?compression=gzip&label=JS+gzip+size)](https://unpkg.com/perfume.js)

Expand Down
2 changes: 1 addition & 1 deletion docs/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "docs",
"version": "0.7.1",
"version": "0.8.0",
"license": "MIT",
"scripts": {
"ng": "ng",
Expand Down
6 changes: 3 additions & 3 deletions docs/src/app/app.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@
<div class="box box--intro" id="/home/">
<a href="https://github.com/zizzamia/perfume.js" target="_blank">
<picture class="logo">
<source srcset="{{ path }}assets/perfume-logo-v0-7-1.webp" type="image/webp" />
<source srcset="{{ path }}assets/perfume-logo-v0-7-1.png" type="image/jpeg" />
<img src="{{ path }}assets/perfume-logo-v0-7-1.png" alt="Perfume.js logo" />
<source srcset="{{ path }}assets/perfume-logo-v0-8-0.webp" type="image/webp" />
<source srcset="{{ path }}assets/perfume-logo-v0-8-0.png" type="image/jpeg" />
<img src="{{ path }}assets/perfume-logo-v0-8-0.png" alt="Perfume.js logo" />
</picture>
</a>
<h1 class="title">Perfume.js</h1>
Expand Down
Binary file added docs/src/assets/perfume-logo-v0-8-0.webp
Binary file not shown.
6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "perfume.js",
"version": "0.7.1",
"version": "0.8.0",
"description": "JavaScript library for measuring Short and Long Script, First Contentful Paint (FCP), Time to Interactive (TTI), Component First Paint (CFM), annotating them to the DevTools timeline and reporting the results to Google Analytics.",
"keywords": [
"performance-metrics",
Expand Down Expand Up @@ -90,8 +90,8 @@
],
"coverageThreshold": {
"global": {
"branches": 98,
"functions": 97,
"branches": 98.6,
"functions": 97.6,
"lines": 100,
"statements": 100
}
Expand Down
57 changes: 27 additions & 30 deletions rollup.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,33 +4,33 @@ import sourceMaps from 'rollup-plugin-sourcemaps';
import uglify from 'rollup-plugin-uglify';
import pkg from './package.json';

const ensureArray = (maybeArr) =>
Array.isArray(maybeArr) ? maybeArr : [maybeArr];
const ensureArray = maybeArr => (Array.isArray(maybeArr) ? maybeArr : [maybeArr]);

const createConfig = ({ output, includeExternals = false, min = false }) => {
const minify = min && uglify({
output: {
comments(node, { text, type }) {
if (type === 'comment2') {
// multiline comment
return /@preserve|@license|@cc_on/i.test(text);
const minify =
min &&
uglify({
output: {
comments(node, { text, type }) {
if (type === 'comment2') {
// multiline comment
return /@preserve|@license|@cc_on/i.test(text);
}
}
},
},
});
}
});

return {
input: 'dist/es/perfume.js',
output: ensureArray(output).map((format) => ({
output: ensureArray(output).map(format => ({
...format,
name: 'Perfume',
sourcemap: true,
sourcemap: true
})),
// Indicate here external modules you don't wanna include in your bundle (i.e.: 'lodash')
external: includeExternals ? [] : [
...Object.keys(pkg.dependencies || {}),
...Object.keys(pkg.peerDependencies || {}),
],
external: includeExternals
? []
: [...Object.keys(pkg.dependencies || {}), ...Object.keys(pkg.peerDependencies || {})],
watch: { include: 'dist/es/**' },
plugins: [
// Allow bundling cjs modules (unlike webpack, rollup doesn't understand cjs)
Expand All @@ -39,42 +39,39 @@ const createConfig = ({ output, includeExternals = false, min = false }) => {
resolve(),
// Resolve source maps to the original source
sourceMaps(),
minify,
].filter(Boolean),
minify
].filter(Boolean)
};
};

export default [
createConfig({
output: [
{ file: pkg.module, format: 'es' },
{ file: pkg.main, format: 'cjs' },
],
output: [{ file: pkg.module, format: 'es' }, { file: pkg.main, format: 'cjs' }]
}),
createConfig({
output: { file: 'dist/perfume.es5.min.js', format: 'es' },
min: true,
min: true
}),
createConfig({
output: { file: 'dist/perfume.min.js', format: 'cjs' },
min: true,
min: true
}),
createConfig({
output: { file: pkg.iife, format: 'iife' },
includeExternals: true,
includeExternals: true
}),
createConfig({
output: { file: 'dist/perfume.iife.min.js', format: 'iife' },
includeExternals: true,
min: true,
min: true
}),
createConfig({
output: { file: pkg.unpkg, format: 'umd' },
includeExternals: true,
includeExternals: true
}),
createConfig({
output: { file: 'dist/perfume.umd.min.js', format: 'umd' },
includeExternals: true,
min: true,
}),
min: true
})
];
2 changes: 1 addition & 1 deletion src/perfume.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*!
* Perfume.js v0.7.1 (http://zizzamia.github.io/perfume)
* Perfume.js v0.8.0 (http://zizzamia.github.io/perfume)
* Copyright 2018 The Perfume Authors (https://github.com/Zizzamia/perfume.js/graphs/contributors)
* Licensed under MIT (https://github.com/Zizzamia/perfume.js/blob/master/LICENSE)
* @license
Expand Down

0 comments on commit 16eb16f

Please sign in to comment.