Getting Started

Neu Forge is a tool for developing neutralinojs applications.

To get started with neu forge, you need to create a new project, The below given command will guide you through options to customize your template & will finally create a new project for you.

npx neu-forge@latest create

Example:

~$ npx neu-forge create
Need to install the following packages:
  neu-forge
Ok to proceed? (y) y
? Project name? testApp
? Project version? 0.0.1
? Select a template? Vanilla

✔ Copying "Vanilla" template
✔ Installing NPM Dependencies
✔ Getting Neutralinojs Binaries
✔ Updating Neutralino Config
✔ Updating NPM package.json
~$

You should now have a directory with a name of the name you chose while creating your app, for example i chose testApp so i will have a directory name testApp. If you head into that directory and start up the app, you'll be all set to start developing.

npm start

Using With Already Existing App

it isn't a rocket science if you already have an existing neutralino app and you want to switch to Neu Forge, Just install Neu Forge (npm i -D neu-forge@latest) and replace:

  1. neu run with neu-forge start
  2. neu update with neu-forge fetch

Building Distributables

So you've got an amazing application there, and you want to package it all up and share it with the world. If you run neu-forge build Neu Forge will generate you platform specific distributables for you to share with everyone.

npm run build

this command will create a new folder dist which will contain binaries for different platforms & cpu architectures, supported platforms are:

  1. Windows 8+
  2. MacOs
  3. Linux

supported cpu architectures are x64, arm64 (linux), note we are working on x86 cpu architecture...

the dist folder contains

dist
  |
  └- win32
  |   └- x64
  |      └- yourApp.exe
  |      └─ resources.neu
  |      └- Webview2Loader.dll
  |
  └─ linux
  |   └- x64
  |   |  └- yourApp
  |   |  └- resources.neu
  |   |
  |   └- arm64
  |      └- yourApp
  |      └- resources.neu
  |
  └─ darwin
      └- x64
         └- yourApp
         └- resources.neu

the directory structure is same everywhere, in dist directory there will be a directory representing the platform it contains the binaries for, and inside that directory there will be directories representing the cpu architecture they are for.

About resources.neu File

when you build your application you might've noticed that there is a file named resources.neu file, what is this file? what is it used for? why is it there?

the resources.neu file is a 'Archive' and it contains your HTML, CSS & JavaScript Code, basically it contains everything inside the folder which you have specified inside cli.resourcesPath property in the neutralino.config.json, also the neutralino.config.json is also inside this archive.

when the your app launched it looks for the resources.neu file in the directory the app is, and when the app finds the archive it loads it into the memory and starts showing your app.