Git Product home page Git Product logo

dart's Introduction

Spine Dart

Components for developing Dart client-side applications based on Spine.

Prerequisites

  1. JDK 1.8.
  2. Dart SDK or Flutter SDK.

How to configure pub

pub is a Dart package manager that is used by both Dart itself and Flutter.

In order to be able to compile Protobuf messages into Dart code, one must configure the Dart Protoc plugin available for install via pub. Please follow the steps below to configure the plugin.

With Dart SDK

If you're using Dart SDK, please execute the following steps to configure your local Path environment variable if not yet configured.

In the snippets it is assumed that you have the Dart SDK installed at the ~/.dart folder.

  1. Define DART_HOME environment variable as follows:

    export DART_HOME="~/.dart"
    export PATH="$DART_HOME/bin:$PATH"
  2. Define PUB_CACHE environment variable as follows:

    The Pub cache may be available either in the user home directory or in the Dart SDK home directory.

    export PUB_CACHE="~/.dart/.pub_cache"
    export PATH="$PUB_CACHE/bin:$PATH"

You may want to add the above snippet to your .bashrc or .zshrc files in order to have the Dart in available all the time.

  1. Activate Dart Protoc plugin by running the following command.

    pub global activate protoc_plugin

With Flutter SDK

If you're using Flutter SDK, please execute the following steps to configure your local Path environment variable if not yet configured.

In the snippets it is assumed that you have the Flutter SDK installed at the ~/.flutter folder.

  1. Define FLUTTER_HOME environment variable as follows:

    export FLUTTER_HOME="~/.flutter"
    export PATH="$FLUTTER_HOME/bin:$PATH"
  2. Define PUB_CACHE environment variable as follows:

    The Pub cache may be available either in the user home directory or in the Dart SDK home directory.

    export PUB_CACHE="~/.flutter/.pub_cache"
    export PATH="$PUB_CACHE/bin:$PATH"
  3. Create pub alias.

    By default, flutter provides its own pub reference available with flutter pub command, but the tooling is expecting pub to be available.

    alias pub="flutter pub"

    On Windows, you may create a pub.bat script with the following content and store it under ${FLUTTER_HOME}/bin folder:

    @ECHO OFF
    echo.
    flutter pub %*

You may want to add the above snippets to your .bashrc or .zshrc files in order to have the Dart in available all the time.

  1. Activate Dart Protoc plugin by running the following command.

    flutter pub global activate protoc_plugin

dart's People

Contributors

dmdashenkov avatar dmitrykuzmin avatar yuri-sergiichuk avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.