0.0.9 • Published 6 years ago

kaios-scripts v0.0.9

Weekly downloads
5
License
MIT
Repository
github
Last release
6 years ago

Create KaiOS App

Forked from facebook/create-react-app, Create KaiOS App helps to build a KaiOS app quickly based on react and kaios designed ui components. You may need a KaiOS device such as Nokia 8810 4G(debug enabled) or a KaiOS Simulator to check specific app behaviors. Firefox Browser is also a good choice.

Original README is renamed to README_REACT.md, check it for more details.

Creating an App

You’ll need to have Node 8.10.0 or later on your local development machine (but it’s not required on the server). You can use nvm (macOS/Linux) or nvm-windows to easily switch Node versions between different projects.

We recommend using yarn to create kaios app, though npx and npm should also work.

Yarn

yarn create kaios-app my-app --react

yarn create is available in Yarn 0.25+

It will create a directory called my-app inside the current folder. Inside that directory, it will generate the initial project structure and install the transitive dependencies:

my-app
├── README.md
├── node_modules
├── package.json
├── .gitignore
├── public
│   ├── icons
│   ├── index.html
│   └── manifest.webapp
└── src
    ├── view
    |   |── app.css
    |   ├── app.js
    |   ├── app.test.js
    ├── index.css
    ├── index.js
    ├── logo.svg

No configuration or complicated folder structures, just the files you need to build your app. Once the installation is done, you can open your project folder:

cd my-app

Inside the newly created project, you can run some built-in commands:

yarn start

Runs the app in development mode.

Open http://localhost:3000 to view it in the browser. The page will automatically reload if you make changes to the code. You will see the build errors and lint warnings in the console.

yarn test

Runs the test watcher in an interactive mode.

By default, runs tests related to files changed since the last commit. Read more about testing.

yarn build

Builds the app for production to the build folder.

It correctly bundles React in production mode and optimizes the build for the best performance. The build is minified and the filenames include the hashes. Your app is ready to be deployed.

yarn push

Push and install the app to adb-attached KaiOS devices.

User Guide

You can find detailed instructions on using Create React App and many tips in its documentation. For KaiOS app development, check its developer portal.