This repository has been archived by the owner on Oct 4, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 94
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
change calls to use positional arguments over flags
- Loading branch information
Showing
7 changed files
with
59 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,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, | ||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,22 @@ | ||
#!/bin/sh | ||
set -ex | ||
rm -rf tmp-project | ||
# remove temporary blank project | ||
rm -rf test/tmp-project | ||
cd test/ | ||
# test generating new project in cwd | ||
mkdir tmp-project | ||
cd tmp-project | ||
../bin/near new_project | ||
../../bin/near new_project | ||
npm install | ||
npm uninstall near-shell | ||
npm install ../ | ||
npm install ../../ | ||
NODE_ENV=development npm run test | ||
cd .. | ||
rm -rf tmp-project | ||
# test generating new project in new dir | ||
../bin/near new_project 'tmp-project' | ||
cd tmp-project | ||
npm install | ||
npm uninstall near-shell | ||
npm install ../../ | ||
NODE_ENV=development npm run test |