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

Compilation without gulp #205

Closed
ColinEberhardt opened this issue Nov 25, 2019 · 5 comments · Fixed by #449
Closed

Compilation without gulp #205

ColinEberhardt opened this issue Nov 25, 2019 · 5 comments · Fixed by #449
Assignees
Labels
enhancement New feature or request

Comments

@ColinEberhardt
Copy link

All of the NEAR demos use Gulp as part of the build process, however, the gulpfile tends to be pretty much trivial:

e.g. from https://github.com/nearprotocol/near-hello/blob/master/gulpfile.js

const gulp = require("gulp");
const nearUtils = require("near-shell/gulp-utils");

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

const build = gulp.series(build_wasm);

exports.default = build;

In my own projects, I just build via the following 2-line script, which means I don't have any dependency on Gulp (i.e. less stuff to install):

const nearUtils = require("near-shell/gulp-utils");
nearUtils.compile("./assembly/main.ts", "./out/main.wasm", () => {});

Is it worth making this a 'first class' feature of near shell?

Or, perhaps exposing this directly via the CLI ...

$ near compile ./assembly/main.ts -o ./out/main.wasm
@ColinEberhardt
Copy link
Author

Actually - I think the compile function should live in a separate project, with both a JS API (as above) and a CLI interface. Just my 2 cents!

@bowenwang1996
Copy link
Contributor

We use gulp due to legacy reasons -- when assemblyscript does not support package management we have to manually wrangle some path during the compilation process. But yeah good point we should reconsider this @vgrichina

@vgrichina
Copy link
Contributor

Note that it’s expected that real life projects will have far more than 1 contract compiled.

@ColinEberhardt
Copy link
Author

Note that it’s expected that real life projects will have far more than 1 contract compiled.

Good point, although Gulp does look like it is on its way out ;-)

@amgando amgando added the enhancement New feature or request label May 12, 2020
@mikedotexe
Copy link
Contributor

Getting back to this issue. We have removed the gulp dependency. The next step is to get rid of near build and assuming that will run gulp

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants