Skip to content

Commit 61b69c6

Browse files
yjbanovmhevery
authored andcommitted
docs(modules_dart): add README.md
Closes angular#1628
1 parent 09b39bf commit 61b69c6

File tree

1 file changed

+34
-0
lines changed

1 file changed

+34
-0
lines changed

modules_dart/README.md

+34
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
This directory contains pure Dart packages that use standard pub layout.
2+
3+
# Working with an existing package
4+
5+
1. Run `gulp build.dart`
6+
1. Open the package in any Dart IDE of your choice
7+
1. Tada!
8+
9+
You do not need to rerun step 1 if you are only making changes in
10+
`modules_dart`. However, you do need to run it again after you make a change
11+
in `modules`. This is because these packages depend on code inside the `dist`
12+
directory via `dependency_overrides`. Code in `modules` need to be transpiled
13+
into `dist` before the IDE can "feel" your changes in `modules`.
14+
15+
# Creating a new package
16+
17+
1. Create a new directory with its own `pubspec.yaml` and standard pub layout.
18+
1. Add both a normal dependency on `angular2` _and_ a `dependency_overrides`,
19+
like this:
20+
21+
```yaml
22+
version: 0.0.0
23+
dependencies:
24+
angular2: '0.0.0'
25+
dependency_overrides:
26+
angular2:
27+
path: ../../dist/dart/angular2
28+
```
29+
30+
The publishing script will automatically rewrite version numbers, so use
31+
`0.0.0` both for your package and `angular2` version. Similarly, do not
32+
include `authors` and `homepage`, as they will be auto-populated. However,
33+
do provide `description`, `name` (prefixed with `angular2_`), `dependencies`,
34+
and `dev_dependencies`.

0 commit comments

Comments
 (0)