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: export sapphire package version #181

Merged
merged 4 commits into from
Mar 2, 2021

Conversation

leonardssh
Copy link
Contributor

No description provided.

Copy link
Member

@favna favna left a comment

Choose a reason for hiding this comment

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

This doesn't work because changing the rootDir causes the output to have /dist/src instead of just all the files from src

image

There are ways to inject the data at build time through Rollup, so if you want this feature then please look into such an option and validate the output bundle with the prepublishOnly script as opposed to build. Note that you'll have to run Rollup twice, once to replace the value, once to bundle the types as happens now.

@@ -43,3 +43,5 @@ export * from './lib/utils/preconditions/containers/PermissionsPrecondition';
export * from './lib/utils/preconditions/IPreconditionContainer';
export * from './lib/utils/preconditions/PreconditionContainerArray';
export * from './lib/utils/preconditions/PreconditionContainerSingle';

export const version = '[VI]{version}[/VI]';
Copy link
Member

@favna favna Mar 2, 2021

Choose a reason for hiding this comment

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

After prepublishOnly script this is replaced with the following in dist/index.js:

exports.version = '1.0.0-alpha.11';

favna
favna previously approved these changes Mar 2, 2021
@kyranet kyranet merged commit 6df4be0 into sapphiredev:main Mar 2, 2021
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.

4 participants