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

[nearshell] build works on standard files #3

Merged
merged 3 commits into from
Mar 5, 2019
Merged

Conversation

janedegtiareva
Copy link
Contributor

No description provided.

Copy link
Contributor

@vgrichina vgrichina left a comment

Choose a reason for hiding this comment

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

This should work fine. However right now typical build process would be like:

Compile:
npm -> near -> gulp -> asc (compile)

Deploy:
npm -> near (deploy)

I think it instead should be:

Compile:
npm -> gulp -> near as a lib -> asc

Deploy:
npm -> gulp -> near (deploy)

I think this will make our CLI tools even better cause:

  • gulp is a versatile tool which can be used for a lot of other app build tasks, web dev folks know it
  • people should be able to replace gulp easily as not everyone wants to use it. This is much easier when near doesn't call gulp.

@@ -75,6 +86,17 @@ async function deployContractAndWaitForTransaction(accountId, contractName, data
return waitResult;
}

// converts file.ts to file.near.ts
function generateNearFileName(fileName) {
Copy link
Contributor

Choose a reason for hiding this comment

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

fileName.replace(/.ts$/, '.near.ts')

Copy link
Contributor

Choose a reason for hiding this comment

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

or if you want to be pedantic about path handling, it's in node's std: https://nodejs.org/api/path.html#path_path_basename_path_ext

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

2 participants