node package manager
Easy collaboration. Discover, share, and reuse code in your team. Create a free org »

webcube

webcube

< Back to Project WebCube

NPM Version

Nodei

iOS Safari Android WebView IE
iOS 7+ ✔ Android 4+ ✔ 11+ ✔

webcube is a continuously updated JS infrastructure for modern Universal JS web app/site and static web

It simplifies the integration with the latest cutting-edge JS technology and tools, automatically provides the modern software engineering environment, architecture, workflow and best practices. It also can lower the barrier of starting a new web app project.

Get Started

Usage #1: Create a Web Project As a Standalone Repo

Step 0: copy webcube-starter-for-standalone-repo/package.json into your repo:

mkdir my-project
cd my-project
curl https://raw.githubusercontent.com/dexteryy/webcube/master/webcube-starter-for-standalone-repo/package.json > package.json

Step 1: install dependencies

npm run update

Step 2: scaffold

npm run webcube:setup

Step 3: create entry point

npm run new

Usage #2: Create a Web Project in a Monorepo

Pre-task: create a monorepo based on webcube for web development

Step 0: create a monorepo based on webcube's monorepo

git clone git@github.com:dexteryy/webcube.git your-monorepo
cd your-monorepo/
rm -rf .git/ ./*-example-* ./*-starter-*

Step 0.5: copy webcube-starter-for-project-in-monorepo/package.json into your directory in monorepo

mkdir my-project
cd my-project
curl https://raw.githubusercontent.com/dexteryy/webcube/master/webcube-starter-for-project-in-monorepo/package.json > package.json

Step #1: install dependencies in monorepo's root

cd ../
npm run update
cd -

Step 2: scaffold

npm run webcube:setup

Step 3: create entry point

npm run new

Integration

Features

WIP

Philosophy

Slides (in Chinese) @ JSConf CN 2017

WIP

How to develop

For faster recompiling (webpack-dev-server):

npm run dev

or

npm run dev:dashboard

Enable automatically refreshing:

LIVE_MODE=refresh npm run dev:dashboard

Enable HMR (Hot Module Replacement):

LIVE_MODE=hmr npm run dev:dashboard

How to test

WIP

Code quality

WIP

How to deploy

Static Web Mode

NOTE: for static cloud environment (e.g. AWS S3, Aliyun OSS, Cloudflare, ...)

npm run deploy:staticweb

For staging environment:

npm run deploy:staging:staticweb

Environment variables: WEBCUBE_DEPLOY_STATIC_*

For example,

WEBCUBE_DEPLOY_STATIC_CLOUD=oss
WEBCUBE_DEPLOY_STATIC_CLOUD=s3

Static Server Mode

npm run deploy:staticserver

Server-side Rendering Mode

WIP

Packaged App Mode

WIP