Research
Security News
Malicious npm Package Targets Solana Developers and Hijacks Funds
A malicious npm package targets Solana developers, rerouting funds in 2% of transactions to a hardcoded address.
@mendix/pluggable-widgets-tools
Advanced tools
A toolset to build, test, format, run, release and lint your Pluggable Widgets
Install from npm using npm install @mendix/pluggable-widgets-tools
. Or better create your widget using Pluggable Widgets Generator that scaffolds the correct project setup.
In your package.json
scripts, use the following command with the desired task: pluggable-widgets-tools task
start:web
Build and watch the changes of your Web widgetstart:server
Build and watch the changes of your Web widget. Start a web server, that reloads the widget code without the need to re-run the Mendix project. Accepts option --open
to automatically open your browser.start:native
Build and watch the changes of your Native widgetbuild:web
Build your Web widgetbuild:native
Build your Native widgetrelease:web
Create a release build of your Web widgetrelease:native
Create a release build of your Native widgetlint
Lint your project using ESLint and Prettierlint:fix
Fix lint problems/warning of ESLint and Prettierformat
Format your code using Prettiertest:unit:web
Run unit tests for your Web widget. Accepts option --u
to update snapshots, --no-cache
to remove existing caches, --ci
assumes use of a CI environment, --coverage
to support coverage test.test:unit:native
Run unit tests for your Native widget. Accepts option --u
to update snapshots, --no-cache
to remove existing caches, --ci
assumes use of a CI environment, --coverage
to support coverage test.test:e2e
Execute end-to-end tests in your Web widget "name": "MyWidget",
"widgetName": "com.company.widgets.MyWidget",
"version": "1.0.0",
"config": {
"widgetPath": "../MxTestProject/widgets",
"projectPath": "../MxTestProject/",
"mendixHost": "http://localhost:8080",
"developmentPort": "3000"
},
"scripts": {
"build": "pluggable-widgets-tools build:web",
"lint": "pluggable-widgets-tools lint",
"lint:fix": "pluggable-widgets-tools lint:fix",
"test:unit": "pluggable-widgets-tools test:unit --coverage"
}
src/
MyWidget.xml
- widget definitionMyWidget.[tj]sx
- widget client componetMyWidget.editorPreview.[tj]sx
- (optional) widget previewMyWidget.editorConfig.[tj]s
- (optional) widget editor configurationcomopnents/
MyComponent.[tj]s
- code of widget's components__tests__/
MyComponent.spec.[tj]s
- tests for widget's components.eslint.js
- configuration for ESLint. We recoommend to just re-export @mendix/pluggable-widgets-tools/configs/eslint.ts.base.json
prettier.config.js
- configuration for Prettier. We recommend to just re-export @mendix/pluggable-widgets-tools/configs/prettier.base.json
tsconfig.json
- configuration for TypeScript. We recommend to just extend @mendix/pluggable-widgets-tools/configs/tsconfig.base.json
webpack.config.dev.js
- (optional) custom configurations for webpack bundler (both for client and preview components) when running in development mode. The standard confiugration can be imported from @mendix/pluggable-widgets-tools/configs/webpack.config.dev.js
for web and from @mendix/pluggable-widgets-tools/configs/webpack.native.config.js
for native apps.webpack.config.prod.js
- (optional) custom configuration for webpack bundler in release mode.package.json
- widget package definitions, inluding its dependencies, scripts, and basic configuration (widgetName
and config.projectPath
in particular)React-hot-loader is not anymore needed to provide auto refresh functionality. That is, you can remove its usage from the code: your main entry point can simply be export default MyWidget;
instead of export default hot(MyWidget);
.
If you do not change your widget, hot will be replaced with a noop function that has no effect.
FAQs
Mendix Pluggable Widgets Tools
We found that @mendix/pluggable-widgets-tools demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 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
Security News
A malicious npm package targets Solana developers, rerouting funds in 2% of transactions to a hardcoded address.
Security News
Research
Socket researchers have discovered malicious npm packages targeting crypto developers, stealing credentials and wallet data using spyware delivered through typosquats of popular cryptographic libraries.
Security News
Socket's package search now displays weekly downloads for npm packages, helping developers quickly assess popularity and make more informed decisions.