532 tutoriels disponibles
Chercher un tutoriel
Bienvenue
sur Shareannonce
 
Dart installation on UBuntu
Ecrit par: Shareannonce
Date création:  13-03-2019
Nombre de vues:  586
Catégorie:  informatique > developpement > linux
Note: 
 
   Tutoriel N° 2d0

Dart installation on UBuntu


shareannonce@shareannonce:~$ nano dart_install.sh

#!/bin/bash
sudo apt-get update -y
sudo apt-get install apt-transport-https
sudo sh -c 'curl https://dl-ssl.google.com/linux/linux_signing_key.pub | apt-key add -'

sudo sh -c 'curl https://storage.googleapis.com/download.dartlang.org/linux/debian/dart_stable.list > /etc/apt/sources.list.d/dart_stable.list'

sudo apt-get update -y
sudo apt-get install dart -y
sudo ln -s /usr/lib/dart/bin/pub /usr/bin/pub
sudo ln -s /usr/lib/dart/bin/dart2js /usr/bin/dart2js
pub global activate webdev
pub global activate stagehand
echo 'export PATH=$PATH:/usr/lib/dart/bin' >> /home/$USER/.profile
echo 'export PATH=$PATH:~/.pub-cache/bin' >> /home/$USER/.profile
mkdir /home/$USER/quickstart && cd /home/$USER/quickstart && ~/.pub-cache/bin/stagehand web-simple
pub get


shareannonce@shareannonce:~$ sh dart_install.sh

shareannonce@shareannonce:~$ cd /home/$USER/quickstart && ~/.pub-cache/bin/webdev serve

Open your browser and go to: http://localhost:8080/




Notes:

1/ You need to be in the folder quickstart to launch webdev serve
2/ After restart your session, you could launch it with: cd /home/$USER/quickstart && webdev serve


source: https://webdev.dartlang.org/guides/get-started


 
 
   Autres tutoriels de la même catégorie >
 
ShareAnnonce version 2.0 Tous droits reserves. | Condition d'utilisation | Contact