@taqueria/plugin-ligo 0.37.21 → 0.37.34
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/common.ts +3 -2
- package/compile-all.ts +15 -111
- package/compile.ts +413 -174
- package/createContract.ts +1 -5
- package/index.js +396 -329
- package/index.js.map +1 -1
- package/index.mjs +407 -333
- package/index.mjs.map +1 -1
- package/index.ts +7 -0
- package/ligo.ts +1 -1
- package/ligo_templates.ts +17 -94
- package/package.json +3 -3
- package/postinstall.js +19 -0
package/createContract.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { sendAsyncErr } from '@taqueria/node-sdk';
|
|
2
2
|
import { RequestArgs } from '@taqueria/node-sdk';
|
|
3
3
|
import { writeFile } from 'fs/promises';
|
|
4
|
-
import { jsligo_template, mligo_template
|
|
4
|
+
import { jsligo_template, mligo_template } from './ligo_templates';
|
|
5
5
|
|
|
6
6
|
interface Opts extends RequestArgs.t {
|
|
7
7
|
sourceFileName?: string;
|
|
@@ -13,14 +13,10 @@ const getLigoTemplate = async (contractName: string, syntax: string | undefined)
|
|
|
13
13
|
const ext = matchResult ? matchResult[0].substring(1) : null;
|
|
14
14
|
|
|
15
15
|
if (syntax === 'mligo') return mligo_template;
|
|
16
|
-
if (syntax === 'ligo') return pascaligo_template;
|
|
17
|
-
if (syntax === 'religo') return religo_template;
|
|
18
16
|
if (syntax === 'jsligo') return jsligo_template;
|
|
19
17
|
|
|
20
18
|
if (syntax === undefined) {
|
|
21
19
|
if (ext === 'mligo') return mligo_template;
|
|
22
|
-
if (ext === 'ligo') return pascaligo_template;
|
|
23
|
-
if (ext === 'religo') return religo_template;
|
|
24
20
|
if (ext === 'jsligo') return jsligo_template;
|
|
25
21
|
return sendAsyncErr(
|
|
26
22
|
`Unable to infer LIGO syntax from "${contractName}". Please specify a LIGO syntax via the --syntax option`,
|