Nattily Primped Monster
Learn how companies like Phone2Action are using npm in their front-end developmentJoin the conversation »

jest-runner-rollup

1.2.0 • Public • Published

jest-runner-rollup npm version License

Jest runner for Rollup, plays very very nicely in monorepo scenarios

Please consider following this project's author, Charlike Mike Reagent, and ⭐️ the project to show your ❤️ and support.

Code style CircleCI linux build CodeCov coverage status DavidDM dependency status Renovate App Status Make A Pull Request Time Since Last Commit

If you have any how-to kind of questions, please read the Contributing Guide and Code of Conduct documents. For bugs reports and feature requests, please create an issue or ping @tunnckoCore at Twitter.

Conventional Commits Minimum Required Nodejs NPM Downloads Monthly NPM Downloads Total Share Love Tweet Twitter

Project is semantically versioned & automatically released from GitHub Actions with Lerna.

Become a Patron Buy me a Kofi PayPal Donation Bitcoin Coinbase Keybase PGP

Topic Contact
Any legal or licensing questions, like private or commerical use tunnckocore_legal
For any critical problems and security reports tunnckocore_security
Consulting, professional support, personal or team training tunnckocore_consulting
For any questions about Open Source, partnerships and sponsoring tunnckocore_opensource

Table of Contents

(TOC generated by verb using markdown-toc)

Install

This project requires Node.js >=10.13 (see Support & Release Policy). Install it using yarn or npm.
We highly recommend to use Yarn when you think to contribute to this project.

$ yarn add jest-runner-rollup

Usage

First, put it in your Jest config

module.exports = {
  rootDir: __dirname,
  displayName: 'bundle',
  testMatch: [
    // if there is no extension, it try to autodetect it.
    '<rootDir>/packages/*/src/index',
  ],
  moduleFileExtensions: ['js', 'jsx', 'ts', 'tsx', 'mjs'],
  runner: 'jest-runner-rollup',
};

Then, write Rollup config file. It automatically detects your rollup.config.js. If you want you also can name it .rolluprc.js, jest-runner-rollup.config.js, or put your config in jest-runner.config.js (this config file can be used for other jest runners too), like so

module.exports = {
  rollup: {
    plugins: [
      /*
      commonjs(),
      nodeResolve()
      */
    ],
    output: [
      { preferConst: true, format: 'cjs', exports: 'named' },
      { preferConst: true, format: 'esm' },
    ],
  },
};

By default, the bundle file will be dist/<format>/index.js, even if only one output format is given. If you want to change that behavior, you can pass output.file.

back to top

Contributing

Guides and Community

Please read the Contributing Guide and Code of Conduct documents for advices.

For bug reports and feature requests, please join our community forum and open a thread there with prefixing the title of the thread with the name of the project if there's no separate channel for it.

Consider reading the Support and Release Policy guide if you are interested in what are the supported Node.js versions and how we proceed. In short, we support latest two even-numbered Node.js release lines.

Support the project

Become a Partner or Sponsor? 💵 Check the Partner, Sponsor or Omega-level tiers! 🎉 You can get your company logo, link & name on this file. It's also rendered on package page in npmjs.com and yarnpkg.com sites too! 🚀

Not financial support? Okey! Pull requests, stars and all kind of contributions are always welcome. ✨

Wonderful Contributors

Thanks to the hard work of these wonderful people this project is alive! It follows the all-contributors specification. Don't hesitate to add yourself to that list if you have made any contribution! ;) See how, here.


Charlike Mike Reagent

💻 📖 💬 👀 🔍

Consider showing your support to them. 💖

back to top

License

Copyright (c) 2019-present, Charlike Mike Reagent <opensource@tunnckocore.com> & contributors.
Released under the MPL-2.0 License.

Install

npm i jest-runner-rollup

DownloadsWeekly Downloads

59

Version

1.2.0

License

MPL-2.0

Unpacked Size

35.1 kB

Total Files

5

Last publish

Collaborators

  • avatar