4.6.3-18 • Published 10 days ago

kiwi-bundle v4.6.3-18

Weekly downloads
2
License
Apache-2.0
Repository
github
Last release
10 days ago

Kiwi Bundle

FOSSA Status

Features

  • out-of-the box configurations for TypeScript, React, React Native, Babel and ESLint
  • integration of react-native-web for building web, Android and iOS apps with the same codebase
  • instant start-up and hot reloading to see your components changes in real time
  • only two NPM packages : one for development and one for distribution

Getting started

Requirements

You will need NodeJS to be installed : https://nodejs.org/en/download/

For Android builds, Java and Android Studio are required

For iOS builds, you need to have Xcode installed on your Mac

Optionally you can install yarn in replacement of npm by running npm install -g yarn

Finally, if you do not have a text editor yet, give VSCode a try : https://code.visualstudio.com

Install

Create a ./package.json file :

{
  "name": "kiwibundle",
  "version": "1.0.0",
  "kiwi": {
    "android": {
      "package": "cc.blueforest.kiwibundle",
      "build": 1
    },
    "ios": {
      "bundle": "cc.blueforest.kiwibundle",
      "build": 1
    }
  },
  "scripts": {
    "start": "kiwi start",
    "build": "kiwi build"
  },
  "dependencies": {
    "kiwi-bundle": "4.6.3-18"
  },
  "devDependencies": {
    "kiwi-bundle-dev": "4.6.3-18"
  },
  "browserslist": {
    "production": [
      ">0.2%",
      "not dead",
      "not op_mini all"
    ],
    "development": [
      "last 1 chrome version",
      "last 1 firefox version",
      "last 1 safari version"
    ]
  }
}

Put your own values on "name" and "kiwi.android.package", then run npm install or yarn install

Commands

Web

To start a local server, run npm run start web or yarn start web

To build static files, run npm run build web or yarn build web

Android

To start development environment : 1. Run npm run start metro or yarn start metro 2. Run npm run start android or yarn start android

To build production files, run npm run build android or yarn build android

iOS

Before your first start, you will need to run pod install in ./ios to install CocoaPods dependencies

Then run npm run start ios or yarn start ios

Routing for web

import * as Kiwi from "kiwi-bundle"

Kiwi.App({
  key: "kiwibundle",
  routes: { // the router will check the FIRST MATCHING ROUTE
    root: { // this is the default route if no other matches
      path: "/", // http://localhost:3000
    },
    dir: { // all routes MUST start with /
      path: "/dir", // http://localhost:3000/dirè
    },
    dynamic: { // dynamic routes are supported with props
      path: "/dir/{dynamic}", // http://localhost:3000/dir/test (props = { dynamic: "test" })
    },
    subdomain: { // before the first /, you can specify a subdomain
      path: "subdomain/", // http://subdomain.localhost:3000
    },
    testSubdomain: { // you can use as many subdomains as you want
      path: "test.subdomain", // http://test.subdomain.localhost:3000
    },
    dynamicSubdomain: { // dynamic subdomains are supported with props
      path: "{domain}.subdomain/dir", // http://a.subdomain.localhost:3000/dir (props = { domain: "a" })
    },
  },
})
4.6.3-18

10 days ago

4.6.3-17

14 days ago

4.6.3-16

1 month ago

4.6.3-15

2 months ago

4.6.3-14

2 months ago

4.6.3-13

4 months ago

4.6.4-0

8 months ago

4.6.3-8

1 year ago

4.6.3-9

1 year ago

4.6.3-6

1 year ago

4.6.3-7

1 year ago

4.6.3-4

1 year ago

4.6.3-5

1 year ago

4.6.3-2

1 year ago

4.6.3-3

1 year ago

4.6.3-1

1 year ago

4.6.3-11

1 year ago

4.6.3-12

1 year ago

4.6.3-10

1 year ago

4.6.1-8

2 years ago

4.6.1-9

2 years ago

4.6.1-6

2 years ago

4.6.1-7

2 years ago

4.6.1-4

2 years ago

4.6.1-5

2 years ago

4.6.1-2

2 years ago

4.6.1-3

2 years ago

4.6.1-0

2 years ago

4.6.1-1

2 years ago

3.2.11

4 years ago

3.2.10

4 years ago

3.2.9

4 years ago

3.2.8

4 years ago

3.2.7

4 years ago

3.2.2

4 years ago

3.2.1

4 years ago

3.2.6

4 years ago

3.2.5

4 years ago

3.2.4

4 years ago

3.2.3

4 years ago

3.2.0

4 years ago

3.1.9

4 years ago

3.1.8

4 years ago

3.1.7

4 years ago

3.1.6

4 years ago

3.1.5

4 years ago

3.1.4

4 years ago

3.1.3

4 years ago

3.1.2

4 years ago

3.1.1

4 years ago

3.1.0

4 years ago

3.0.8

4 years ago

3.0.7

4 years ago

3.0.6

4 years ago

3.0.5

4 years ago

3.0.4

4 years ago

3.0.3

4 years ago

3.0.2

4 years ago

3.0.1

4 years ago

3.0.0

4 years ago

2.7.3

5 years ago

2.7.2

5 years ago

2.7.1

5 years ago

2.7.0

5 years ago

2.6.2

5 years ago

2.6.1

5 years ago

2.6.0

5 years ago

2.5.1

5 years ago

2.5.0

5 years ago

2.4.0

5 years ago

2.3.0

5 years ago

2.2.0

5 years ago

2.0.4

5 years ago

2.0.3

5 years ago

2.0.2

5 years ago

2.0.1

5 years ago

2.0.0

5 years ago

1.3.0

5 years ago

1.4.0

5 years ago

1.2.0

5 years ago

1.1.0

5 years ago

1.0.0

5 years ago

1.0.1

5 years ago