Download Latest Version v2.0.0.zip (270.9 kB)
Email in envelope

Get an email when there's a new version of remarkable

Home / v2.0.0
Name Modified Size InfoDownloads / Week
Parent folder
README.md 2019-08-07 1.7 kB
v2.0.0.tar.gz 2019-08-07 213.2 kB
v2.0.0.zip 2019-08-07 270.9 kB
Totals: 3 Items   485.8 kB 0

This major bump mostly improves and simplifies distribution.

  • source code is converted to esm
  • lib is not longer published to hide internals and allow us safely change them
  • we started to use rollup to provide umd, cjs and esm bundles
  • bower support is removed as not relevant these days
  • autolinker is upgraded so you should not get old vulnerabilities

To make esm/cjs interop safe we migrated to named exports in public api

:::diff
- import Remarkable from 'remarkable';
- const utils = Remarkable.utils;
+ import { Remarkable, utils } from 'remarkable';

:::diff
- const Remarkable = require('remarkable');
- const utils = Remarkable.utils;
+ const { Remarkable, utils } = require('remarkable');

:::diff
- const Remarkable = window.Remarkable;
- const utils = Remarkable.utils;
+ // note: window namespace is lowercased
+ const { Remarkable, utils } = window.remarkable;

In order is reduce bundle size for browser builds linkify option is decoupled into own plugin

:::diff
- import Remarkable from 'remarkable';
- new Remarkable({ html: true, linkify: true })
+ import { Remarkable } from 'remarkable';
+ import { linkify } from 'remarkable/linkify';
+ new Remarkable({ html: true }).use(linkify);

For the same reason we ditched large generated entities list in favour of dom trick in browser build.

Checkout bundlephobia to see results we achieved

Source: README.md, updated 2019-08-07