Comments (8)
@octref Agree in the separation. The coupling I was thinking about to trigger version/publication via a workflow event after grammar/theme updates.
Although I'm wondering about the right balance for auto-publication. I mean, even with only a weekly one it could be like 52 patch versions/year on the main package. Or maybe the way would be to separate grammars/themes into a dedicated package.
from shiki.
I'd say I'll get as a first step a PR up for issue creation in case of grammar/theme update issues.
And we'll discuss with v1 on nightlies. Now that there are breaking changes on the table it's way easier to draw ideas. ;-)
My thinking re: packages was conceptually like this.
{
"name": "@shiki/core",
"version": "1.0.0",
"dependencies": {
"@shiki/themes": "^1.0.0",
"@shiki/grammars": "^1.0.0"
}
}
That way theme/grammar could have nightly packages, and "core" would not need them.
And taking it further... implementing the package configs via the project config. Which could then also be a standard way for people to add their own customizations.
{
"name": "@muenzpraeger/my-custom-shiki-theme",
"version": "0.2.1",
"shiki": {
"themes": {
"my-custom-theme": "./my-custom-theme.json"
}
}
}
Just a thought. ;-)
from shiki.
Sure
from shiki.
is there a nightly shiki build on npm? npm info shiki
does not seem to show it.
from shiki.
@orta @octref Any thoughts if I take a stab on the GitHub actions to make this happen?
Current behavior:
- Isolated, scheduled job to update grammars
- fails hard when grammar is not available (no updates for subsequent grammars)
- doesn't update semver patch for shiki
- Isolated, scheduled job to update themes
- fails hard when theme is not available (no updates for subsequent themes)
- doesn't update semver patch for shiki
- Isolated, on commit-to-main job to publish to npm
- doesn't do anything for/with the scheduled grammar/theme updates as no semver update
Proposed behavior:
- Couple (or combine) workflows for grammars and themes
- Don't fail hard, instead auto-create issue for failed theme or grammar (easier tracking, no impact on other grammars/themes)
- Increase patch version of shiki if changes exist
- Commit changes
- Create GitHub release with change history
- This could eventually replace the current Changelog, to reduce future manual maintenance
- Publish to npm
from shiki.
@muenzpraeger Looks great
from shiki.
I don't know about another package though – I still believe people should download one package and be able to start using it. However, one structure this could take is:
- Have a theme/language nightly package, that you can use with the
shiki
main package - Have a workflow that send PR to merge latest theme/language into the main
shiki
package
from shiki.
Yeah, similar to what I'm thinking. @shiki/themes
should export a list of themes, and people can duck theme.
from shiki.
Related Issues (20)
- Config autocompletion of `theme` field HOT 1
- Add Windows Registry (.reg) support HOT 2
- Shiki Security Policy HOT 1
- Global `fetch` type is getting modified by shiki HOT 6
- Problems with errors reported during operation after installation HOT 10
- NPM package needs to be republished? HOT 1
- The div.language-id element is not rendering when calling `codeToHtml` HOT 1
- Error: with Next.js app HOT 6
- Theme request: New default VS Code 'modern' themes HOT 2
- Add human-readable name to the `BUNDLED_LANGUAGES` HOT 2
- Remove the default loading of `nord` theme when `getHighlighter` HOT 3
- Cannot read properties of undefined (reading 'VSCODE_TEXTMATE_DEBUG') HOT 3
- Is it possible to disable italic? HOT 1
- Unzipped files are corrupt HOT 1
- All languages are loaded when langs is anything but empty? HOT 2
- Problem with GraphQL Syntax Highlighting HOT 1
- Optimizing Language Loading HOT 1
- Support injectInto in downloadFromMarketplace HOT 1
- Languages provided to the `highlighter.codeToHtml()` function are case-sensitive HOT 1
- Update the 0.14.2 package release to pick up new grammars? HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from shiki.