0.0.0-alpha.32 • Published 3 years ago
proply v0.0.0-alpha.32
What is this?
Proply runs through your app's JSX and allows you to explore how your React components are being used. Proply provides a standalone environment that can be used or deployed with your design system documentation.
Demos
Getting Started
Install proply
in your app:
npm i proply@alpha
Create a proply config file named proply.config.js
in the root directory of your app:
// proply.config.js
module.exports = {
// Sets page title
title: 'My App',
// Glob pattern for your app's code, where component data will be sourced
include: '/src/**/!(*.spec|*.test).js',
// Specifies which port Proply should use
port: 9000,
// If provided, prepends this url to component locations and turns them into links
locationUrl: 'https://github.com/jonambas/proply/tree/master/example',
// Where to put proply's build
// Defaults to "dist/proply"
outputPath: 'dist/proply'
};
Add the following scripts to your npm package.json
.
// package.json
"scripts": {
"proply:start": "proply start",
"proply:build": "proply build"
}
And finally, run proply
npm run proply:start
# That's it!
Limitations
Proply uses typescript's compiler API to parse through your JSX.
- Components will only be detected when explicitly rendered with JSX, ie
<MyComponent />
. - Components may not accurately represent their
displayName
if they are aliased or renamed. - Prop values that contain expressions such as variables or functions are not evaluated, but are stringified and truncated. Eg, if you use css-modules, you can filter
className
to includestyles.css-class
.
License
MIT
0.0.0-alpha.32
3 years ago
0.0.0-alpha.29
4 years ago
0.0.0-alpha.31
4 years ago
0.0.0-alpha.30
4 years ago
0.0.0-alpha.28
4 years ago
0.0.0-alpha.24
4 years ago
0.0.0-alpha.23
4 years ago
0.0.0-alpha.22
4 years ago
0.0.0-alpha.21
4 years ago
0.0.0-alpha.27
4 years ago
0.0.0-alpha.26
4 years ago
0.0.0-alpha.25
4 years ago
0.0.0-alpha.20
4 years ago