zerodays / react-native-gen-ui

A Generative UI library for React Native.
https://www.npmjs.com/package/react-native-gen-ui
MIT License
78 stars 7 forks source link

prepare script in package.json is incorrect #15

Open vucinatim opened 6 months ago

vucinatim commented 6 months ago

Current Behavior

// package.json
"scripts": {
    ...
    "prepare": "husky install",
    ...
},

Expected Behavior

// package.json
"scripts": {
    ...
    "prepare": "npm run build",
    ...
},

Explanation

The "prepare" command is executed right after package installation. The package should be built in "prepare" step (instead of running husky install which is not needed in that case anyway). Not building the package in prepare means that if installed directly via github link: npm install https://github.com/zerodays/react-native-gen-ui the installation does not set up the package properly, making it unusable (unless the package is then built manually in the node_modules). This needs to be done because the /lib folder where the built files are inserted is added to .gitignore.