10.1.38 • Published 5 years ago

paperclip-react-loader v10.1.38

Weekly downloads
1
License
ISC
Repository
-
Last release
5 years ago

Installation: npm install paperclip-react-loader

Documentation for writing React controllers can be found in the paperclip-react-compiler package.

This is a Webpack loader for converting Tandem UI files (*.pc) into React components. Here's a basic webpack.config.js example:

const fs = require("fs");

module.exports = {
  mode: "development",
  entry: "./src/index,js",
  output: {
    path: "./lib",
    filename: "[name].bundle.js"
  },
  resolve: {
    extensions: [".js", ".ts"]
  },
  module: {
    rules: [
      {
        test: /.pc$/,
        use: [
          {
            loader: "paperclip-react-loader",
            options: {
              // the config is just the contents of your Tandem project file.
              config: JSON.parse(fs.readFileSync("./app.tdproject", "utf8"))
            }
          }
        ]
      }
    ]
  }
};

With the above config, we can load *.pc files into our app like normal modules. For example:

import * as React from "react";
import * as ReactDOM from "react-dom";
import { Application } from "./app.pc";
ReactDOM.render(<Application />);

Documentation for using imported *.pc modules can be found in the paperclip-react-compiler package

10.1.38

5 years ago

10.1.36

5 years ago

10.1.33

5 years ago

10.1.32

5 years ago

10.1.31

5 years ago

10.1.25

5 years ago

10.1.24

5 years ago

10.1.23

5 years ago

10.1.22

5 years ago

10.1.21

5 years ago

10.1.18

5 years ago

10.1.17

5 years ago

10.1.15

5 years ago

10.1.14

5 years ago

10.1.10

5 years ago

10.1.9

5 years ago

10.1.8

5 years ago

10.1.5

5 years ago

10.1.4

5 years ago

10.1.2

5 years ago

10.1.1

5 years ago

10.0.36

6 years ago

10.0.33

6 years ago

10.0.32

6 years ago

10.0.31

6 years ago

10.0.29

6 years ago

10.0.28

6 years ago

10.0.26

6 years ago

10.0.25

6 years ago

10.0.24

6 years ago

10.0.23

6 years ago

10.0.10

6 years ago

10.0.9

6 years ago

10.0.3

6 years ago

2.0.0

6 years ago

1.0.0

6 years ago