Go to file
ClarkXia 8026a3f3f3 feat: support mpa (#82)
* feat: support mpa

* fix: generate empty routes file

* fix: set mpa plugin as build-in

* fix: register mpa config

* chore: example link of codesandbox
2020-03-06 14:58:47 +08:00
.github chore: update issue template 2020-02-26 20:16:06 +08:00
examples feat: support mpa (#82) 2020-03-06 14:58:47 +08:00
packages feat: support mpa (#82) 2020-03-06 14:58:47 +08:00
scripts feat: initial project 2020-02-13 23:14:08 +08:00
.commitlintrc.js feat: initial project 2020-02-13 23:14:08 +08:00
.editorconfig feat: initial project 2020-02-13 23:14:08 +08:00
.eslintignore feat: initial project 2020-02-13 23:14:08 +08:00
.eslintrc.js feat: initial project 2020-02-13 23:14:08 +08:00
.gitignore feat: initial project 2020-02-13 23:14:08 +08:00
CHANGELOG.md feat: initial project 2020-02-13 23:14:08 +08:00
LICENSE feat: initial project 2020-02-13 23:14:08 +08:00
README.md feat: support mpa (#82) 2020-03-06 14:58:47 +08:00
README_zh-CN.md feat: support mpa (#82) 2020-03-06 14:58:47 +08:00
lerna.json v1.0.13-alpha.0 2020-03-05 17:00:35 +08:00
package.json chore: remove unused script 2020-03-02 09:34:28 +08:00
tsconfig.json feat: support mpa (#82) 2020-03-06 14:58:47 +08:00
tsconfig.settings.json feat: initial project 2020-02-13 23:14:08 +08:00
yarn.lock.REMOVED.git-id chore: create-ice add simple scaffold 2020-02-19 18:27:32 +08:00

README.md

English | 简体中文

Downloads Version GitHub license PRs Welcome Gitter

A universal framework based on React.js

Features

  • 🐒 EngineeringOut of the box support for ES6+、TypeScript、Less、Sass、 CSS Modulesetc
  • 🦊 RoutingPowerful Routing System, supports configured routing and conventions routing
  • 🐯 State managementBuilt-in icestore, lightweight state management solution based on React Hooks
  • 🐦 ConfigModes and Environment Variables configuration in the config file
  • 🐶 LoggerBuilt-in logger solution, it's a flexible abstraction over using console.log as well
  • 🐱 HelpersBuilt-in helpers, provide some useful utility functions
  • 🦁 Application configurationProvide powerful and extensible application configuration
  • 🐴 HooksProvide Hooks APIs such as useModel and useHistory, etc
  • 🐌 Plugin systemThe plugin system provides rich features and allow the community to build reusable solutions
  • 🐘 TypeScriptSupport TypeScript
  • 🐂 ModernSupport SPA、SSR、MPA and Micro-frontend

Quick start

Setup

We recommend creating a new icejs app using create-ice, which sets up everything automatically for you. To create a project, run:

$ npm init ice <project-name>

npm init <initializer> is available in npm 6+

Start local server to launch project:

$ cd <project-name>
$ npm install
$ npm run start # running on http://localhost:3333.

It's as simple as that!

Manual Setup

icejs is really easy to get started with. Install icejs, react and react-dom in your project:

$ mkdir <project-name> && cd <project-name>
$ npm install ice.js react react-dom

Open package.json and add the following scripts:

{
  "name": "project-name",
  "scripts": {
    "start": "icejs start",
    "build": "icejs build"
  },
  "dependencies": {
    "ice.js": "^1.0.0",
    "react": "^16.12.0",
    "react-dom": "^16.12.0"
  }
}

Create the pages directory, then create the first page in pages/index.jsx:

import React from 'react'

const HomePage = () => {
  return <div>Welcome to icejs!</div>
}

export default HomePage

Configure an application information in the src/app.js file, but it is optional:

import { createApp } from 'ice'

const appConfig = {
  router: {
    type: 'browser',
  },

  // more...
}

createApp(appConfig)

Finally, To start developing your application run npm run start. The application is now running on http://localhost:3333.

Examples

Contributing

# 1. clone and setup
$ git clone git@github.com:ice-lab/icejs.git
$ cd icejs && npm run setup

# 2. watch packages
$ npm run watch

# 3. run example
$ cd examples/spa-basic
$ npm link ../../packages/icejs
$ npm start

Please see our CONTRIBUTING.md

Ecosystem

Project Version Docs Description
icejs icejs-status docs A universal framework based on react.js
iceworks iceworks-cli-status docs One-stop visual source code development workbench based on materials
icestark icestark-status docs Micro Frontends solution for large application
icestore icestore-status docs Lightweight state management solution based on React Hooks

Community

DingTalk community GitHub issues Gitter
issues gitter

License

MIT