Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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 join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants