Security News
Input Validation Vulnerabilities Dominate MITRE's 2024 CWE Top 25 List
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
@mendix/pluggable-widgets-tools
Advanced tools
A toolset to build, test, format, run, release and lint your Pluggable Widgets
Install via NPM using npm install @mendix/pluggable-widgets-tools
(use node.js version >= 12). When installing via NPM v7.x.x, use npm install @mendix/pluggable-widgets-tools --legacy-peer-deps
.
Even better is creating your widget using Pluggable Widgets Generator which 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 widget. Your web app will reload automatically to reflect changes. You need to run the command on the same machine as Studio Pro.start:native
Build and watch the changes of your Native widget. Your native app will reload automatically to reflect changes.build: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. "name": "MyWidget",
"widgetName": "com.company.widgets.MyWidget",
"version": "1.0.0",
"config": {
"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 componentMyWidget.editorPreview.[tj]sx
- (optional) widget previewMyWidget.editorConfig.[tj]s
- (optional) widget editor configurationcomponents/
MyComponent.[tj]s
- code of widget's components__tests__/
MyComponent.spec.[tj]s
- tests for widget's components.eslint.js
- configuration for ESLint. We recommend 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
rollup.config.js
- (optional) custom configurations for rollup bundler. The standard configuration is passed as an argument named configDefaultConfig
.package.json
- widget package definitions, including its dependencies, scripts, and basic configuration (widgetName
and config.projectPath
in particular)pluggable-widgets-tools
commands used in your package.json
file to one of the described in this readme. In particular start:js
, start:ts
, and start:server
commands should be changed to start:web
.export MyWidget;
instead of export default MyWidget;
.FAQs
Mendix Pluggable Widgets Tools
The npm package @mendix/pluggable-widgets-tools receives a total of 0 weekly downloads. As such, @mendix/pluggable-widgets-tools popularity was classified as not popular.
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.
Security News
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
Security News
In this segment of the Risky Business podcast, Feross Aboukhadijeh and Patrick Gray discuss the challenges of tracking malware discovered in open source softare.
Research
Security News
A threat actor's playbook for exploiting the npm ecosystem was exposed on the dark web, detailing how to build a blockchain-powered botnet.