You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The code is in typescript. Use a typescript IDE of your choice, like Visual Studio Code or WebStorm.
67
-
68
-
To set up the development environment, run:
69
-
70
-
npm install
71
-
72
-
Create a folder named dist in the project root.
73
-
74
-
Create a Mendix test project in the dist folder and rename its root folder to MxTestProject. Changes to the widget code shall be automatically pushed to this test project. Or get the test project from [https://github.com/mendixlabs/google-maps/releases/latest](https://github.com/mendixlabs/google-maps/releases/latest)
75
-
76
-
dist/MxTestProject
77
-
78
-
To automatically compile, bundle and push code changes to the running test project, run:
79
-
80
-
grunt
81
-
82
-
To run the project unit tests with code coverage, results can be found at dist/testresults/coverage/index.html, run:
The code is in typescript. Use a typescript IDE of your choice, like Visual Studio Code or WebStorm.
9
+
10
+
To set up the development environment, run:
11
+
12
+
> npm install
13
+
14
+
Create a folder named `dist` in the project root.
15
+
16
+
Create a Mendix test project in the dist folder and rename its root folder to `dist/MxTestProject`. Changes to the widget code shall be automatically pushed to this test project.
17
+
Or get the test project from [https://github.com/mendixlabs/google-maps/releases/latest](https://github.com/mendixlabs/google-maps/releases/latest)
18
+
19
+
To automatically compile, bundle and push code changes to the running test project, run:
20
+
21
+
> npm start
22
+
23
+
To run the project unit tests with code coverage, results can be found at `dist/testresults/coverage/index.html`, run:
24
+
25
+
> npm run test:unit
26
+
27
+
Run the unit test continuously during development:
28
+
29
+
> npm run test:dev
30
+
31
+
Run the end to end test during development:
32
+
33
+
> npm run test:e2e:dev
34
+
35
+
## Scripts
36
+
While developing, you will probably rely mostly on `npm start`; however, there are additional scripts at your disposal:
37
+
38
+
|`npm run <script>`|Description|
39
+
|------------------|-----------|
40
+
|`start`|Build the project and monitor source and config for changes and rebuild.|
41
+
|`test`|Runs lint, build, unit tests with Karma and generates a coverage report, deploy and run e2e test|
42
+
|`test:dev`|Runs Karma and watches for changes to re-run tests; does not generate coverage reports.|
43
+
|`test:unit`|Runs unit tests with Karma and generates a coverage report.|
44
+
|`test:e2e`|Runs end 2 end tests with remote.|
45
+
|`test:e2e:dev`|Runs end 2 end tests with locally on localhost:8080|
46
+
|`deploy`|Use latest widget build to update the Mendix project update the application to Mendix node.|
47
+
|`build:prod`|Build widget optimized for production|
48
+
|`build:dev`|Build widget optimized for debugging.|
49
+
|`lint`|Lint all `.js` files.|
50
+
|`lint:fix`|Lint and fix all `.ts` files.|
51
+
52
+
# CI and remote testing
53
+
To enable the continues integration services.
54
+
Copy the `node_modules/mendix-widget-build-script/dist/localSettings.js`
55
+
to your project root, and update the settings to run the update deployment from local source.
56
+
57
+
**Do not forget** to exclude this file in the `.gitignore` as it contains sensitive data.
0 commit comments