Mamba App template
A complete project template for building Mamba apps.
Requirements
Make sure all dependencies have been installed before moving on:
- Node.js >= v8.11.3
Recommended:
Creating a new Mamba App
@mamba/cli
With # Install the mamba cli globally if doesn't already have it
npm i -g @mamba/cli
# Create a new mamba app at 'my-mamba-app' directory
mamba new app my-mamba-app
? Name: My Mamba App
? Version: 1.0.0
? Description: My new Mamba app
# Enter the app directory
cd my-mamba-app
# Start the development server
mamba app start
Manually
# Create and enter your new app directory
mkdir my-mamba-app
cd my-mamba-app
# Install the standard mamba app template
npx degit stone-payments/pos-mamba-app-template
# Install its dependencies
npm i
# Run the development server
npm run start
POS
Building and deploying to the - Generate the production app bundle
# With the @mamba/cli
mamba app build
# Without the @mamba/cli
npm run build
This will generate the dist/bundle.pos
directory and a dist/bundle.pos.tar.gz
file, which both contains your Mamba app.
- Start the local http server
npm run serve # Starts the local http server
- Open the
Develop
app and insert your local server ip and the app will automatically look for thedist/bundle.pos.tar.gz
and install it.
Npm Commands
npm run start
- Start the dev server;npm run serve
- Start a local http server;npm run build
- Build the production bundle;npm run build:dev
- Build the development bundle;npm run build:analyze
- Analyze the final bundle;npm run lint
- Lint all style and script files;npm run format
- Format all style and script files;