3.2.5 • Published 2 months ago

@runtime-type-inspector/parcel-transformer v3.2.5

Weekly downloads
-
License
MIT
Repository
-
Last release
2 months ago

Plugin for Parcel v2

For integrating this plugin follow this process:

1) npm install --save-dev @runtime-type-inspector/parcel-transformer

2) Edit your .parcelrc:

{
    "extends": "@parcel/config-default",
    "transformers": {
        "*.js": ["@runtime-type-inspector/parcel-transformer", "..."]
    }
}

3) Make sure to declare RTI as globals:

<script src="/node_modules/@runtime-type-inspector/runtime/index.cjs"></script>
<script>
  Object.assign(window, rtiRuntime);
</script>
<script src="./build/out.js"></script>

This is kind of ugly, but Parcel v2 simply doesn't seem to support adding import declarations inside a plugin. If I will find a possibility, I will fix this.

Parcel also drops files that export nothing, but given the nature of JSDoc comments in combination of RTI, a comment is converted into registerTypedef(...) for example. This means that typedefs in such files will simply be unregistered, causing runtime type errors (because it's an unknown type). Make sure to process such files individually and add them into the final out.js.

3.2.5

2 months ago

3.2.4

3 months ago

3.2.2

3 months ago

3.2.3

3 months ago

3.2.1

3 months ago

3.2.0

4 months ago

3.1.0

4 months ago

3.0.0

4 months ago

1.0.6

5 months ago

1.0.5

5 months ago

1.0.4

5 months ago

1.0.3

7 months ago

1.0.2

7 months ago

1.0.1

7 months ago

1.0.0

7 months ago