2.4.4 • Published 4 months ago

jmap-infortu-js v2.4.4

Weekly downloads
217
License
ISC
Repository
-
Last release
4 months ago

Info-RTU and JMap NG Lima works with Node.js 18.

The first time, install dependencies :

npm i
npm install -g validator

To run on windows, cross-env (https://www.npmjs.com/package/cross-env) can/must be used to set the environment variable

npm install --save-dev cross-env

To start the application :

For Linux environment:

npm start

For Windows:

npm run wstart

The application is accessible at this location : https://localhost:8083?isFromInfoEx=true or https://localhost:8083/dev/index.html?isFromInfoEx=true

When code is changed, it's automatically built and the web page refresh by its own (thanks webpack dev server).

When running in dev, copy file /build/env-config.js.example to /build/env-config.js and modify accordingly for dev or prod.

webpack environment notes :

Two folders relate to webpack configuration and running process::

  1. src/resources, which contains the initial source index.html files for dev and prod (only used for initial copy)
  2. public/, the directory served by webpack web server which should contain the index.html files and application index.js files.

When the npm start commands is first executed, if the /public directory does not exist, the /dev files should be copied to /public directory (see buildfile.js).

Webpack will create and update the public/index.js file automatically, so the dev/index.html file should contain this file for source of Info-RTU extension

The index.html window.JMAP_OPTIONS restBaseUrl value can also be changed to connect to either the Info-Ex Dev JMap server or a local JMap server.

Install the following vs-code extensions :

- "ESLint" extention
- "Prettier - Code formatter" extention (Author : Esben Petersen)

Configure vscode

- Create or edit app/.vscode/settings.json
- Add the following content :

{
  "javascript.format.enable": false,
  "typescript.format.enable": false,
  "eslint.format.enable": true,
  "eslint.lintTask.enable": true,
  "editor.codeActionsOnSave": {
    "source.fixAll.eslint": "explicit"
  },
  "eslint.workingDirectories": [
    {
      "mode": "auto"
    }
  ],
  "eslint.validate": ["javascript", "typescript", "javascriptreact", "typescriptreact"],
  "editor.formatOnSave": true,
  "editor.formatOnPaste": true,
  "editor.tabSize": 2,
  "editor.detectIndentation": false,
  "[typescript]": {
    "editor.defaultFormatter": "esbenp.prettier-vscode",
    "editor.codeActionsOnSave": {
      "source.organizeImports": "explicit"
    }
  },
  "[typescriptreact]": {
    "editor.defaultFormatter": "esbenp.prettier-vscode",
    "editor.codeActionsOnSave": {
      "source.organizeImports": "explicit"
    }
  },
  "[javascript]": {
    "editor.defaultFormatter": "esbenp.prettier-vscode"
  },
  "[typescript][typescriptreact]": {
    "editor.codeActionsOnSave": {
      "source.organizeImports": "explicit"
    }
  }
}

Publish new version to NPM

  • If not logged to npm (use 1pass): npm login
  • Update extension the version in package.json
  • npm install
  • rename /build/env-config.js to /build/_env-config.js or change NODE_ENV to 'production'
  • to publish, npm run build or for windows: npm run build-win
2.4.1

4 months ago

2.4.3

4 months ago

2.4.2

4 months ago

2.4.4

4 months ago

2.4.0

9 months ago

2.3.0

2 years ago

2.1.11

3 years ago

2.1.10

4 years ago

2.1.9

4 years ago

2.1.8

4 years ago

2.1.7

4 years ago

2.1.6

4 years ago

2.1.5

4 years ago

2.1.4

4 years ago

2.1.2

4 years ago

2.1.1

4 years ago

2.1.3

4 years ago

2.0.11

4 years ago

2.1.0

4 years ago

2.0.10

4 years ago

2.0.9

4 years ago

2.0.8

4 years ago

2.0.7

4 years ago

2.0.6

4 years ago

2.0.5

4 years ago

2.0.4

4 years ago

2.0.3

4 years ago

2.0.2

4 years ago

2.0.1

4 years ago

1.1.4

4 years ago

1.1.3

4 years ago

1.1.2

4 years ago

1.1.1

4 years ago

1.1.0

4 years ago

1.0.0

5 years ago

0.4.0

5 years ago

0.3.2

5 years ago

0.3.1

5 years ago

0.3.0

5 years ago

0.2.9

5 years ago

0.2.7

5 years ago

0.2.8

5 years ago

0.2.6

5 years ago

0.2.5

5 years ago

0.2.3

5 years ago

0.2.4

5 years ago

0.2.2

5 years ago

0.2.1

5 years ago

0.2.0

5 years ago

0.1.0

5 years ago

0.0.2

5 years ago

0.0.1

5 years ago