tlms_esd 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/nodemon.json ADDED
@@ -0,0 +1,13 @@
1
+ {
2
+ "restartable": "rs",
3
+ "verbose": true,
4
+ "watch": [
5
+ "src/"
6
+ ],
7
+ "ext": "js,yaml",
8
+ "ignore": [
9
+ "src/emulators/"
10
+ ],
11
+ "delay": "3",
12
+ "execMap": {}
13
+ }
package/package.json ADDED
@@ -0,0 +1,51 @@
1
+ {
2
+ "name": "tlms_esd",
3
+ "version": "0.1.0",
4
+ "description": "管道泄漏紧急关断系统",
5
+ "type": "module",
6
+ "main": "index.js",
7
+ "exports": {
8
+ "cli": "./cli.js",
9
+ "default": "./main.js",
10
+ "emu": "./emulator.js"
11
+ },
12
+ "dependencies": {
13
+ "modbus-serial": "^8.0.17"
14
+ },
15
+ "peerDependencies": {
16
+ "pm2": "^5.4.1"
17
+ },
18
+ "devDependencies": {
19
+ "@rollup/plugin-commonjs": "^26.0.1",
20
+ "@rollup/plugin-json": "^6.1.0",
21
+ "@rollup/plugin-node-resolve": "^15.2.3",
22
+ "eslint": "^8.57.0",
23
+ "globby": "^13.2.2",
24
+ "iconv-lite": "^0.6.3",
25
+ "mri": "^1.2.0",
26
+ "nodemon": "^3.1.4",
27
+ "nodes7": "^0.3.18",
28
+ "rimraf": "^3.0.2",
29
+ "rollup": "^4.18.0",
30
+ "yaml": "^2.4.5"
31
+ },
32
+ "directories": {
33
+ "conf": "example",
34
+ "lib": "lib"
35
+ },
36
+ "bin": {
37
+ "tlms": "./cli.js"
38
+ },
39
+ "keywords": [
40
+ "modbusTCP",
41
+ "PLC",
42
+ "S7"
43
+ ],
44
+ "author": "",
45
+ "license": "ISC",
46
+ "scripts": {
47
+ "build": "rollup -c",
48
+ "dev": "node ./dev.js JSC",
49
+ "watch": "nodemon ./dev.js JSC"
50
+ }
51
+ }
@@ -0,0 +1,41 @@
1
+ import pkg from './package.json' with { type: 'json' };
2
+ import commonjs from '@rollup/plugin-commonjs';
3
+ import resolve from '@rollup/plugin-node-resolve';
4
+ import json from '@rollup/plugin-json';
5
+
6
+ export default [{
7
+ input: 'src/main.js',
8
+ output: [{
9
+ file: pkg.exports.default,
10
+ format: 'es',
11
+ }],
12
+ plugins: [
13
+ resolve({ preferBuiltins: true }),
14
+ commonjs(),
15
+ json()
16
+ ],
17
+ external: ['modbus-serial'],
18
+ }, {
19
+ input: 'src/emulator.js',
20
+ output: [{
21
+ file: pkg.exports.emu,
22
+ format: 'es',
23
+ }],
24
+ plugins: [
25
+ resolve({ preferBuiltins: true }),
26
+ commonjs(),
27
+ json()
28
+ ],
29
+ external: ['modbus-serial'],
30
+ }, {
31
+ input: 'src/cli.js',
32
+ output: [{
33
+ file: pkg.exports.cli,
34
+ format: 'es',
35
+ }],
36
+ plugins: [
37
+ resolve({ preferBuiltins: true }),
38
+ json()
39
+ ],
40
+ external: ['./main.js', './emulator.js'],
41
+ }];