To install Dart Editor, follow instruction at http://www.dartlang.org/docs/editor/getting-started/.
Important : For Ubuntu 64 bits users, open Terminal and execute the following lines :
wget https://launchpad.net/~jcollins/+archive/jaminppa/+build/1482994/+files/getlibs_2.06-0ubuntu1%7Eppa2_all.deb
sudo dpkg -i getlibs_2.06-0ubuntu1~ppa2_all.deb
sudo getlibs -p libgconf2-4
LD_LIBRARY_PATH=/usr/lib32
sudo ldconfig
In some cases, you might need to follow additionnal steps (to be tested on a freshly installed Ubuntu) :
- installing ia32/i386 libs
sudo apt-get install ia32-libs
- following instructions at http://code.google.com/p/dart/wiki/PreparingYourMachine#Linux.
In the same folder put :
- dart : the workspace directory
- papori : the papori project
- dart-editor : the dart editor directory
- ...
Open a terminal, and change the current directory to the workspace directory, "dart". Then retrieve it from Github :
git clone https://github.com/Sfeir/papori
Set the DART_SDK variable to the dart SDK path (add a line to ~/.pam_environment) :
DART_SDK=~/dart-editor/dart-sdk
Then change the current directory, to the project folder :
cd ~/dart/papori
And retrieve external packages, using the package manager :
$DART_SDK/bin/pub install --sdkdir=$DART_SDK
In the dart Editor, set the packages directory : "Tools" > "Preferences" > "Editor" and in "Package directory" browse to ~/dart/papori/packages/. Don't forget the last slash !
- run the server : right click on server.dart file, and select "Run".
- open dartium : right click on Papori.html file, and select "Run".
- change the url to http://localhost:8080.
Open a terminal, and change the current directory to the papori project directory, ~/dart/papori.
$DART_SDK/bin/pub install --sdkdir=$DART_SDK
Prerequisites :
- having SVN installed
- having dart SDK installed (we assume next that {dart-sdk} folder is where it is installed)
Preparation :
- Run
svn checkout http://dart.googlecode.com/svn/branches/bleeding_edge/dart/utils
in the {dart-sdk}/lib folder - Make sure that $DART_SDK/bin is in your environnement path
For Ubuntu user, goto ~/.pam_environment (hidden file) and add the following lines at the end of the file :
PATH="$DART_SDK/bin:$PATH"
- Make sure that $DART_SDK/lib/utils/template is in your environnement path
For Ubuntu user, goto ~/.pam_environment (hidden file) and add the following lines at the end of the file :
PATH="$DART_SDK/lib/utils/template:$PATH"
Compilation :
- Create a template file with .tmpl extension (i.e. myTemplate.tmpl)
- With a terminal, go to the folder where the template file is
- Run the following command :
template myTemplate.tmpl
- The dart file will be generated in the same folder.
Useful link :
- http://blog.sethladd.com/2012/03/first-look-at-darts-html-template.html
- http://blog.sethladd.com/2012/03/dart-templates-now-allow-nesting.html
- http://japhr.blogspot.fr/2012/03/dart-templates-bleeding-edge.html
- Dart API Reference : http://api.dartlang.org/
- A Tour of the Dart Language : http://www.dartlang.org/docs/language-tour/
- Unit testing : http://api.dartlang.org/unittest.html
- Using Dart with JSON Web Services : http://www.dartlang.org/articles/json-web-service/