Skip to content

v0.28.0-alpha.5

Pre-release
Pre-release
Compare
Choose a tag to compare
@thescientist13 thescientist13 released this 02 Apr 01:39
· 218 commits to master since this release

Overview

This alpha release improves the relationship between build output and source code, adds a plugin for using WCC's (experimental) JSX transpiling, and some regressions coming out of the last release.

In development docs here, full release blog will come out with the final release.

To adopt alpha releases, you can do the following

# yarn 1.x
$ yarn upgrade @greenwood/cli@alpha

# npm
$ npm install @greenwood/cli@alpha

Changelog

https://github.com/ProjectEvergreen/greenwood/issues?q=label%3Av0.28.0+label%3Aalpha.5

  1. bundle and optimize server and API routes and serve from output directory (decouple serve task from source code)
  2. Create a plugin for import JSX plugin (using WCC)
  3. break after first found resource match for dev server serve lifecycle

Breaking Changes

greenwood serve

It will now be required to run greenwood build before running greenwood serve.

Known Issues

  1. matching for bundling inline script tags
  2. port was hardcoded with serve command and SSR

Diff

$ git diff v0.28.0-alpha.4 v0.28.0-alpha.5 --stat | grep -v "www"
 .github/CONTRIBUTING.md                            |  24 ++-
 lerna.json                                         |   2 +-
 packages/cli/package.json                          |   6 +-
 packages/cli/src/config/rollup.config.js           |  74 +++++++-
 packages/cli/src/index.js                          |   6 +-
 packages/cli/src/lib/node-modules-utils.js         |   2 +-
 packages/cli/src/lib/resource-utils.js             |   4 +-
 packages/cli/src/lib/ssr-route-worker.js           |   2 +-
 packages/cli/src/lib/templating-utils.js           | 201 +++++++++++++++++++++
 packages/cli/src/lifecycles/bundle.js              | 151 +++++++++++++++-
 packages/cli/src/lifecycles/compile.js             |  99 +++++++++-
 packages/cli/src/lifecycles/config.js              |   3 +
 packages/cli/src/lifecycles/context.js             |   5 +-
 packages/cli/src/lifecycles/graph.js               |  50 ++++-
 packages/cli/src/lifecycles/serve.js               |  41 ++---
 .../src/plugins/copy/plugin-copy-manifest-json.js  |  14 ++
 .../src/plugins/copy/plugin-copy-user-templates.js |  21 +++
 .../cli/src/plugins/resource/plugin-api-routes.js  |  16 +-
 .../src/plugins/resource/plugin-standard-html.js   | 198 +-------------------
 .../cli/src/plugins/server/plugin-livereload.js    |   4 +-
 .../build.plugins.resource/greenwood.config.js     |   7 +-
 .../serve.config.static-router.spec.js             |  65 ++++++-
 .../serve.default.api/serve.default.api.spec.js    |   2 +-
 .../serve.default.error.spec.js                    |  52 ++++++
 .../serve.default.ssr-prerender.spec.js            |   1 +
 .../serve.default.ssr-static-export.spec.js        |   2 +-
 .../serve.default.ssr/serve.default.ssr.spec.js    |   3 +-
 .../test/cases/serve.default/serve.default.spec.js |   1 +
 .../cli/test/cases/serve.spa/serve.spa.spec.js     |   1 +
 packages/init/package.json                         |   2 +-
 packages/plugin-babel/package.json                 |   4 +-
 packages/plugin-google-analytics/package.json      |   4 +-
 packages/plugin-graphql/package.json               |   4 +-
 packages/plugin-import-commonjs/package.json       |   4 +-
 packages/plugin-import-css/package.json            |   4 +-
 packages/plugin-import-json/package.json           |   4 +-
 packages/plugin-import-jsx/README.md               |  61 +++++++
 packages/plugin-import-jsx/package.json            |  33 ++++
 packages/plugin-import-jsx/src/index.js            |  43 +++++
 .../test/cases/default/default.prerender.spec.js   |  87 +++++++++
 .../test/cases/default/greenwood.config.js         |   7 +
 .../test/cases/default/package.json                |   5 +
 .../test/cases/default/src/components/footer.jsx   |  15 ++
 .../test/cases/default/src/pages/index.md          |   3 +
 .../test/cases/default/src/templates/app.html      |  12 ++
 .../exp-build.prerender.spec.js                    |  89 +++++++++
 .../cases/exp-build.prerender/greenwood.config.js  |   8 +
 .../test/cases/exp-build.prerender/package.json    |   5 +
 .../exp-build.prerender/src/components/footer.jsx  |  17 ++
 .../cases/exp-build.prerender/src/pages/index.md   |   3 +
 .../exp-build.prerender/src/templates/app.html     |  12 ++
 packages/plugin-include-html/package.json          |   4 +-
 packages/plugin-polyfills/package.json             |   4 +-
 packages/plugin-postcss/package.json               |   4 +-
 packages/plugin-renderer-lit/package.json          |   4 +-
 .../{build.default => serve.default}/artists.json  |   0
 .../greenwood.config.js                            |   0
 .../{build.default => serve.default}/package.json  |   0
 .../serve.default.spec.js}                         |   5 +-
 .../src/components/footer.js                       |   0
 .../src/components/greeting.js                     |   0
 .../src/pages/artists.js                           |   4 +-
 .../src/pages/users.js                             |   0
 .../src/templates/app.html                         |   0
 packages/plugin-renderer-puppeteer/package.json    |   4 +-
 packages/plugin-typescript/package.json            |   4 +-
 yarn.lock                                          |  33 +++-
 70 files changed, 1247 insertions(+), 314 deletions(-)