Reference
What is Dart - http://dartlang.orgDownload and Install IntelliJ Idea 12 - http://www.jetbrains.com/idea/download/index.html
Download and Install Dart SDK - http://www.dartlang.org/docs/sdk/
Download and Install Dartium - http://www.dartlang.org/dartium/
Sample Programs - https://code.google.com/p/dart/source/browse/#svn/trunk/dart/samples/hi
Launch IDE and Install Dart Plugin
- Ctrl + Shift + A & search plugin & navigate to Install plugins.
- Browse Repositories
- Search for Dart plugin.
- Download and Install Dart plugin.
- Restart IDE.
Launch IDE and Create Dart Web Project.
- Set up New Project of type Dart Web Application.
- Set up SDK Home Path.
- Ctrl + Shift + A and navigate to Default Web Browser.
- Set up default web browser to use Dartium browser.
Dart Code for Hi Dart
- Create a folder hi [this will have our dart code.]
- Create hi.dart class file in hi folder.
- Create hi.html file in hi folder.
- Launch hi.html using Open in Browser.
// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
library hi;
import 'dart:html';
main() {
query('#status').text = 'Hi, Dart';
}
<!DOCTYPE html>
<html>
<head>
<title>Hi Dart</title>
</head>
<body>
<h2 id="status">Waiting for Dart to start</h2>
<script type="application/dart" src="hi.dart"></script>
<!-- The preferred way to reference dart.js is to add a Pub dependency to
the 'browser' package and src 'packages/browser/dart.js'. -->
<script src="https://dart.googlecode.com/svn/branches/bleeding_edge/dart/pkg/browser/lib/dart.js"></script>
</body>
</html>




















Does this only work with Ultimate edition? Don't see such options in Community edition.
ReplyDeleteI believe the Dart plugin is available in Community Edition too.
ReplyDelete1. Go To Plugin Installation
2. Click "Install Jetbrains Plugins" at the bottom left corner of the "Plugins" window.
3. Search for "Dart" plugin in the top right corner search box.
4. "Dart" plugin will show up as Custom language plugin in the Plugin List pane at the center.