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

Support GH pages, build with gulp #24

Merged
merged 11 commits into from
Apr 10, 2019
Merged

Support GH pages, build with gulp #24

merged 11 commits into from
Apr 10, 2019

Conversation

vgrichina
Copy link
Contributor

@vgrichina vgrichina commented Apr 3, 2019

Main selling point is that npm run deploy build and deploys everything.

@vgrichina vgrichina marked this pull request as ready for review April 4, 2019 01:12
@evgenykuzyakov
Copy link

Is there are a better option than a hard copy for assembly-json and near-runtime-ts files?

@vgrichina
Copy link
Contributor Author

@evgenykuzyakov waiting for AssemblyScript/assemblyscript#448 to land.

Probably can also hack it myself on a level of overriding readFile (similar to how can now read modules from out/ folder without copy necessary).

@evgenykuzyakov
Copy link

I'm fine with copying from blank_project. I just don't want us to have a copy in this repo.

"deploy": "npm run build && npm run deploy:contract && npm run deploy:pages",
"prestart": "npm run build && npm run deploy:contract",
"start": "python3 -mhttp.server --directory src",
"test": "npm run build && jest test --env=near-shell/local_test_environment",
Copy link
Contributor

@janedegtiareva janedegtiareva Apr 5, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: I liked the test environment better under src, to not pollute the top level dir

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@janedegtiareva it's used from near-shell node module (i.e. it's not present in project template at all anymore).

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's a good file to have in the project template to allow devs to modify the default behaviour.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ah, I see, there is some app-specific stuff

It looks like files are largely identical though, except nodeUrl. So I think probably best would be to load this stuff from env-specific config and then have common test env use project-specific config.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some sort of base makes sense

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Leaving as is for this PR, gonna clean-up as part of #21

@janedegtiareva
Copy link
Contributor

@evgenykuzyakov waiting for AssemblyScript/assemblyscript#448 to land.

Probably can also hack it myself on a level of overriding readFile (similar to how can now read modules from out/ folder without copy necessary).

The near build command handled this without hardcoding. Can we at least use that solution?

@vgrichina
Copy link
Contributor Author

@evgenykuzyakov waiting for AssemblyScript/assemblyscript#448 to land.
Probably can also hack it myself on a level of overriding readFile (similar to how can now read modules from out/ folder without copy necessary).

The near build command handled this without hardcoding. Can we at least use that solution?

It's not compatible with NEARStudio. Not sure what do you mean by "near build command handled this without hardcoding". Wasn't it merely copying files from hard-coded locations?

	  await copyFileFn("./node_modules/near-runtime-ts/near.ts", yargs.argv.out_dir + "/near.ts");
	  await ensureDir(yargs.argv.out_dir + "/json");
	  await copyFileFn("./node_modules/assemblyscript-json/assembly/encoder.ts", yargs.argv.out_dir + "/json/encoder.ts");
	  await copyFileFn("./node_modules/assemblyscript-json/assembly/decoder.ts", yargs.argv.out_dir + "/json/decoder.ts");	

It's pretty trivial to add this hardcoded mapping on readFile handler level as well, just not clear where to take these files in Studio (cause there is no solution yet to load modules from package.json into studio).

@vgrichina
Copy link
Contributor Author

GitLab failure gonna be resolved after merge (cause build depends on stuff not merged yet).

@vgrichina vgrichina merged commit b11dd37 into master Apr 10, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants