Skip to content
This repository has been archived by the owner on Oct 4, 2024. It is now read-only.

Commit

Permalink
Updated gulp files
Browse files Browse the repository at this point in the history
  • Loading branch information
Willem Wyndham committed Aug 9, 2019
1 parent df0c3ff commit e5608a5
Show file tree
Hide file tree
Showing 9 changed files with 25 additions and 16,258 deletions.
6 changes: 4 additions & 2 deletions blank_project/assembly/main.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
import { Greeter } from "../out/model.near";
//@nearfile
import { near, context, storage } from "near-runtime-ts";
import { Greeter } from "./model";

// --- contract code goes below

Expand All @@ -15,7 +17,7 @@ export function sayHi(): void {
// Logs are not persistently stored on the blockchain, but produced by the blockchain runtime.
// It's helpful to use logs for debugging your functions or when you need to get some info
// from the change methods (since change methods don't return values to the front-end).
near.log(sender + " says \"Hi!\"");
near.log(sender + " says \"Hello mate!\"");
// storage is a helper class that allows contracts to modify the persistent state
// and read from it. setString allows you to persitently store a string value for a given string key.
// We'll store the last sender of this contract who called this method.
Expand Down
1 change: 1 addition & 0 deletions blank_project/assembly/model.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
//@nearfile
// Basic data model
export class Greeter {
text: string;
Expand Down
13 changes: 2 additions & 11 deletions blank_project/gulpfile.js
Original file line number Diff line number Diff line change
@@ -1,20 +1,11 @@
const gulp = require("gulp");
const nearUtils = require("near-shell/gulp-utils");


function build_bindings(done){
nearUtils.generateBindings("main.ts", "../out/main.near.ts", done);
}

function build_model(done){
nearUtils.generateBindings("model.ts", "../out/model.near.ts", done);
}

function build_wasm(done){
nearUtils.compile("../out/main.near.ts", "../out/main.wasm", done);
nearUtils.compile("./assembly/main.ts", "./out/main.wasm", done);
};

const build = gulp.series(build_model, build_bindings, build_wasm);
const build = gulp.series(build_wasm);


exports.default = build;
Loading

0 comments on commit e5608a5

Please sign in to comment.