Natuna Framework came in source code form, so you can build it with your own tools. We used EsBuild as our default compiler and it's so fast. Learn more about EsBuild here
- Basic knowledge of Command Prompt
- Basic knowledge of NodeJS commands
We would used a latest version of these packages, so please keep the latest update for these packages.
- NodeJS - https://nodejs.org/en/download/
- NPM - https://docs.npmjs.com/downloading-and-installing-node-js-and-npm
- Yarn - https://classic.yarnpkg.com/en/docs/install/#windows-stable
Builds all files in the src
folder.
-
✔️ You need to build the files when:
- After cloning this repository on your local machine (Installation).
- After editing any script under
src
folder. - After generating a new Database schema.
-
❌ You DON'T need to build the files when:
- After editing configuration on
package.json
.
- After editing configuration on
To build files, you need to run:
npm run build
oryarn build
to perform a single production build.npm run build:dev
oryarn build:dev
to perform a development build.npm run dev
oryarn dev
to perform a watch build, which will automatically rebuild the files when you change them.
Builds the database schema. This is required after you edit the database migration file so that the new schema will be applied to the database module.
Current database is only support MySQL, and its schema is generated from SQL migration file under .natuna/database/mysql/migration.sql
.
To build database, you need to run:
npm run db:migrate
oryarn db:migrate
to perform a a database migration from the migration file.npm run db:create-schema
oryarn db:create-schema
to generate the new database schema from the migration file.npm run db:setup
oryarn db:setup
to perform 2 steps above.
- Go to the Natuna Framework folder.
- Open command prompt and locate to the project folder using
cd
command. - Run a build command based on your preference, check the build options above.
- Wait until it's finished.
- If there are no error presented at the end, then you good to go.
If you're ever wonder, yes, EsBuild is generating your whole file mostly under 1 second.