Skip to content

Commit a163f44

Browse files
committed
Merge pull request #4 from bguiz/feature/getting-started
=BG= add getting started instructions && more detailed installation instructions
2 parents b0d726d + 9e9a500 commit a163f44

File tree

6 files changed

+215
-75
lines changed

6 files changed

+215
-75
lines changed

about/intro.md

Lines changed: 18 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -2,72 +2,54 @@
22

33
Angularity is a philosophy of development.
44

5-
Our focus is maintaining uniformity of development across groups of corporate developers who hold varying experience levels.
5+
Our focus is maintaining uniformity of development across groups of developers who hold varying experience levels.
66

7-
Our contributors hold a collective vision of best-practice Angular-js development and have condensed this into a set of tools and resources known as **Angularity**.
7+
Our contributors hold a collective vision of best-practice AngularJS development and have condensed this into a set of tools and resources known as **Angularity**.
88

99
## Features
1010

11-
Primarily Angularity is a javascript build tool build on [`node-js`](http://nodejs.org/). Its features include:
11+
Primarily Angularity is a [`node.js`](http://nodejs.org/) build tool. Its features include:
1212

1313
* Single `npm global install` for all projects.
14-
15-
* [`Ecmascript-6`](http://en.wikipedia.org/wiki/ECMAScript#ECMAScript_Harmony_.286th_Edition.29) syntax (using [`es6ify`](http://thlorenz.github.io/es6ify/)). Code import and ES-6 specific features.
16-
14+
* [`ECMAScript 6`](http://en.wikipedia.org/wiki/ECMAScript#ECMAScript_Harmony_.286th_Edition.29) syntax (using [`es6ify`](http://thlorenz.github.io/es6ify/)), including code import and other ES6 specific features.
1715
* [`jsHint`](http://www.jshint.com/about/) linting.
18-
1916
* [`SASS`](http://sass-lang.com/) 3.2 (using [`libsass`](http://libsass.org/)).
20-
2117
* [`Bourbon`](http://bourbon.io/) mixin library for SASS.
22-
2318
* [`Bower`](http://bower.io/) for web dependencies.
24-
2519
* Bower or node packages for shared code.
26-
2720
* Javascript unit testing (using [`Karma`](http://karma-runner.github.io/0.12/index.html) and [`Jasmine 2.0`](http://jasmine.github.io/2.0/introduction.html)).
28-
29-
* Sourcemaps for javascript (from Ecmascript-6 through minification).
30-
31-
* Sourcemaps for CSS.
32-
21+
* Source maps for Javascript (from ECMAScript 6 through minification).
22+
* Source maps for CSS.
3323
* Release versioning *[experimental]*.
3424

35-
At its heart, none of these features are specifically tied to [`Angular-js`](https://angularjs.org/). However much of the material you will find on this site is geared to Angular development.
25+
At its heart, none of these features are specifically tied to [`AngularJS`](https://angularjs.org/). However much of the material you will find on this site is geared to Angular development.
3626

3727
## Suitability
3828

39-
### You should use *angularity* when...
29+
### You should use *Angularity* when...
4030

4131
* You have several development teams and need uniformity of development.
42-
43-
* You develop with [`Angular-js`](https://angularjs.org/) and are open to working with [`Ecmascript-6`](http://en.wikipedia.org/wiki/ECMAScript#ECMAScript_Harmony_.286th_Edition.29), especially ES-6 Classes.
44-
32+
* You develop with [`AngularJS`](https://angularjs.org/) and are open to working with [`ECMAScript 6`](http://en.wikipedia.org/wiki/ECMAScript#ECMAScript_Harmony_.286th_Edition.29), especially ES6 Classes.
4533
* You use [`SASS`](http://sass-lang.com/), or are prepared to switch, and there are sufficient SASS mixins for you in the [`Bourbon`](http://bourbon.io/) library.
46-
47-
* You intend to `minify` or obfuscate your javascript.
48-
34+
* You intend to minify or obfuscate your Javascript.
4935
* You deploy to a [`Content Delivery Network (CDN)`](http://en.wikipedia.org/wiki/Content_delivery_network) and need to version your releases.
50-
51-
* You your browser support list permits [`Ecmascript 5.1`](http://kangax.github.io/compat-table/es5/).
52-
36+
* You your browser support list permits [`ECMAScript 5.1`](http://kangax.github.io/compat-table/es5/).
5337
* You would like your build tool to be an `npm global install`.
5438

55-
### You should avoid *angularity* when...
56-
57-
* You don't want to work with [`Ecmascript-6`](http://en.wikipedia.org/wiki/ECMAScript#ECMAScript_Harmony_.286th_Edition.29), are avoiding [`Traceur`](https://github.com/google/traceur-compiler) and its runtime, and can live without Object Orientated code.
39+
### You should avoid *Angularity* when...
5840

41+
* You don't want to work with [`ECMAScript 6`](http://en.wikipedia.org/wiki/ECMAScript#ECMAScript_Harmony_.286th_Edition.29), are avoiding [`Traceur`](https://github.com/google/traceur-compiler) and its runtime, and can live without Object Orientated code.
5942
* You want to use a CSS preprocessor other than [`SASS`](http://sass-lang.com/).
60-
6143
* You would like to use [`Compass`](http://compass-style.org/) with your SASS.
62-
6344
* You need to support [`PhantomJS`](http://phantomjs.org/) 1.x, `Internet Exporer 8` or lower.
6445

65-
### You should fork *angularity* when...
46+
### You should fork *Angularity* when...
6647

6748
* You want different build steps to those provided.
68-
6949
* You want features that are not on our roadmap.
7050

71-
Angularity is about uniformity. Per-project customisation is very small. If you develop a wide variety of applications you may ultimately find a conventional build (with something like [`Gulp`](http://gulpjs.com/)) will work better for you.
51+
Angularity is about uniformity.
52+
Per-project customisation should be minimal.
53+
If you develop a wide variety of applications you may ultimately find a conventional build (with something like [`Gulp`](http://gulpjs.com/)) will work better for you.
7254

73-
[Roadmap ⟶](roadmap.md)
55+
[Roadmap ⟶](roadmap.md)

about/roadmap.md

Lines changed: 4 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -7,45 +7,32 @@ Regarding `documentation`.
77
The following items are listed in priority order but will necessarily be completed before version 1.0.0 release of the build tool.
88

99
* Getting started guide.
10-
1110
* Troubleshooting guide.
12-
1311
* Quick reference for development style, including comparison of ES5 and ES6 use cases.
14-
1512
* Manual for the build tool, including how it works.
1613

1714
## Build tool
1815

19-
Regarding `node-angularity`, the angularity build tool.
16+
Regarding `node-angularity`, the Angularity build tool.
2017

2118
### Version 1.0.0
2219

23-
* Ecmascript-5 development using `common-js` syntax *[Under consideration]*.
24-
20+
* ECMAScript 5 development using `common-js` syntax *[Under consideration]*.
2521
* Per-project configuration of `Karma` browser list and other selected unit testing settings.
26-
2722
* Refinement of release versioning, including per-project `CDN` settings.
28-
2923
* Generation of an `index.aspx` page in the release bundle and potentially other hooks to easily deploy on .NET systems.
3024

3125
### Version 1.x.0
3226

3327
* Build blocking on `js-hint` *[Under consideration]*.
34-
3528
* Generation of API documentation using [`JSdoc`](https://github.com/jsdoc3/jsdoc).
36-
3729
* Incremental compilation.
38-
39-
* Basic or experiemental support for [`Protractor`](https://docs.angularjs.org/guide/e2e-testing) end-to-end testing with local server or [`SauceLabs`](https://saucelabs.com/).
40-
30+
* Basic or experimental support for [`Protractor`](https://docs.angularjs.org/guide/e2e-testing) end-to-end testing with local server or [`SauceLabs`](https://saucelabs.com/).
4131
* Continuous Integration (`CI`) testing for the system itself *[Under consideration]*.
4232

4333
### Version 2.x.0
4434

4535
* `Karma` testing with [`PhantomJS 2.0`](http://ariya.ofilabs.com/2014/07/towards-phantomjs-2.html).
46-
4736
* Enhanced code-style enforcement using [`eslint (v0.10.0)`](https://github.com/eslint/eslint/wiki/Release-goals#v0100).
48-
4937
* Full support for [`Protractor`](https://docs.angularjs.org/guide/e2e-testing) with private [`Grid2`](https://code.google.com/p/selenium/wiki/Grid2) solution.
50-
51-
* Test console (HTML page) with real-time red/green indication for your unit tests *[under consideration]*.
38+
* Test console (HTML page) with real-time red/green indication for your unit tests *[under consideration]*.

getting-started/installation.md

Lines changed: 68 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -13,11 +13,11 @@ On **Windows** platform choose to **checkout Windows-style, commit Unit-style**
1313
[![](installation-git-1.png)]()
1414
[![](installation-git-2.png)]()
1515

16-
## Install node
16+
## Install node.js
1717

1818
[`http://nodejs.org/download/`](http://nodejs.org/download/)
1919

20-
Ensure that you choose the correct binary for your system. Meaning that 64bit systems should choose the 64bit binary.
20+
Ensure that you choose the correct binary for your system. Meaning that 64 bit systems should choose the 64 bit binary.
2121

2222
[![](installation-node.png)]()
2323

@@ -30,28 +30,84 @@ to reboot. Once you can see node in the console `echo %PATH%` then you are ready
3030

3131
Unless you just installed `node` you may be running npm older than **npm 2.0.0**. In that case it is worth updating.
3232

33-
`npm install npm -g`.
33+
npm install -g npm
3434

3535
On windows you may have some difficulty and should follow the troubleshooting
3636
[instructions](https://github.com/npm/npm/wiki/Troubleshooting#upgrading-on-windows) from the outset.
3737

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
41+
## Installation
4242

43-
Bower is a popular Frontend package manager that makes it easier to consume libraries for web development.
43+
You will need to install bower, and update npm.
4444

45-
`npm install bower -g`
45+
npm install -g bower
46+
npm install -g npm
4647

47-
See more info on the [Bower website](http://bower.io).
48+
Next, we will install angularity.
49+
Decide whether you wish to use the last stable release,
50+
the latest commit,
51+
and if you wish to contribute to the project,
52+
and follow the appropriate set of instructions below.
4853

49-
## Install angularity
54+
### Stable
5055

51-
Angularity is a **global** install.
56+
The default installation is fairly straightforward.
57+
Installing `npm` simply updates it,
58+
and Angularity expects bower to be available globally.
5259

53-
`npm install angularity -g`
60+
npm install -g angularity
5461

55-
You are now ready to start an angularity project.
62+
If you wish to install a particular release of angularity,
63+
you can install from github instead of the npm registry, like so:
5664

57-
[Project Setup ⟶](project-setup.md)
65+
npm install -g angularity/node-angularity#0.0.18
66+
67+
(replace `0.0.18` with the tag you wish to use)
68+
69+
### Latest
70+
71+
For those who wish to live on the bleeding edge,
72+
you will need to symlink the global npm package to
73+
somewhere.
74+
75+
Assuming `CODE` is a folder where you place your code checkouts,
76+
and `NODE` is a folder where NodeJs is installed
77+
78+
npm install -g angularity
79+
cd ${CODE}
80+
git clone [email protected]:angularity/node-angularity.git
81+
mv node-angularity angularity
82+
cd ${NODE}/lib/node_modules
83+
mv angularity angularity.backup
84+
ln -s ${CODE}/angularity angularity
85+
cd ${CODE}/angularity
86+
npm install
87+
88+
### Contributor
89+
90+
If you wish to develop or contribute to the Angularity project,
91+
set up your git checkout to do so.
92+
93+
Firstly, fork the project on github:
94+
[https://github.com/angularity/node-angularity/fork](https://github.com/angularity/node-angularity/fork)
95+
96+
Then run these commands to clone your forked repository,
97+
and then link it from NodeJs' global folder.
98+
99+
npm install -g angularity
100+
cd ${CODE}
101+
git clone [email protected]:${GITHUB_USERNAME}/node-angularity.git
102+
mv node-angularity angularity
103+
cd ${NODE}/lib/node_modules
104+
mv angularity angularity.backup
105+
ln -s ${CODE}/angularity angularity
106+
cd ${CODE}/angularity
107+
git remote add upstream [email protected]:angularity/node-angularity.git
108+
npm install
109+
110+
Be sure to keep your fork in sync with the main repository
111+
before you start working on any patch.
112+
This [how to on Github](https://help.github.com/articles/syncing-a-fork/)
113+
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 will be forthcomming 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` config
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)