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

[BUG] extracted ssjs from type script seems to contain script tags for some reason #535

Closed
2 tasks done
JoernBerkefeld opened this issue Nov 8, 2022 · 2 comments · Fixed by #537 or #538
Closed
2 tasks done
Assignees
Labels
bug Something isn't working c/script COMPONENT
Milestone

Comments

@JoernBerkefeld
Copy link
Contributor

Is there an existing issue for this?

  • I have searched the existing issues

Current Behavior

image

Expected Behavior

the assumption is that one has to manually add script tags around your code in the GUI like this:

<script runat="server>
//my code
</script>

mcdev should remove these script tags before saving files with .ssjs ending to enable ESLint to work properly

Steps To Reproduce

  1. Go to '...'
  2. Click on '....'
  3. Run '...'
  4. See error...

Version

4.1.10

Environment

  • OS:
  • Node:
  • npm:

Participation

  • I am willing to submit a pull request for this issue.

Additional comments

No response

@JoernBerkefeld JoernBerkefeld added bug Something isn't working c/script COMPONENT labels Nov 8, 2022
@JoernBerkefeld JoernBerkefeld added this to the 4.1.11 milestone Nov 8, 2022
@JoernBerkefeld
Copy link
Contributor Author

JoernBerkefeld commented Nov 8, 2022

buildTemplate seems to always create SSJS files and not HTML files when there was no <script.../script> found
image

buildTemplate does not seem to remove the surrounding script tags
image

@JoernBerkefeld
Copy link
Contributor Author

same problems as for buildTemplate also apply for buildDefinition
--> we see the same issues in template/ and in deploy/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment