
Research
Two Malicious Rust Crates Impersonate Popular Logger to Steal Wallet Keys
Socket uncovers malicious Rust crates impersonating fast_log to steal Solana and Ethereum wallet keys from source code.
@gofynd/theme-template
Advanced tools
FDK React Templates is a React component library designed specifically for Fynd Commerce. It includes a collection of reusable components, tools, and utilities to streamline the development process. This library is built with Webpack to handle JavaScript, TypeScript, CSS, and other assets, making it efficient and easy to maintain.
.jsx
files from the src
directory.dist
directory, maintaining the relative path structure.CleanWebpackPlugin
and MiniCssExtractPlugin
for efficient build processes.Install the package in react theme repositary.
npm install github:gofynd/fdk-react-templates.git#V.X.X.X
Replace V.X.X.X.X with proper version. Example :
npm install github:gofynd/fdk-react-templates.git#V.1.0.0
Use in your Component
import ProductListing from "fdk-react-templates/pages/product-listing/product-listing";
Clone the repository:
git clone https://github.com/gofynd/fdk-react-templates.git
cd fdk-react-templates
Install dependencies:
npm install
To build the project for production, run:
npm run build
This will generate the output in the dist
directory.
For development, use: To test locally package in your local system before publishing npm package in your local theme repo, run: \r
npm i "src url of fdk-react-templates"
This will install the development package in your projects node_modules.
The entry points are dynamically generated by including all .jsx
files from the src
directory:
entry: () => {
const entryFiles = glob.sync('./src/**/*.jsx');
const entry = {};
entryFiles.forEach(file => {
entry[file.replace('src', '')] = file;
});
return entry;
},
The output is configured to generate files in the dist
directory, maintaining the relative path structure:
output: {
path: path.resolve(__dirname, "dist"),
filename: (chunkInfo) => {
const getNameFromPath = (path) => path.replace(/\.jsx$/, "");
chunkInfo.chunk.name = getNameFromPath(chunkInfo.chunk.name);
return '[name].js';
},
libraryTarget: "umd",
library: "firestone",
umdNamedDefine: true,
globalObject: 'typeof self !=="undefined" ? self : this',
clean: true,
publicPath: './',
},
The configuration includes several plugins to enhance the build process:
CleanWebpackPlugin
: Cleans the dist
directory before each build.MiniCssExtractPlugin
: Extracts CSS into separate files, supporting both modules and global CSS.Various loaders are configured to handle different types of files:
babel-loader
: Transpiles JavaScript and TypeScript files using Babel presets.css-loader
, style-loader
, postcss-loader
: Handles CSS files with support for CSS modules.less-loader
: Compiles Less files, with support for both modules and global styles.@svgr/webpack
: Processes SVG files to be used as React components.asset/resource
: Manages font files and other static assets.Certain libraries are treated as external dependencies to reduce the bundle size So make sure to add them in your package.json:
externals: {
'react': 'react',
'react-router-dom': 'react-router-dom',
'fdk-core/components': 'fdk-core/components',
'fdk-core/utils': 'fdk-core/utils',
'awesome-snackbar': 'awesome-snackbar',
'react-outside-click-handler': 'react-outside-click-handler',
'react-hook-form': 'react-hook-form',
'react-range-slider-input': 'react-range-slider-input',
'imask': 'imask',
'card-validator': 'card-validator',
'@react-google-maps/api': '@react-google-maps/api',
'react-google-autocomplete': 'react-google-autocomplete',
'framer-motion': 'framer-motion',
'html-react-parser': 'html-react-parser',
'google-libphonenumber': 'google-libphonenumber',
'react-international-phone': 'react-international-phone',
'@emotion/is-prop-valid': '@emotion/is-prop-valid'
}
The project uses Terser for minification and optimizes chunk splitting:
optimization: {
minimizer: [
new TerserPlugin({
terserOptions: {
keep_fnames: true,
keep_classnames: true,
},
}),
],
splitChunks: {
chunks() {
return false;
},
},
}
The Pages includes a variety of pre-built page templates designed to streamline the development process. Each page is crafted to meet specific use cases and can be easily customized to fit your project's needs.
The Components offers a collection of reusable UI components that can be integrated into any React application. These components are designed to be flexible and easy to use, promoting consistency across your project.
Contributions are welcome! Please open an issue or submit a pull request for any changes.
For any questions or feedback, please contact Prashant Pandey at prashantpandey@gofynd.com.
This README provides a detailed overview of the FDK React Templates library, including installation, usage, and configuration details. Ensure to update any placeholders with actual information specific to your project.
FAQs
A react component library build for skyfire.
We found that @gofynd/theme-template demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 15 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
Socket uncovers malicious Rust crates impersonating fast_log to steal Solana and Ethereum wallet keys from source code.
Research
A malicious package uses a QR code as steganography in an innovative technique.
Research
/Security News
Socket identified 80 fake candidates targeting engineering roles, including suspected North Korean operators, exposing the new reality of hiring as a security function.