I came across platform that I wanted to break down to further understand it more. I’d like to use it to learn more about it since its similar to what I would like to build later on, and has all the files except the package.json. So I’m hoping someone might have any way how I could re-create the package.json for it.
(I do not plan on directly taking and cloning the platform, especially due to copyright laws)
Inspect sources: “Authored” includes all folders (CSS, JS, Node_Modules, Packages, Webpack)
Also includes JS like Index.js, App.js, MenuDraw.js, and 15 others. (And 30+ Node_Module Folders)
All Components, Pages, Node Modules, App.js, and Index.js are in normal react code.
The other is “static” that only has 3 folders (CSS and JS)
CSS only has main.1788f493.css, JS only has main.1788f493.js, and index.htm.
I attached an screenshot as an example
Example of react code
an example of static
Trying to create pacjage.json using the files shown for testing.
I’m looking to see how (or if its possible) to create a package.json using these files.
I asked a similar question but it is a little different in this case, thank you for the help!
You will probably have to manually recreate it.
Go through the source code to identify the external libraries (React, Redux, Axios, etc.) the project depends on.
From the screenshot, we can already identify that Material-UI was used (@mui/joy
).
You’ll likely find import
or require
statements at the top of these files indicating which packages are used.
Start with these, and afterwards you compare your node_modules
folder with the one of the page you are looking at to fill in all missing modules.