npm install neft -g neft create MyApp cd MyApp neft run node browser --watch
... and play with
neft run ios --watch,
neft run android --watch.
To install Neft make sure you have installed Node.js in version 4.0.0 or newer.
See installation instruction for Linux distributions, type
brew install node under OSX or
choco install nodejs.install under Windows. For more informations see https://nodejs.org/en/download/.
Then you can easily install Neft on your machine by typing
npm install neft -g in your terminal.
Now you can type
neft and see the help page.
Neft application is a folder with standardized structure and
It's recommended to create application folder by typing
neft create MyAppName.
This command creates folder (e.g. MyAppName) with main view (
views/index.html) and meta-data
Each time you change the code of your application, you need to build the bundle.
You can do this by typing
neft build browser.
In place of
browser provide a platform you want to support. You can choose from
By typing, for instance,
neft run ios you will automatically build and run the application.
If you want to run your application in a browser (
neft run browser), make sure you firstly run node server (
neft run node) which serves all needed files for the browser.
Server hostname and port are defined in the
package.json file. It's
localhost:3000 by default.
By default, Neft uses the HTML renderer in a browser.
If you want to use the WebGL renderer you can:
- change the
If you want to disable the renderer in a browser and see how Google see your page, you can:
- change the
When you are ready to publish your app, build client bundles using the
neft run node --release
In the release mode, code is minified and all assertions are removed.
In your application folder, you can find
This file is used to configure your local environment. It's ignored by Git (see
.gitignore file in your application folder).
To build APK and run your application on Android device, you need to specify where, on your machine Android SDK is placed. See
android.sdkDir in your
To speed up coding, you can automatically rebuild the bundle each time you change something. Type
neft build android --watch or whatever platform you want to support.
Application run in native environment will automatically restart.
To make it works, you will need to specify
buildServer.host in your
local.json file. We recommend to use your machine IP address.
Changing static files or custom native code requires you to rerun your application on a device manually.