项目作者: stone-payments

项目描述 :
SDK for developing in the Mamba web environment
高级语言: JavaScript
项目地址: git://github.com/stone-payments/pos-mamba-sdk.git
创建时间: 2018-04-25T19:07:35Z
项目社区:https://github.com/stone-payments/pos-mamba-sdk

开源协议:Apache License 2.0

下载






The solution that turns a POS(point of Sale) into much more than payment!

Develop applications using only web technology, without worrying about the complications of the capabilities of a POS.




License @mamba/app"">npm package








✅ Requirements

Make sure all dependencies have been installed before moving on:

📦 Getting Started

With @mamba/cli

  1. # Install the mamba cli globally if doesn't already have it
  2. npm i -g @mamba/cli
  3. # Create a new mamba app at 'my-mamba-app' directory
  4. mamba new app my-mamba-app
  5. ? Name: My Mamba App
  6. ? Version: 0.0.1
  7. ? Description: My new Mamba app

Manually

  1. # Create and enter your new app directory
  2. mkdir my-mamba-app
  3. cd my-mamba-app
  4. # Install the standard mamba app template
  5. npx degit stone-payments/pos-mamba-app-template

⌨️ Development

Once you have completed the installation step, you are ready to start the project!

  1. cd my-mamba-app # Your project folder
  2. # Install its dependencies
  3. npm i
  4. # Run the development server
  5. npm run start

Open your browser and visit http://127.0.0.1:8080 , see more at Development.

🔨 Components usage

For Web Components, install the component / package that you want to use in the project:

  1. npm install @mamba/button # Button component
  2. # If you want to use the dialog component for example:
  3. npm install @mamba/dialog

To import the installed component, simply do one of the following:

  1. <script>
  2. import Button from '@mamba/button';
  3. export default {
  4. components: { Button }
  5. }
  6. </script>
  7. // or
  8. <script>
  9. export default {
  10. components: {
  11. Button: '@mamba/button'
  12. }
  13. }
  14. </script>

🧰 Commands

  • npm run lint - Lint all style and script files;
  • npm run format - Format all style and script files;
  • npm run link:packages - Create a local link of every package for local developing;
  • npm run test - Run all tests once;
  • npm run test:watch - Run all tests and keep watching for changes;
  • npm run release - Release a new version of the SDK;
  • lerna run x - Execute the x script in all packages;
  • lerna run start --scope=@mamba/component --stream - Run the dev server for a specific component;

Contributing

✏️ Commiting

Our commits follow the Conventional Commits standard:

<type>[optional scope]: <description>

By installing git-cz globally (npm i -g git-cz) it’s possible to use git cz instead of git commit for a interactive commit helper.