-
-
Notifications
You must be signed in to change notification settings - Fork 51
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #309 from modernweb-dev/next
feat: introduce @rocket/engine and use it
- Loading branch information
Showing
1,562 changed files
with
45,411 additions
and
16,736 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
'@mdjs/core': patch | ||
--- | ||
|
||
Update `es-module-lexer` version. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
--- | ||
'@mdjs/mdjs-preview': patch | ||
'@mdjs/mdjs-story': patch | ||
--- | ||
|
||
Update lit version & add a server template for `@rocket/[email protected]+`. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
--- | ||
'@rocket/launch': minor | ||
'@rocket/search': minor | ||
--- | ||
|
||
BREAKING CHANGE: New version built for @rocket/engine and @rocket/cli 0.20+ | ||
|
||
For more information see the [migration guide](https://github.com/modernweb-dev/rocket/blob/next/packages/cli/MIGRATION.md). |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
'@rocket/components': minor | ||
--- | ||
|
||
Initial public beta version with multiple server renderable components based on [lit](https://lit.dev). |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
--- | ||
'@rocket/cli': minor | ||
--- | ||
|
||
BREAKING CHANGE: Complete rewrite introducing `@rocket/engine` | ||
Introduces class based templates, server side rendering of web components and a file based routing. | ||
|
||
For more information see the [migration guide](https://github.com/modernweb-dev/rocket/blob/next/packages/cli/MIGRATION.md). | ||
|
||
The [legacy documentation](https://legacy.rocket.modern-web.dev/) is still available. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
--- | ||
'@rocket/engine': minor | ||
'@rocket/create': minor | ||
--- | ||
|
||
Initial public beta version. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
'@rocket/spark': minor | ||
--- | ||
|
||
Initial public beta version for `@rocket/cli` 0.20+ |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
v14 | ||
v16 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
{ | ||
// See http://go.microsoft.com/fwlink/?LinkId=827846 | ||
// for the documentation about the extensions.json format | ||
"recommendations": [ | ||
"dbaeumer.vscode-eslint" | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
// A launch configuration that compiles the extension and then opens it inside a new window | ||
// Use IntelliSense to learn about possible attributes. | ||
// Hover to view descriptions of existing attributes. | ||
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 | ||
{ | ||
"version": "0.2.0", | ||
"configurations": [ | ||
{ | ||
"name": "Run Web Dev Server Extension", | ||
"type": "extensionHost", | ||
"request": "launch", | ||
"args": [ | ||
"--extensionDevelopmentPath=${workspaceFolder}/packages/vscode-rocket" | ||
], | ||
"outFiles": [ | ||
"${workspaceFolder}/packages/vscode-rocket/out/**/*.js" | ||
], | ||
"preLaunchTask": "Compile vscode-rocket" | ||
}, | ||
{ | ||
"name": "Extension Tests", | ||
"type": "extensionHost", | ||
"request": "launch", | ||
"args": [ | ||
"--extensionDevelopmentPath=${workspaceFolder}", | ||
"--extensionTestsPath=${workspaceFolder}/out/test/suite/index" | ||
], | ||
"outFiles": [ | ||
"${workspaceFolder}/out/test/**/*.js" | ||
], | ||
"preLaunchTask": "${defaultBuildTask}" | ||
} | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
{ | ||
"gitdoc.enabled": false, | ||
"typescript.tsdk": "node_modules/typescript/lib", | ||
"files.exclude": { | ||
"**/*-mdjs-generated.js": false, | ||
}, | ||
"search.exclude": { | ||
"**/*-mdjs-generated.js": true, | ||
"**/dist-types": true, | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
// See https://go.microsoft.com/fwlink/?LinkId=733558 | ||
// for the documentation about the tasks.json format | ||
{ | ||
"version": "2.0.0", | ||
"tasks": [ | ||
{ | ||
"type": "npm", | ||
"script": "watch", | ||
"problemMatcher": "$tsc-watch", | ||
"isBackground": true, | ||
"presentation": { | ||
"reveal": "never" | ||
}, | ||
"group": { | ||
"kind": "build", | ||
"isDefault": true | ||
} | ||
}, | ||
{ | ||
"label": "Compile vscode-rocket", | ||
"type": "npm", | ||
"script": "compile", | ||
"path": "packages/vscode-rocket/", | ||
"group": "build", | ||
"problemMatcher": [], | ||
"detail": "tsc -p ./" | ||
} | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
## TODO | ||
|
||
- 404 page background images are not being loaded | ||
- sitemap.xml not deployed on netlify | ||
|
||
## Features | ||
|
||
- recursive rendering of lit / html / and markdown | ||
- "import" markdown with frontmatter | ||
- mdjs update to unified v10 AND go esm only (only cjs pkg we have now) | ||
|
||
## Nice to have | ||
|
||
- Add "menuExclude" => to actually exclude the menu item | ||
|
||
## Bugs | ||
|
||
- write to `_site-dev` instead of `_site` while using `rocket start` | ||
- nested `recursive.data.js` do not overwrite the parent data | ||
- support <!-- asdf --> in markdown | ||
|
||
## Error Handling | ||
|
||
- make error nice for parent page not found in index => auto generate page? 🤔 | ||
|
||
## Examples | ||
|
||
- docs site, blog (simple), blog (complex), minimal | ||
- add stackblitz/codesandbox examples => does not work because of `@parcel/watcher` https://github.com/parcel-bundler/watcher/issues/99 | ||
|
||
- Example: export variable and use it in rendering | ||
- Example: fetch data from an api and display it | ||
- Example: usage of image | ||
|
||
## later | ||
|
||
- support `@change` in markdown | ||
- support "hey ${foo.map(f => `${f} + 1`)}" | ||
- ENGINE: Rename "options.docsDir" to "options.inputDir" | ||
|
||
## consider | ||
|
||
- Replace magic "resolve:pkg/foo.css" with a directive `${resolve()}`? |
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
import { rocketLaunch } from '@rocket/launch'; | ||
import { rocketSpark } from '@rocket/spark'; | ||
import { presetRocketSearch } from '@rocket/search'; | ||
|
||
/** | ||
* Extracts the current applicable absoluteBaseUrl from Netlify system variables | ||
* | ||
* @param {string} fallback | ||
*/ | ||
export function absoluteBaseUrlNetlify(fallback) { | ||
let absoluteBaseUrl = fallback; | ||
|
||
switch (process.env.CONTEXT) { | ||
case 'production': | ||
absoluteBaseUrl = process.env.URL ?? ''; | ||
break; | ||
case 'deploy-preview': | ||
absoluteBaseUrl = process.env.DEPLOY_URL ?? ''; | ||
break; | ||
case 'branch-deploy': | ||
absoluteBaseUrl = process.env.DEPLOY_PRIME_URL ?? ''; | ||
break; | ||
/* no default */ | ||
} | ||
return absoluteBaseUrl; | ||
} | ||
|
||
export default /** @type {import('@rocket/cli/types/main').RocketCliOptions} */ ({ | ||
absoluteBaseUrl: absoluteBaseUrlNetlify('http://localhost:8080'), | ||
longFileHeaderWidth: 100, | ||
longFileHeaderComment: '// prettier-ignore', | ||
// adjustDevServerOptions: (options) => ({ | ||
// ...options, | ||
// nodeResolve: { | ||
// ...options.nodeResolve, | ||
// exportConditions: ['development'], | ||
// }, | ||
// }), | ||
|
||
// buildOpenGraphImages: false, | ||
|
||
presets: [rocketLaunch(), rocketSpark(), presetRocketSearch()], | ||
// serviceWorkerName: 'sw.js', | ||
// pathPrefix: '/_site/', | ||
|
||
// clearOutputDir: false, | ||
}); |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.