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

Sync the next branch with master #794

Merged
merged 83 commits into from
Oct 30, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
83 commits
Select commit Hold shift + click to select a range
f141a26
v2 (#630)
jaredpalmer May 30, 2018
5ce7220
Update README for v2
jaredpalmer May 30, 2018
8306554
v2.0.0
jaredpalmer May 30, 2018
2e073b5
Fix #632. Pass webpack to config in build.js
jaredpalmer Jun 1, 2018
f30bd3e
v2.0.1
jaredpalmer Jun 1, 2018
813a3d8
👨🏻‍💻 Include all contributors (#631)
HofmannZ Jun 1, 2018
50bcbd4
Merge branch 'master' of github.com:jaredpalmer/razzle
jaredpalmer Jun 1, 2018
88bff76
Removing thread-loader (#634)
Jun 1, 2018
e881884
v2.0.2
jaredpalmer Jun 1, 2018
05d2c3a
Include the crossorigin attribute link updated (#635)
kireerik Jun 1, 2018
f8fbc99
Adding server source map support (#516)
NickCis Jun 2, 2018
d11a392
Bump deps
jaredpalmer Jun 4, 2018
b6c6c59
Boost perf of TS plugin during dev with suggested Outlook optimizations
jaredpalmer Jun 4, 2018
bdeb1d1
v2.0.3
jaredpalmer Jun 4, 2018
3c24927
Fix useBabel use option in razzzle-plugin-typescript (#639)
tgriesser Jun 6, 2018
0b41a32
Add useEslint option to razzle-plugin-typescript (#640)
tgriesser Jun 6, 2018
28da234
Update readme's
jaredpalmer Jun 6, 2018
940be2a
v2.0.4
jaredpalmer Jun 6, 2018
f57fca8
Upgrade razzle package - jest ^22.4.3 (#648)
jamesbhobbs Jun 12, 2018
092b425
Close #653. Use correct Snyk badges
jaredpalmer Jun 12, 2018
0c02629
Update babel-eslint to 8.x so that decorators will work using babel-p…
daveli Jun 12, 2018
a4c9378
Add carrot to babel-eslint
jaredpalmer Jun 12, 2018
2e27fcd
Remove consola (redundant)
jaredpalmer Jun 12, 2018
84e9b4d
v2.1.0
jaredpalmer Jun 12, 2018
bddb770
Add WebpackConfigHelpers + Vue, Elm plugins (#655)
jaredpalmer Jun 15, 2018
af6a407
fix elm plugin
jaredpalmer Jun 15, 2018
9f9dea3
Update elm
jaredpalmer Jun 15, 2018
59ce36a
Add info about razzle-plugin-elm
jaredpalmer Jun 15, 2018
5a74fdd
Update docs
jaredpalmer Jun 15, 2018
4b4e3b3
v2.1.1
jaredpalmer Jun 15, 2018
21d2c5a
Fix package names
jaredpalmer Jun 15, 2018
167f70a
Fix 'server' typo (#658)
EmilTholin Jun 15, 2018
1ecc472
latest jest (#656)
Jun 15, 2018
d33c789
Bump deps
jaredpalmer Jun 15, 2018
7336c6c
Squat on more potential plugins
jaredpalmer Jun 15, 2018
872d81a
v2.2.0
jaredpalmer Jun 15, 2018
6aee5de
Bump babel-loader to remove incompatibility warning with Webpack 4. (…
daveli Jun 16, 2018
d2deecc
Fix Elm example (#661)
faheempatel Jun 17, 2018
db7b28b
preserve the full --inspect= flag as passed to yarn start (#660)
gregmartyn Jun 18, 2018
05d795e
added example razzle + react router 3 (#539)
davidnguyen11 Jun 18, 2018
9a58a71
Add polka example (#520)
Jun 18, 2018
8a35624
Adding testEnvironmentOptions to supportedKeys for Jest (#678)
bdo Jun 24, 2018
72934d9
fix koa hmr (#693)
ambar Jul 5, 2018
b4f9898
Add pretty node errors (#691)
jackjocross Jul 5, 2018
c490929
Ignore column from source map and only use pretty errors if file is r…
jackjocross Jul 11, 2018
63a8b5c
Add documentation for CSS Modules (#694)
alexparish Jul 11, 2018
e77c8e7
Erik Engi added to the contributors section (#700)
kireerik Jul 15, 2018
5475aef
Update README.md
jaredpalmer Jul 26, 2018
5b1ff8c
Introduce config.modifyBabelOptions (#702)
ericvicenti Jul 27, 2018
e199219
add support for function as plugin (#704)
ambar Jul 27, 2018
e07830c
add mdx loader (#711)
jeetiss Jul 27, 2018
bbab21a
Mdx improve (#712)
jeetiss Jul 27, 2018
39ea3a6
Fix .mjs issue with GraphQL 0.13.2 (#715)
ericclemmons Jul 29, 2018
e478621
remove package-lock.json
jaredpalmer Jul 29, 2018
63159f3
Make readme's match
jaredpalmer Jul 29, 2018
361bb0c
v2.3.0
jaredpalmer Jul 29, 2018
a362b5c
Revert "v2.3.0"
jaredpalmer Jul 30, 2018
037ad53
v2.4.0
jaredpalmer Jul 30, 2018
122f847
Fix production sourcemaps (#717)
jpetitcolas Aug 5, 2018
362c3e1
Create stale.yml
jaredpalmer Aug 15, 2018
1a6413c
Add loadable-components example (#598)
lucasterra Aug 18, 2018
68eead7
Update createJestConfig.js (#719)
Aug 18, 2018
d7c8ece
Use the correct port when PORT is not set (#723)
bkonkle Aug 18, 2018
b85816a
Add Now deployment example (#728)
david-potgieter Aug 21, 2018
c0013d4
Add Heroku deployment example (#727)
david-potgieter Aug 21, 2018
c8b55be
Fix for '[HMR] You need to restart the application!' on server sided err
Bram-Zijp Aug 24, 2018
ad25c6b
Mdx plugin improvements (#732)
jeetiss Aug 25, 2018
e5f9c94
Change import to require
Bram-Zijp Aug 29, 2018
e24934b
cleanup: remove .js extensions from require
Bram-Zijp Aug 29, 2018
08f0856
React Loadable example: add css chunks (#746)
tatchi Sep 8, 2018
f96771d
point people looking at CHANGELOG.md to the release notes page (#747)
gregmartyn Sep 9, 2018
50d428f
Update css chunks: use [name] instead of [id] (#750)
hrasoa Sep 12, 2018
560a9f4
Fix HMR : client was not working + mismatch between server/client (#749)
hrasoa Sep 12, 2018
b2f77d2
remove mention of extract text plugin from react native web example (…
MrLoh Sep 15, 2018
f15ccc1
Merge pull request #730 from Bram-Zijp/master
jackjocross Sep 27, 2018
b5a186c
Update examples to recover from HMR error (#763)
jackjocross Sep 27, 2018
8fed32b
add CLIENT_PUBLIC_PATH env var for local dev environments that don't …
gregmartyn Sep 27, 2018
7302383
Set template package version back to 0.1.0 (#760)
jackjocross Sep 27, 2018
86a6057
CLIENT_PUBLIC_PATH default was being set in two places that computed …
gregmartyn Oct 14, 2018
666fe9d
Correct example name in curl (#772)
ducdev Oct 14, 2018
872c1be
Feature/scss plugin (#786)
jackjocross Oct 22, 2018
2411d42
Use npx (#783)
olehreznichenko Oct 22, 2018
f8e47aa
Merge branch 'master' into next
nimaa77 Oct 29, 2018
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions .all-contributorsrc
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,17 @@
"example",
"plugin"
]
},
{
"login": "rayandrews",
"name": "Ray Andrew",
"avatar_url": "https://avatars1.githubusercontent.com/u/4437323?v=4",
"profile": "https://www.linkedin.com/in/ray-andrew/",
"contributions": [
"code",
"example",
"plugin"
]
}
]
}
17 changes: 17 additions & 0 deletions .github/stale.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# Number of days of inactivity before an issue becomes stale
daysUntilStale: 60
# Number of days of inactivity before a stale issue is closed
daysUntilClose: 7
# Issues with these labels will never be considered stale
exemptLabels:
- pinned
- security
# Label to use when marking an issue as stale
staleLabel: stale
# Comment to post when marking an issue as stale. Set to `false` to disable
markComment: >
Hola! So here's the deal, between open source and my day job and life and what not, I have a lot to manage, so I use a GitHub bot to automate a few things here and there. This particular GitHub bot is going to mark this as stale because it has not had
recent activity for a while. It will be closed if no further activity occurs in a few days. Do not take this personally--seriously--this is a completely automated action. If this is a mistake, just make a comment, DM me, send a carrier pidgeon, or a smoke signal.
# Comment to post when closing a stale issue. Set to `false` to disable
closeComment: >
ProBot automatically closed this due to inactivity. Holler if this is a mistake, and we'll re-open it.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
See [Release Notes](https://github.com/jaredpalmer/razzle/releases)
179 changes: 158 additions & 21 deletions README.md

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions examples/basic/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "razzle-examples-basic",
"version": "2.0.0-alpha.12",
"version": "2.4.0",
"license": "MIT",
"scripts": {
"start": "razzle start",
Expand All @@ -14,6 +14,6 @@
"react-dom": "^16.0.0"
},
"devDependencies": {
"razzle": "^2.0.0-alpha.12"
"razzle": "^2.4.0"
}
}
8 changes: 7 additions & 1 deletion examples/basic/src/index.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,15 @@
import express from 'express';
import app from './server';

let app = require('./server').default;

if (module.hot) {
module.hot.accept('./server', function() {
console.log('🔁 HMR Reloading `./server`...');
try {
app = require('./server').default;
} catch (error) {
console.error(error);
}
});
console.info('✅ Server-side HMR Enabled!');
}
Expand Down
4 changes: 2 additions & 2 deletions examples/with-afterjs/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "razzle-examples-with-afterjs",
"version": "2.0.0-alpha.12",
"version": "2.4.0",
"license": "MIT",
"scripts": {
"start": "razzle start",
Expand All @@ -11,7 +11,7 @@
"dependencies": {
"@jaredpalmer/after": "latest",
"express": "^4.16.2",
"razzle": "^2.0.0-alpha.12",
"razzle": "^2.4.0",
"react": "^16.2.0",
"react-dom": "^16.2.0",
"react-helmet": "^5.2.0",
Expand Down
41 changes: 21 additions & 20 deletions examples/with-afterjs/src/index.js
Original file line number Diff line number Diff line change
@@ -1,26 +1,27 @@
import app from './server';
import http from 'http';
import express from 'express';

const server = http.createServer(app);

let currentApp = app;

server.listen(process.env.PORT || 3000, error => {
if (error) {
console.log(error);
}

console.log('🚀 started');
});
let app = require('./server').default;

if (module.hot) {
console.log('✅ Server-side HMR Enabled!');

module.hot.accept('./server', () => {
module.hot.accept('./server', function() {
console.log('🔁 HMR Reloading `./server`...');
server.removeListener('request', currentApp);
const newApp = require('./server').default;
server.on('request', newApp);
currentApp = newApp;
try {
app = require('./server').default;
} catch (error) {
console.error(error);
}
});
console.info('✅ Server-side HMR Enabled!');
}

const port = process.env.PORT || 3000;

export default express()
.use((req, res) => app.handle(req, res))
.listen(port, function(err) {
if (err) {
console.error(err);
return;
}
console.log(`> Started on port ${port}`);
});
4 changes: 2 additions & 2 deletions examples/with-custom-babel-config/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "razzle-examples-with-custom-babel-config",
"version": "2.0.0-alpha.12",
"version": "2.4.0",
"license": "MIT",
"scripts": {
"start": "razzle start",
Expand All @@ -17,6 +17,6 @@
},
"devDependencies": {
"babel-preset-stage-0": "^6.22.0",
"razzle": "^2.0.0-alpha.12"
"razzle": "^2.4.0"
}
}
8 changes: 7 additions & 1 deletion examples/with-custom-babel-config/src/index.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,15 @@
import express from 'express';
import app from './server';

let app = require('./server').default;

if (module.hot) {
module.hot.accept('./server', function() {
console.log('🔁 HMR Reloading `./server`...');
try {
app = require('./server').default;
} catch (error) {
console.error(error);
}
});
console.info('✅ Server-side HMR Enabled!');
}
Expand Down
4 changes: 2 additions & 2 deletions examples/with-custom-environment-variables/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "razzle-examples-with-custom-environment-variables",
"version": "2.0.0-alpha.12",
"version": "2.4.0",
"license": "MIT",
"scripts": {
"start": "razzle start",
Expand All @@ -15,6 +15,6 @@
"serialize-javascript": "^1.3.0"
},
"devDependencies": {
"razzle": "^2.0.0-alpha.12"
"razzle": "^2.4.0"
}
}
8 changes: 7 additions & 1 deletion examples/with-custom-environment-variables/src/index.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,15 @@
import express from 'express';
import app from './server';

let app = require('./server').default;

if (module.hot) {
module.hot.accept('./server', function() {
console.log('🔁 HMR Reloading `./server`...');
try {
app = require('./server').default;
} catch (error) {
console.error(error);
}
});
console.info('✅ Server-side HMR Enabled!');
}
Expand Down
4 changes: 2 additions & 2 deletions examples/with-custom-webpack-config/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "razzle-examples-with-custom-webpack-config",
"version": "2.0.0-alpha.12",
"version": "2.4.0",
"license": "MIT",
"scripts": {
"start": "razzle start",
Expand All @@ -15,6 +15,6 @@
"serialize-javascript": "^1.3.0"
},
"devDependencies": {
"razzle": "^2.0.0-alpha.12"
"razzle": "^2.4.0"
}
}
8 changes: 7 additions & 1 deletion examples/with-custom-webpack-config/src/index.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,15 @@
import express from 'express';
import app from './server';

let app = require('./server').default;

if (module.hot) {
module.hot.accept('./server', function() {
console.log('🔁 HMR Reloading `./server`...');
try {
app = require('./server').default;
} catch (error) {
console.error(error);
}
});
console.info('✅ Server-side HMR Enabled!');
}
Expand Down
12 changes: 8 additions & 4 deletions examples/with-elm/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# Razzle Elm Example

## How to use

Download the example [or clone the whole project](https://github.com/jaredpalmer/razzle.git):

```bash
Expand All @@ -16,18 +17,19 @@ yarn start
```

## Idea behind the example

This is a basic example of how to use Razzle and Elm, it uses:

- [elm-static-html](https://github.com/eeue56/elm-static-html-lib) to convert Elm views into raw html
- [elm-webpack-loader](https://github.com/elm-community/elm-webpack-loader) load elm files and import them into javascript
- [elm-hot-loader](https://github.com/fluxxu/elm-hot-loader) hot reload all Elm files while dev
* [elm-static-html](https://github.com/eeue56/elm-static-html-lib) to convert Elm views into raw html
* [elm-webpack-loader](https://github.com/elm-community/elm-webpack-loader) load elm files and import them into javascript
* [elm-hot-loader](https://github.com/fluxxu/elm-hot-loader) hot reload all Elm files while dev

`src/client.js` contains all the js code required to load Elm, you can configure Elm ports here
`src/server.js` the server side, here call `elm-static-html-lib` with the respective module to render the view

---

If you want to activate the Elm debug mode or other tooling and debug utilites of Elm edit `razzle.config.js`:
If you want to activate the Elm debug mode or other tooling and debug utilites of Elm edit `razzle.config.js`:

```js
{
Expand All @@ -40,3 +42,5 @@ If you want to activate the Elm debug mode or other tooling and debug utilites o
}
}
```

As of Razzle 2.0, you can now use [razzle-plugin-elm](../../packages/razzle-plugin-elm/README.md) instead of adding the webpack loaders on your own.
4 changes: 2 additions & 2 deletions examples/with-elm/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "razzle-examples-with-elm",
"version": "2.0.0-alpha.12",
"version": "2.4.0",
"license": "MIT",
"scripts": {
"postinstall": "elm-package install -y",
Expand All @@ -16,6 +16,6 @@
"devDependencies": {
"elm-hot-loader": "^0.5.4",
"elm-webpack-loader": "4.5.0",
"razzle": "^2.0.0-alpha.12"
"razzle": "^2.4.0"
}
}
43 changes: 18 additions & 25 deletions examples/with-elm/razzle.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,50 +4,43 @@ module.exports = {
modify(config, { target, dev }, webpack) {
const appConfig = config; // stay immutable here

appConfig.module.rules[2].exclude.push(/\.(elm)$/)
appConfig.module.rules[2].exclude.push(/\.(elm)$/);

appConfig.module.noParse = [/.elm$/]
appConfig.resolve.extensions = config.resolve.extensions.concat([
'.elm'
]);

if(dev) {
appConfig.module.rules.push(
{
appConfig.module.noParse = [/.elm$/];
appConfig.resolve.extensions.push('.elm');

if (dev) {
appConfig.module.rules.push({
test: /\.elm$/,
exclude: [/elm-stuff/, /node_modules/],
use: [
{
loader: 'elm-hot-loader'
},
{
loader: 'elm-webpack-loader',
options: {
verbose: true,
warn: true,
pathToMake: require('elm/platform').executablePaths['elm-make'],
forceWatch: true
}
}
forceWatch: true,
},
},
],
})
}
else { // Production
appConfig.module.rules.push(
{
});
} else {
// Production
appConfig.module.rules.push({
test: /\.elm$/,
exclude: [/elm-stuff/, /node_modules/],
use: [
{
loader: 'elm-webpack-loader',
options: {
pathToMake: require('elm/platform').executablePaths['elm-make'],
}
}
},
},
],
})
});
}

return appConfig;
},
};
};
4 changes: 2 additions & 2 deletions examples/with-elm/src/client.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
var Elm = require('./Main');
import Elm from './Main';

// We need embed the Elm app to the div, if we call fullscreen we will have duplicated html
Elm.Main.embed( document.getElementById( "root" ) );
Elm.Main.embed(document.getElementById('root'));

if (module.hot) {
module.hot.accept();
Expand Down
Loading