sambell
create performant server-rendered React applications with no build configuration; ideal for universal react-router projects.
Last updated 2 years ago by ndreckshage .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install sambell 
SYNC missed versions from official npm registry.

:new_moon::new_moon::new_moon: sambell :new_moon::new_moon::new_moon:

create performant server-rendered React applications with no build configuration; ideal for universal react-router projects.

Both create-react-app and next.js are great projects, try them! I like aspects of both. But you don't get a universal react-router application out of the box.

What will my app look like?!?

Check out the template!

Install

yarn global add sambell
sambell new app
cd app
yarn start

Features

Dev experience

  • Everything you (or at least, I) want without setting anything up!
  • Client side SPA with react-router version 4.
  • styled-jsx is a great feature of Next.js that I bring in here. I find it to be more pleasant than css-modules, and eaiser to work with for a universal application (critical styles, etc).

Performant

  • React 16
  • Server side rendering. Universal.
  • Critical styles with styled-jsx.
  • Async loading of routes with react-loadable (forked version @humblespark/react-loadable).
  • Async (<script async />) loading of all webpack scripts.
  • Webpack build optimized for production.

Async components

  • Full client & server side support for async loading components, with react-loadable
  • Forked version (@humblespark/react-loadable) to work with server side webpack build & a fix for checksum mismatch.
const Moon = Loadable(() => import(/* webpackChunkName: "components/Moon" */'components/Moon'));

Webpack / Babel

  • Webpack 2 (code splitting, tree shaking, etc).
  • Webpack runs for both client and server code.
  • Minimal loaders (only a JS loader). But it is configurable if you want to add more.
  • absolute path requires from your project root. import App from 'App'.
  • Sourcemaps for client & server.
  • Babel Presets: es2015, stage-1, react
  • Babel Plugins: styled-jsx
  • Polyfills: isomorphic-fetch, babel-polyfill

Configurable

*gerty.js (basic configuration to control where stuff goes)

module.exports = {
  clientEntry: 'client',
  serverEntry: 'server',
  clientOutputDirectory: '.sambell/client',
  serverOutputDirectory: '.sambell/server',
  publicPath: '/static/webpack/',
  webpack: config => config,
};

:rocket: -> :no_entry_sign: :earth_americas:

:alien:

Current Tags

  • 8.0.0                                ...           latest (2 years ago)

87 Versions

  • 8.0.0                                ...           2 years ago
  • 7.0.3                                ...           2 years ago
  • 7.0.2                                ...           2 years ago
  • 7.0.1                                ...           2 years ago
  • 7.0.0                                ...           2 years ago
  • 6.0.0                                ...           2 years ago
  • 5.0.1                                ...           2 years ago
  • 5.0.0                                ...           2 years ago
  • 4.2.1                                ...           2 years ago
  • 4.2.0                                ...           2 years ago
  • 4.0.1                                ...           2 years ago
  • 4.0.0                                ...           3 years ago
  • 3.1.5                                ...           3 years ago
  • 3.1.4                                ...           3 years ago
  • 3.1.3                                ...           3 years ago
  • 3.1.2                                ...           3 years ago
  • 3.1.1                                ...           3 years ago
  • 3.1.0                                ...           3 years ago
  • 3.0.1                                ...           3 years ago
  • 3.0.0                                ...           3 years ago
  • 2.0.0                                ...           3 years ago
  • 2.0.0-beta.26                                ...           3 years ago
  • 2.0.0-beta.25                                ...           3 years ago
  • 2.0.0-beta.24                                ...           3 years ago
  • 2.0.0-beta.23                                ...           3 years ago
  • 2.0.0-beta.22                                ...           3 years ago
  • 2.0.0-beta.21                                ...           3 years ago
  • 2.0.0-beta.20                                ...           3 years ago
  • 2.0.0-beta.19                                ...           3 years ago
  • 2.0.0-beta.18                                ...           3 years ago
  • 2.0.0-beta.16                                ...           3 years ago
  • 2.0.0-beta.14                                ...           3 years ago
  • 2.0.0-beta.13                                ...           3 years ago
  • 2.0.0-beta.10                                ...           3 years ago
  • 2.0.0-beta.8                                ...           3 years ago
  • 2.0.0-beta.7                                ...           3 years ago
  • 2.0.0-beta.6                                ...           3 years ago
  • 2.0.0-beta.5                                ...           3 years ago
  • 2.0.0-beta.4                                ...           3 years ago
  • 2.0.0-beta.3                                ...           3 years ago
  • 2.0.0-beta.2                                ...           3 years ago
  • 2.0.0-beta.1                                ...           3 years ago
  • 0.13.2                                ...           4 years ago
  • 0.13.1                                ...           4 years ago
  • 0.13.0                                ...           4 years ago
  • 0.12.1                                ...           4 years ago
  • 0.12.0                                ...           4 years ago
  • 0.11.3                                ...           4 years ago
  • 0.11.2                                ...           4 years ago
  • 0.11.1                                ...           4 years ago
  • 0.11.0                                ...           4 years ago
  • 0.10.0                                ...           4 years ago
  • 0.9.0                                ...           4 years ago
  • 0.8.0                                ...           4 years ago
  • 0.7.0                                ...           4 years ago
  • 0.6.0                                ...           4 years ago
  • 0.5.1                                ...           4 years ago
  • 0.5.0                                ...           4 years ago
  • 0.4.0                                ...           4 years ago
  • 0.3.1                                ...           4 years ago
  • 0.3.0                                ...           4 years ago
  • 0.2.1                                ...           4 years ago
  • 0.2.0                                ...           4 years ago
  • 0.1.24                                ...           4 years ago
  • 0.1.23                                ...           4 years ago
  • 0.1.22                                ...           4 years ago
  • 0.1.21                                ...           4 years ago
  • 0.1.20                                ...           4 years ago
  • 0.1.19                                ...           4 years ago
  • 0.1.17                                ...           4 years ago
  • 0.1.16                                ...           4 years ago
  • 0.1.14                                ...           4 years ago
  • 0.1.15                                ...           4 years ago
  • 0.1.13                                ...           4 years ago
  • 0.1.12                                ...           4 years ago
  • 0.1.11                                ...           4 years ago
  • 0.1.10                                ...           4 years ago
  • 0.1.9                                ...           4 years ago
  • 0.1.8                                ...           4 years ago
  • 0.1.7                                ...           4 years ago
  • 0.1.6                                ...           4 years ago
  • 0.1.5                                ...           4 years ago
  • 0.1.4                                ...           4 years ago
  • 0.1.3                                ...           4 years ago
  • 0.1.2                                ...           4 years ago
  • 0.1.1                                ...           4 years ago
  • 0.1.0                                ...           4 years ago
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 0
Last Month 0
Dev Dependencies (0)
None
Dependents (0)
None

Copyright 2014 - 2016 © taobao.org |