-
Notifications
You must be signed in to change notification settings - Fork 2
/
gulpfile.js
30 lines (24 loc) · 954 Bytes
/
gulpfile.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
const gulp = require("gulp");
const nearUtils = require("near-shell/gulp-utils");
gulp.task("build:model", callback => {
nearUtils.generateBindings("model.ts", "../out/model.near.ts", callback);
});
gulp.task("build:bindings", ["build:model"], callback => {
nearUtils.generateBindings("main.ts", "../out/main.near.ts", callback);
});
gulp.task("build", ["build:bindings"], callback => {
nearUtils.compile("../out/main.near.ts", "../out/main.wasm", callback);
});
gulp.task("default", ["build"]);
// TODO: Extract all following boilerplate into library
// This task is not required when running the project locally. Its purpose is to set up the
// AssemblyScript compiler when a new project has been loaded in WebAssembly Studio.
gulp.task("project:load", () => {
const utils = require("@wasm/studio-utils");
utils.eval(utils.project.getFile("setup.js").getData(), {
logLn,
project,
monaco,
fileTypeForExtension,
});
});