@openrewrite/webpack-environment
TypeScript icon, indicating that this package has built-in type declarations

0.0.2 • Public • Published

🚧 Under Construction 🚧

  • Webpack environment for authoring recipes.

Install

npm i -D @openrewrite/webpack-environment

Setup Checklist

  1. Use the provided webpack configuration directly or merge it into your custom configuration:
const openRewriteWebpackConfig = require('@openrewrite/webpack-environment');
const webpackConfig = () => openRewriteWebpackConfig({ sourceDir: 'ts', outputDir: 'js' });
module.exports = webpackConfig;
  1. Make sure you tsconfig.json is extending the provided tsconfig:
{
  "extends": "@openrewrite/webpack-environment/tsconfig.recipe.json",
  "include": [
    "ts/*.ts",
    "test/*.ts",
    "node_modules/@openrewrite/types/**/*.ts",
    "node_modules/@openrewrite/**/jest.d.ts"
  ]
}
  1. Run webpack

How To Use

Running webpack will compile your typescript recipes into a specific target javascript compatible with the OpenRewrite polyglot layer.

Additionally, some extra files will be generated:

index.ts

This file is used to generate a final index.js file which contains your recipes. The index.js is what your package.json's main property should point to.

categories.ts

This is generated from a .openrewriterc file. We use Cosmic Config so you can supply the categories config multiple ways. A category should be defined for your recipes to identify with.

Readme

Keywords

none

Package Sidebar

Install

npm i @openrewrite/webpack-environment

Weekly Downloads

1

Version

0.0.2

License

Apache-2.0

Unpacked Size

33.4 kB

Total Files

31

Last publish

Collaborators

  • knutwannheden
  • natedanner
  • sjungling
  • zieka