Skip to content

Commit 817673d

Browse files
Brendan GraetzBrendan Graetz
authored andcommitted
=BG= add getting started instructions && more detailed installation instructions
1 parent 2c12665 commit 817673d

File tree

2 files changed

+164
-18
lines changed

2 files changed

+164
-18
lines changed

getting-started/installation.md

Lines changed: 51 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -38,20 +38,54 @@ On windows you may have some difficulty and should follow the troubleshooting
3838
Be aware however that npm 2 has [**breaking changes**](http://blog.npmjs.org/post/98131109725/npm-2-0-0) for existing
3939
projects.
4040

41-
## Install Bower
42-
43-
Bower is a popular front end package manager that makes it easier to consume libraries for web development.
44-
45-
`npm install bower -g`
46-
47-
See more info on the [Bower website](http://bower.io).
48-
49-
## Install Angularity
50-
51-
Angularity is a **global** install.
52-
53-
`npm install angularity -g`
54-
55-
You are now ready to start an Angularity project.
56-
57-
[Project Setup ⟶](project-setup.md)
41+
## Installation
42+
43+
### Default
44+
45+
The default installation is fairly straightforward.
46+
Installing `npm` simply updates it,
47+
and Angularity expects bower to be available globally.
48+
49+
npm install -g npm bower angularity
50+
51+
### Latest
52+
53+
For those who wish to live on the bleeding edge,
54+
you will need to symlink the global npm package to
55+
somewhere.
56+
57+
Assuming `CODE` is a folder where you place your code checkouts,
58+
and `NODE` is a folder where NodeJs is installed
59+
60+
npm install -g npm bower angularity
61+
cd ${CODE}
62+
git clone [email protected]:angularity/node-angularity.git
63+
mv node-angularity angularity
64+
cd ${NODE}/lib/node_modules
65+
mv angularity angularity.backup
66+
ln -s ${CODE}/angularity angularity
67+
cd ${CODE}/angularity
68+
npm install
69+
70+
### Contributor
71+
72+
If you wish to develop or contribute to the Angularity project,
73+
set up your git checkout to do so.
74+
Firstly, fork the project on github:
75+
[https://github.com/angularity/node-angularity/fork](https://github.com/angularity/node-angularity/fork)
76+
77+
npm install -g npm bower angularity
78+
cd ${CODE}
79+
git clone [email protected]:${GITHUB_USERNAME}/node-angularity.git
80+
mv node-angularity angularity
81+
cd ${NODE}/lib/node_modules
82+
mv angularity angularity.backup
83+
ln -s ${CODE}/angularity angularity
84+
cd ${CODE}/angularity
85+
git remote add upstream [email protected]:angularity/node-angularity.git
86+
npm install
87+
88+
Be sure to keep your fork in sync with the main repository
89+
before you start working on any patch.
90+
This [how to on Github](https://help.github.com/articles/syncing-a-fork/)
91+
is most helpful.

getting-started/project-setup.md

Lines changed: 113 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,115 @@
11
# Project setup
22

3-
Documentation is coming soon.
3+
## Running angularity
4+
5+
Ensure that angularity has been installed correctly and is accessible from the command line:
6+
7+
which angularity
8+
#should output the path where it is located
9+
10+
If you wish to run angularity directly from the project folder,
11+
instead of from the command line after a global `npm` installation,
12+
you can do this instead:
13+
14+
cd angularity # where you have the project checked out
15+
node bin/cli.js
16+
17+
### `.angularity`
18+
19+
Upon your running angularity,
20+
you might encounter a warning that looks like this:
21+
22+
```bash
23+
Error validating .angularity field(s): serverHttpPort consoleWidth
24+
```
25+
26+
This is caused by a stale configuration file,
27+
you can choose to either edit the file to fix the values,
28+
or simply delete it and run angularity again:
29+
30+
```bash
31+
rm ${HOME}/.angularity
32+
angularity
33+
```
34+
35+
Upon which you should see the following output:
36+
37+
```bash
38+
default settings are being written to a global configuration.
39+
To change your defaults edit your /home/YOUR_USER_NAME/.angularity file
40+
```
41+
42+
## First run
43+
44+
You will be given some options to pick from when you run Angularity.
45+
On the very first run, it is advisable to choose
46+
47+
- `Install WebStorm Tools`.
48+
- Next pick `External Tools`.
49+
- Next pick `continue`
50+
51+
This makes makes the Webstorm IDE aware of
52+
a number of tasks exposed by Angularity.
53+
Be sure to completely quit Webstorm and open it again,
54+
if it is already running.
55+
56+
## Scaffold a new project
57+
58+
Angularity will generate a scaffold for a new project
59+
which can be opened in the Webstorm IDE.
60+
To do this, run Angularity from the command line,
61+
where you wish to create a project in a subdirectory
62+
of the current working directory.
63+
64+
```bash
65+
cd ${CODE}
66+
angularity
67+
```
68+
69+
- Pick `Generate Project`
70+
- Next, pick `minimal-es6`, if you wish to develop using ES6 Javascript
71+
- Or, pick `minimal-es5`, if you wish to develop using ES5 Javascript
72+
- Next, type the name of your project
73+
- Next, choose the directory where the project will be created,
74+
or accept the suggested one
75+
76+
Now wait for a while while dependencies are installed,
77+
and then Angularity should finish generating the project,
78+
and fire up the Webstorm IDE with this project opened.
79+
80+
## Webstorm tools
81+
82+
### Tools --> Angularity
83+
84+
This menu exposes certain tasks via a menu that you could run on the command line.
85+
It is simply a matter of convenience.
86+
87+
- build
88+
- build nominify
89+
- watch
90+
- watch nominify
91+
- release
92+
- test
93+
94+
### Debugging
95+
96+
There is no difference in debugging an Angularity app,
97+
from debugging other Javascript applications.
98+
The only thing that you should be aware of,
99+
is that minification doesn't lend itself well to debugging,
100+
especially for AngularJs apps.
101+
That is what Angularity provides the
102+
`build nominify` and `watch nominify` tasks for.
103+
104+
Here is a quick run down for those who have not used Webstorm debuigging before.
105+
106+
In the top right hand corner, there should be a green bug icon.
107+
Click this (or use the `Shift+F9` keyboard shortcut),
108+
to run the project in debug mode.
109+
110+
If this is the first time, you will need to install Jetbrains IDE Support plugin
111+
in your browser.
112+
Here is the [Chrome or Chromium plugin](https://chrome.google.com/webstore/detail/jetbrains-ide-support/hmhgeddbohgjknpmjagkdomcpobmllji)
113+
114+
Once installed, the browser should open, and display the default app.
115+

0 commit comments

Comments
 (0)