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

feat: spawn main function as entrypoint in the entrypoint file` #563

Merged
merged 7 commits into from
May 4, 2023

Conversation

leanmendoza
Copy link
Contributor

@leanmendoza leanmendoza commented May 3, 2023

import { engine, GltfContainer, MeshRenderer, Transform } from '@dcl/sdk/ecs'

// Now this is OK
export function main() {
  const cube = engine.addEntity()
  Transform.create(cube)
  MeshRenderer.setBox(cube)
}

// This is OK
engine.addSystem(() => { })

// This is OK
engine.defineComponent('some::component', Schemas.....)

// This always could introduce conflicts, but this is WRONG now, the right mechanism is inside main()
const cube = engine.addEntity()
Transform.create(cube)
MeshRenderer.setBox(cube)

@leanmendoza leanmendoza changed the title feat: spawn main fucntion as entrypoint in the entrypoint file` feat: spawn main function as entrypoint in the entrypoint file` May 3, 2023
@cloudflare-workers-and-pages
Copy link

cloudflare-workers-and-pages bot commented May 3, 2023

Deploying with  Cloudflare Pages  Cloudflare Pages

Latest commit: 390aa95
Status: ✅  Deploy successful!
Preview URL: https://beae4334.js-sdk-toolchain.pages.dev
Branch Preview URL: https://feat-entry-point.js-sdk-toolchain.pages.dev

View logs

@github-actions
Copy link
Contributor

github-actions bot commented May 3, 2023

Test this pull request

  • The @dcl/sdk package can be tested in scenes by running

    npm install "https://sdk-team-cdn.decentraland.org/@dcl/js-sdk-toolchain/branch/feat/entry-point/dcl-sdk-7.1.10-4878402306.commit-08e8bc6.tgz"
  • To test with npx init

    export SDK_COMMANDS="https://sdk-team-cdn.decentraland.org/@dcl/js-sdk-toolchain/branch/feat/entry-point/dcl-sdk-commands-7.1.10-4878402306.commit-08e8bc6.tgz"
    npx $SDK_COMMANDS init
  • The @dcl/inspector package can be tested by visiting this url

    • Or by installing it via NPM
    npm install "https://sdk-team-cdn.decentraland.org/@dcl/js-sdk-toolchain/branch/feat/entry-point/@dcl/inspector/dcl-inspector-7.1.10-4878402306.commit-08e8bc6.tgz"
  • The /changerealm command to test test in-world

    /changerealm https://sdk-team-cdn.decentraland.org/ipfs/feat/entry-point-e2e
    
  • You can preview this build entering:
    https://playground.decentraland.org/?sdk-branch=feat/entry-point

@codecov
Copy link

codecov bot commented May 3, 2023

Codecov Report

Patch coverage: 94.73% and project coverage change: -0.03 ⚠️

Comparison is base (8b4e6e0) 69.75% compared to head (390aa95) 69.73%.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #563      +/-   ##
==========================================
- Coverage   69.75%   69.73%   -0.03%     
==========================================
  Files         236      236              
  Lines        8219     8213       -6     
  Branches     1038     1036       -2     
==========================================
- Hits         5733     5727       -6     
  Misses       2378     2378              
  Partials      108      108              
Impacted Files Coverage Δ
packages/@dcl/sdk-commands/src/logic/bundle.ts 90.00% <94.44%> (-0.63%) ⬇️
...ages/@dcl/sdk-commands/src/commands/build/index.ts 100.00% <100.00%> (ø)

☔ View full report in Codecov by Sentry.
📢 Do you have feedback about the report comment? Let us know in this issue.

@leanmendoza leanmendoza merged commit 7a39b8e into main May 4, 2023
@leanmendoza leanmendoza deleted the feat/entry-point branch May 4, 2023 14:32
leanmendoza added a commit that referenced this pull request May 4, 2023
menduz pushed a commit that referenced this pull request May 4, 2023
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.

3 participants