Skip to content

Comments

Repackage#17

Closed
dfcowell wants to merge 2 commits intoDevographics:mainfrom
dfcowell:repackage
Closed

Repackage#17
dfcowell wants to merge 2 commits intoDevographics:mainfrom
dfcowell:repackage

Conversation

@dfcowell
Copy link
Contributor

@dfcowell dfcowell commented Dec 4, 2021

This change adds support for sharing code between packages and composite TS compilation.

A lot has changed in the project structure, but both front and backend can import code from @stateofjs/common (search for that in the project for a toy implementation of a shared module.)

Still pending some documentation updates and unified build config, but each individual package more or less works the same.

@netlify
Copy link

netlify bot commented Dec 4, 2021

❌ Deploy Preview for stateofcss2021 failed.

🔨 Explore the source changes: e0f9815

🔍 Inspect the deploy log: https://app.netlify.com/sites/stateofcss2021/deploys/61ab0bd8796d35000776b9fc

import { initEntities } from './entities'
import { analyzeTwitterFollowings } from './rpcs'
import { clearCache } from './caching'
import { test } from '@stateofjs/common/src/index'
Copy link
Contributor Author

Choose a reason for hiding this comment

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

@SachaG here's an example of the common module import. It can be cleaned up to get rid of the src in the path, but it's more of an effort than I'm ready to invest in right now. If you want to just lift TS modules up into the root /packages/common directory that would be a valid compromise.

@@ -7,6 +7,9 @@ import colors from 'core/theme/colors'
import classNames from 'classnames'
import Hamburger from 'core/components/Hamburger'
import { useI18n } from 'core/i18n/i18nContext'
import { test } from '@stateofjs/common/src/index'
Copy link
Contributor Author

Choose a reason for hiding this comment

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

...and the front-end example.

This change adds support for sharing code between packages and composite
TS compilation.

A lot has changed in the project structure, but both front and backend
can import code from @stateofjs/common (search for that in the project
for a toy implementation of a shared module.)

Still pending some documentation updates, but each individual package
more or less works the same.
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.

1 participant