@sdeverywhere/compile 0.7.5 → 0.7.6
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/README.md +30 -3
- package/package.json +1 -1
- package/src/_shared/helpers.js +1 -1
- package/src/_shared/read-dat.js +1 -1
- package/src/_shared/subscript.js +1 -1
- package/src/generate/code-gen.js +1 -1
- package/src/generate/equation-gen.js +1 -1
- package/src/generate/model-lhs-reader.js +1 -1
- package/src/model/equation-reader.js +1 -1
- package/src/model/model.js +1 -1
- package/src/model/subscript-range-reader.js +1 -1
- package/src/model/var-name-reader.js +1 -1
- package/src/model/variable-reader.js +1 -1
- package/src/preprocess/preprocessor.js +1 -1
package/README.md
CHANGED
|
@@ -1,11 +1,38 @@
|
|
|
1
1
|
# @sdeverywhere/compile
|
|
2
2
|
|
|
3
|
-
This package contains the core SDEverywhere compiler that takes a Vensim model
|
|
4
|
-
|
|
3
|
+
This package contains the core [SDEverywhere](https://github.com/climateinteractive/SDEverywhere) compiler that takes a Vensim model as input and generates C code as output.
|
|
4
|
+
|
|
5
|
+
## Quick Start
|
|
6
|
+
|
|
7
|
+
The best way to get started with SDEverywhere is to follow the [Quick Start](https://github.com/climateinteractive/SDEverywhere#quick-start) instructions.
|
|
8
|
+
If you follow those instructions, the `@sdeverywhere/cli` package will be added to your project automatically, and that package uses `@sdeverywhere/compile` as an implementation detail.
|
|
9
|
+
Therefore, most users do not need to install this package directly.
|
|
10
|
+
|
|
11
|
+
## Install
|
|
12
|
+
|
|
13
|
+
As noted above, most users do not need to install this package directly, but for more advanced use cases, it can be installed as follows.
|
|
14
|
+
|
|
15
|
+
```sh
|
|
16
|
+
# npm
|
|
17
|
+
npm install --save-dev @sdeverywhere/compile
|
|
18
|
+
|
|
19
|
+
# pnpm
|
|
20
|
+
pnpm add -D @sdeverywhere/compile
|
|
21
|
+
|
|
22
|
+
# yarn
|
|
23
|
+
yarn add -D @sdeverywhere/compile
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
## Usage
|
|
27
|
+
|
|
28
|
+
Most users do not need to interact with the `@sdeverywhere/compile` package directly; it is primarily used in the implementation of the `@sdeverywhere/cli` package and `sde` command line tool.
|
|
29
|
+
|
|
30
|
+
More usage details will be included here at a later time when the interfaces stabilize.
|
|
5
31
|
|
|
6
32
|
## Documentation
|
|
7
33
|
|
|
8
|
-
|
|
34
|
+
The `compile` package is currently treated as an implementation detail of the `cli` package.
|
|
35
|
+
As such, there is no public API documentation at this time, but we hope to expose a public API once the interfaces stabilize.
|
|
9
36
|
|
|
10
37
|
## License
|
|
11
38
|
|
package/package.json
CHANGED
package/src/_shared/helpers.js
CHANGED
package/src/_shared/read-dat.js
CHANGED
package/src/_shared/subscript.js
CHANGED
package/src/generate/code-gen.js
CHANGED
package/src/model/model.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import path from 'path'
|
|
2
2
|
import B from 'bufx'
|
|
3
|
-
import R from 'ramda'
|
|
3
|
+
import * as R from 'ramda'
|
|
4
4
|
import { splitEquations, replaceDelimitedStrings } from '../_shared/helpers.js'
|
|
5
5
|
|
|
6
6
|
export let preprocessModel = (mdlFilename, spec, profile = 'genc', writeFiles = false, outDecls = []) => {
|