Skip to content
This repository was archived by the owner on Apr 13, 2025. It is now read-only.

Simplify importing of core #163

Merged
merged 2 commits into from
Jan 21, 2021
Merged

Simplify importing of core #163

merged 2 commits into from
Jan 21, 2021

Conversation

hlxid
Copy link
Member

@hlxid hlxid commented Jan 8, 2021

Adds a index.ts to core that re-exports everything important. That way services and bundles can import everything they need by just doing this:

import { ... } from "nodecg-io-core";

Previously bundle/service developers would need to know in which file is which class and provide the full path.
Everything obviously still can be imported by using the full path but if anything is moved this doesn't need fixing of the paths and therefore is prefered.

This is a follow up on #131 which simplified importing of services.

Docs update PR: codeoverflow-org/nodecg-io-docs#42

Adds a `index.ts` to core that re-exports everything important. That way services and bundles can import everything they need by just doing this:
```typescript
import { ... } from "nodecg-io-core";
```

Previously bundle/service developers would need to know in which file is which class and provide the full path.
Everything obviously still can be imported by using the full path but if anything is moved this doesn't need fixing of the paths and therefore is prefered.

This is a follow up on #131 which simplified importing of services.
@hlxid hlxid self-assigned this Jan 8, 2021
hlxid added a commit to codeoverflow-org/nodecg-io-docs that referenced this pull request Jan 8, 2021
@derNiklaas
Copy link
Contributor

IMO this should also be changed for every package/subproject.

@hlxid
Copy link
Member Author

hlxid commented Jan 9, 2021

You mean in packages that are using nodecg-io e.g. skates-bundles or your private bundles? Yeah would propably be better.

@hlxid hlxid merged commit c1d1cf8 into master Jan 21, 2021
@hlxid hlxid deleted the feature/core-easier-import branch January 21, 2021 11:02
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants