-
-
Notifications
You must be signed in to change notification settings - Fork 889
Fork razzle into @plone/razzle
#7542
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
Merged
Merged
Changes from 28 commits
Commits
Show all changes
34 commits
Select commit
Hold shift + click to select a range
388dc7c
Add package @volto/razzle
wesleybl 0e366fd
Fix prettier and eslint
wesleybl 576b847
Add release-it with towncrier
wesleybl 5d3b767
Fix links in README.md
wesleybl 6e7179c
Remove links that don't work
wesleybl 7254227
Fix npm version badge in README.md
wesleybl dc9af96
Add newline for better readability in README.md
wesleybl 7fc377f
Change
wesleybl 52bc1a7
Add upgrade note
wesleybl 5eaa043
typo
wesleybl 3f2c0bc
Code review
wesleybl c521c27
Update README.md to include context for Razzle fork
wesleybl 0ab9358
Remove note about changing `razzle` to `@volto/razzle` in package.json.
wesleybl 0e466ed
Code review
wesleybl af9b3e5
Fix links rendirects in README.md
wesleybl d19bd1a
Fix links rendirects in README.md
wesleybl 6c1aadd
Code review
wesleybl abe0f13
Update RR7 docs link in README
stevepiercy 2626580
Remove the installation step for the @volto/razzle dependency
wesleybl 39c904c
Merge branch 'main' into volto-razzle
wesleybl 6144c1e
Update pnpm-lock.yaml
wesleybl 0f5b631
Code review
wesleybl c6d2b80
Add mini-css-extract-plugin@2.7.2 as peerDependencie
wesleybl 3cfe9b8
Remove mini-css-extract-plugin from peerDependencies
wesleybl 4873f2f
Merge branch 'main' into volto-razzle
wesleybl b44e791
Add mini-css-extract-plugin@2.7.2 as peerDependencie
wesleybl 090b785
Merge branch 'main' into volto-razzle
sneridagh 72e3a01
Update docs/source/upgrade-guide/index.md
sneridagh c2f528d
Update docs/source/upgrade-guide/index.md
wesleybl b5d9295
Update docs/source/upgrade-guide/index.md
wesleybl b5d3fec
Merge branch 'main' into volto-razzle
sneridagh 5f56632
Rename package to @plone/razzle
sneridagh 13e5a47
Fork `babel-razzle-preset` into `@plone/babel-razzle-preset` (#7619)
sneridagh 81f24c2
Remove Jest (#7624)
Abhishek-17h File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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 hidden or 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 hidden or 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 @@ | ||
| { | ||
| "plugins": { | ||
| "../scripts/prepublish.js": {} | ||
| }, | ||
| "hooks": { | ||
| "after:bump": [ | ||
| "pipx run towncrier build --draft --yes --version ${version} > .changelog.draft", | ||
| "pipx run towncrier build --yes --version ${version}" | ||
| ], | ||
| "after:release": "rm .changelog.draft" | ||
| }, | ||
| "npm": { | ||
| "publish": false | ||
| }, | ||
| "git": { | ||
| "commitArgs": ["--no-verify"], | ||
| "changelog": "pipx run towncrier build --draft --yes --version 0.0.0", | ||
| "requireUpstream": false, | ||
| "requireCleanWorkingDir": false, | ||
| "commitMessage": "Release @volto/razzle ${version}", | ||
| "tagName": "plone-slate-${version}", | ||
| "tagAnnotation": "Release @volto/razzle ${version}" | ||
| }, | ||
| "github": { | ||
| "release": true, | ||
| "releaseName": "@volto/razzle ${version}", | ||
| "releaseNotes": "cat .changelog.draft" | ||
| } | ||
| } |
sneridagh marked this conversation as resolved.
Show resolved
Hide resolved
|
This file contains hidden or 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,9 @@ | ||
| # @volto/razzle Release Notes | ||
|
|
||
| <!-- Do *NOT* add new change log entries to this file. | ||
| Instead create a file in the news directory. | ||
| For helpful instructions, see: | ||
| https://6.docs.plone.org/contributing/index.html#change-log-entry | ||
| --> | ||
|
|
||
| <!-- towncrier release notes start --> |
This file contains hidden or 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,74 @@ | ||
| > [!IMPORTANT] | ||
| > This package is a maintained fork of the original [Razzle](https://github.com/jaredpalmer/razzle). | ||
| > The upstream project is currently unmaintained, so we forked it into the Volto monorepo to keep its dependencies updated and address security issues. | ||
| > All upstream attributions are preserved below. | ||
|
|
||
|  | ||
stevepiercy marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
|
||
| [](https://www.npmjs.com/package/@volto/razzle) [](https://www.npmjs.com/package/@volto/razzle) | ||
|
|
||
| Universal JavaScript applications are tough to setup. Either you buy into a framework like Next.js or Nuxt, fork a boilerplate, or set things up yourself. Aiming to fill this void, Razzle is a tool that abstracts all the complex configuration needed for building SPA's and SSR applications into a single dependency--giving you the awesome developer experience of [create-react-app](https://github.com/facebook/create-react-app), but then leaving the rest of your app's architectural decisions about frameworks, routing, and data fetching up to you. With this approach, Razzle not only works with React, but also Preact, Vue, Svelte, and Angular, and most importantly......whatever comes next. | ||
|
|
||
| ## Getting Started | ||
|
|
||
| Visit <a aria-label="razzle getting started" href="https://razzlejs.org/getting-started">https://razzlejs.org/getting-started</a> to get started with Razzle. | ||
|
|
||
| ## Examples | ||
|
|
||
| Razzle has many examples, we might have one that fits your needs | ||
|
|
||
| See: [The examples](https://github.com/jaredpalmer/razzle/tree/master/examples) | ||
|
|
||
| ## Documentation | ||
|
|
||
| Visit <a aria-label="razzle docs" href="https://razzlejs.org/">https://razzlejs.org/</a> to view the documentation. | ||
|
|
||
| ## Contributing | ||
|
|
||
| Please see our [CONTRIBUTING.md](../../CONTRIBUTING.md). | ||
stevepiercy marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
|
||
| ## Inspiration | ||
|
|
||
| - [jaredpalmer/backpack](https://github.com/jaredpalmer/backpack) | ||
| - [nytimes/kyt](https://github.com/nytimes/kyt) | ||
| - [facebookincubator/create-react-app](https://github.com/facebook/create-react-app) | ||
| - [ndreckshage/sambell](https://github.com/ndreckshage/sambell) | ||
| - [vercel/next.js](https://github.com/vercel/next.js) | ||
|
|
||
| ### Author | ||
|
|
||
| - [Jared Palmer](https://twitter.com/jaredpalmer) | ||
|
|
||
| ## Contributors | ||
|
|
||
| Thanks goes to these wonderful people ([emoji key](https://github.com/all-contributors/all-contributors.github.io#emoji-key)): | ||
|
|
||
| <!-- START contributors generated instructions please keep comment here to allow auto update --> | ||
| <!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN yarn build-docs TO UPDATE --> | ||
| - **Jared Palmer** - [@jaredpalmer](https://jaredpalmer.com) | ||
| - **Contributions:** question, code, design, doc, example, ideas, review, test, tool | ||
| - **Nima Arefi** - [@Nimaa77](https://github.com/Nimaa77) | ||
| - **Contributions:** question, code, doc, example, ideas, review, test, tool | ||
| - **Øyvind Saltvik** - [@fivethreeo](https://github.com/fivethreeo/) | ||
| - **Contributions:** question, code, example, ideas, review, test, tool | ||
| - **Jari Zwarts** - [@jariz](https://jari.io) | ||
| - **Contributions:** question, code, ideas, plugin, review | ||
| - **Dan Abramov** - [@gaearon](http://twitter.com/dan_abramov) | ||
| - **Contributions:** code, ideas | ||
| - **Eric Clemmons** | ||
| - **Contributions:** code, ideas | ||
| - **Zino Hofmann** - [@HofmannZ](https://www.linkedin.com/in/zinohofmann/) | ||
| - **Contributions:** example | ||
| - **Lucas Terra** - [@lucasterra](https://www.linkedin.com/in/lucasterra7/) | ||
| - **Contributions:** code, example, plugin | ||
| - **Ray Andrew** | ||
| - **Contributions:** code, example, plugin | ||
| - **Heithem Moumni** - [@heithemmoumni](https://www.linkedin.com/in/heithemmoumni/) | ||
| - **Contributions:** code, example, plugin | ||
| <!-- END contributors generated instructions please keep comment here to allow auto update --> | ||
|
|
||
| This project follows the [all-contributors](https://github.com/all-contributors/all-contributors.github.io) specification. Contributions of any kind welcome! | ||
|
|
||
| --- | ||
|
|
||
| MIT License | ||
This file contains hidden or 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 @@ | ||
| module.exports = require('babel-preset-razzle'); |
This file contains hidden or 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,81 @@ | ||
| #!/usr/bin/env node | ||
| 'use strict'; | ||
|
|
||
| const sade = require('sade'); | ||
| const spawn = require('react-dev-utils/crossSpawn'); | ||
| const pkg = require('../package.json'); | ||
| const prog = sade('razzle'); | ||
| prog.version(pkg.version); | ||
|
|
||
| const argv = process.argv.slice(3); | ||
|
|
||
| prog | ||
| .command('build') | ||
| .describe('Build the application') | ||
| .option( | ||
| '-t, --type', | ||
| 'Change the application build type. Must be either `iso` or `spa`.', | ||
| 'iso', | ||
| ) | ||
| .action(() => { | ||
| runCommand('build', [], argv); | ||
| }); | ||
|
|
||
| prog | ||
| .command('start') | ||
| .describe('Start the application in development mode.') | ||
| .option( | ||
| '-t, --type', | ||
| 'Change the application build type. Must be either `iso` or `spa`.', | ||
| 'iso', | ||
| ) | ||
| .action(() => { | ||
| runCommand('start', [], argv); | ||
| }); | ||
|
|
||
| prog | ||
| .command('export') | ||
| .describe('Export a static version of the application in production mode.') | ||
| .action(() => { | ||
| runCommand('export', [], argv); | ||
| }); | ||
|
|
||
| prog | ||
| .command('test') | ||
| .describe('Runs the test watcher in an interactive mode.') | ||
| .action(() => { | ||
| runCommand( | ||
| 'test', | ||
| argv.filter((x) => x.includes('--inspect')), | ||
| argv.filter((x) => !x.includes('--inspect')), | ||
| ); | ||
| }); | ||
|
|
||
| function runCommand(script, node_args, script_args) { | ||
| const result = spawn.sync( | ||
| 'node', | ||
| node_args | ||
| .concat([require.resolve('../scripts/' + script)]) | ||
| .concat(script_args), | ||
| { stdio: 'inherit' }, | ||
| ); | ||
| if (result.signal) { | ||
| if (result.signal === 'SIGKILL') { | ||
| console.log( | ||
| 'The build failed because the process exited too early. ' + | ||
| 'This probably means the system ran out of memory or someone called ' + | ||
| '`kill -9` on the process.', | ||
| ); | ||
| } else if (result.signal === 'SIGTERM') { | ||
| console.log( | ||
| 'The build failed because the process exited too early. ' + | ||
| 'Someone might have called `kill` or `killall`, or the system could ' + | ||
| 'be shutting down.', | ||
| ); | ||
| } | ||
| process.exit(1); | ||
| } | ||
| process.exit(result.status); | ||
| } | ||
|
|
||
| prog.parse(process.argv); |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.