From charlesreid1

No edit summary
 
(75 intermediate revisions by 2 users not shown)
Line 1: Line 1:
=Installing=
==Angular Projects on Github==


Getting up and running with Angular project on Digital Ocean droplet:
I have a couple of angular projects on Github.


==Setting Up Angular==
===Dang-Pelican-Barebones===


Following these instructions for getting environment set up: https://www.digitalocean.com/community/tutorials/how-to-install-node-js-on-an-ubuntu-14-04-server
This is a barebones, starting-point repository for creating projects that use Pelican to manage sites that have D3 and Angular components.


First, update repo to get a more up-to-date version of nodejs:
'''Bonus:''' This repository also contains a very clean, very simple Pelican theme.


<pre>
Github Pages site: http://charlesreid1.github.io/dang-pelican-barebones
curl -sL https://deb.nodesource.com/setup | sudo bash -
</pre>


<pre>
Github Repository: http://github.com/charlesreid1/dang-pelican-barebones
sudo apt-get install nodejs npm
</pre>


Next, install Java 7 or latest:
===Sea Budgets===


<pre>
This is a repository illustrating how to use dang-pelican-barebones, and extends its capabilities to cover iPython Notebooks. It uses the simple theme from the dang-pelican-barebones repository.
sudo apt-get install java7-jdk java7-sdk
</pre>


Following these instructions for putting everything else into place for Angular: https://docs.angularjs.org/misc/contribute
Github repository: https://github.com/charlesreid1/sea-budgets


Install grunt:
Github Pages site: http://charlesreid1.github.io/sea-budgets/


<pre>
===dang sunburst===
sudo npm install -g grunt-cli
</pre>


Install bower:
Using dang-pelican-barebones to explore D3 sunburst charts:


<pre>
Github repository: http://github.com/charlesreid1/dang-sunburst/
sudo npm install -g bower
</pre>


==Building Angular==
Github Pages site: http://charlesreid1.github.io/dang-sunburst/


Fork Angular, if you want, or just get it: https://github.com/angular/angular.js
===dang bars===


Then clone it on the droplet:
Exploring D3 bar graphs using dang-pelican-barebones


<pre>
Github repository: https://github.com/charlesreid1/dang-bars
git clone https://github.com/angular/angular.js
</pre>


Now install some stuff:
Github Pages site: http://charlesreid1.github.io/dang-bars/


<pre>
==Older But Still Useful Repositories==
cd angular.js/


# install node dependencies
===A Shrubbery===
npm install


# install bower components:
A Shrubbery is a repository that uses Angular to manage combined maps and D3 graphs. Like Archimedes Pelican, this does not implement a new Pelican theme from scratch, but rather uses a pared-down (and less simple) version of the default.
bower install


# build angular.js
Github Pages link: http://charlesreid1.github.io/a-shrubbery/
grunt package
</pre>


This will drop a bunch of stuff into the <code>build/</code> directory.  
Github repository: https://github.com/charlesreid1/a-shrubbery


* angular-version.zip - zip file containing all release build artifacts
===Archimedes Pelican===
* angular.js - non-minified angular script
* angular.min.js - minified angular script
* angular-scenario.js - end to end test runner
* docs/ - files needed to run docs.angularjs.org


==Test it out==
This is a repository that demonstrates the use of Pelican to manage sites that have Javascript components, specifically D3 and Angular.


You can run a webserver with bower, but I prefer python:
This repository was created first, so the theme was just a stripped down version of the default, and therefore less simple than the dang-pelican-barebones repository.


<pre>
Github Pages site: http://charlesreid1.github.io/archimedes-pelican/
# run from angular.js/
python -m SimpleHTTPServer 8000
</pre>


Now check out <code>http://localhost:8000/build/docs</code>
Github repository: http://github.com/charlesreid1/archimedes-pelican


==Errors==
=References=


I ran into these errors when I ran <code>npm install</code> from <code>angular.js/</code>:
[[Category:Javascript]]
 
[[Category:Github]]
<pre>
[[Category:Angular]]
$ npm install
npm ERR! fetch failed https://registry.npmjs.org/lodash.template/-/lodash.template-3.3.0.tgz
npm ERR! fetch failed https://registry.npmjs.org/dependency-graph/-/dependency-graph-0.1.0.tgz
npm ERR! fetch failed https://registry.npmjs.org/resolve/-/resolve-1.0.0.tgz
npm ERR! fetch failed https://registry.npmjs.org/setimmediate/-/setimmediate-1.0.2.tgz
npm ERR! fetch failed https://registry.npmjs.org/rimraf/-/rimraf-2.2.8.tgz
npm ERR! fetch failed https://registry.npmjs.org/minimatch/-/minimatch-2.0.1.tgz
npm ERR! fetch failed https://registry.npmjs.org/vargs/-/vargs-0.1.0.tgz
npm WARN optional dep failed, continuing fsevents@0.2.1
npm ERR! fetch failed https://registry.npmjs.org/lodash._slice/-/lodash._slice-2.4.1.tgz
npm ERR! fetch failed https://registry.npmjs.org/dependency-graph/-/dependency-graph-0.1.0.tgz
npm WARN engine hawk@0.10.2: wanted: {"node":"0.8.x"} (current: {"node":"0.10.38","npm":"1.4.28"})
npm ERR! fetch failed https://registry.npmjs.org/hawk/-/hawk-1.0.0.tgz
npm ERR! fetch failed https://registry.npmjs.org/anymatch/-/anymatch-1.1.0.tgz
npm WARN engine cryptiles@0.1.3: wanted: {"node":"0.8.x"} (current: {"node":"0.10.38","npm":"1.4.28"})
npm WARN engine sntp@0.1.4: wanted: {"node":"0.8.x"} (current: {"node":"0.10.38","npm":"1.4.28"})
npm WARN engine boom@0.3.8: wanted: {"node":"0.8.x"} (current: {"node":"0.10.38","npm":"1.4.28"})
npm WARN engine hoek@0.7.6: wanted: {"node":"0.8.x"} (current: {"node":"0.10.38","npm":"1.4.28"})
 
> ws@0.5.0 install /home/charles/codes/angular.js/node_modules/karma/node_modules/socket.io/node_modules/engine.io/node_modules/ws
> (node-gyp rebuild 2> builderror.log) || (exit 0)
 
make: Entering directory `/home/charles/codes/angular.js/node_modules/karma/node_modules/socket.io/node_modules/engine.io/node_modules/ws/build'
  CXX(target) Release/obj.target/bufferutil/src/bufferutil.o
  SOLINK_MODULE(target) Release/obj.target/bufferutil.node
  SOLINK_MODULE(target) Release/obj.target/bufferutil.node: Finished
  COPY Release/bufferutil.node
  CXX(target) Release/obj.target/validation/src/validation.o
  SOLINK_MODULE(target) Release/obj.target/validation.node
  SOLINK_MODULE(target) Release/obj.target/validation.node: Finished
  COPY Release/validation.node
make: Leaving directory `/home/charles/codes/angular.js/node_modules/karma/node_modules/socket.io/node_modules/engine.io/node_modules/ws/build'
npm WARN optional dep failed, continuing fsevents@0.3.5
npm ERR! fetch failed https://registry.npmjs.org/mime-db/-/mime-db-1.7.0.tgz
npm ERR! fetch failed https://registry.npmjs.org/lodash._basecreate/-/lodash._basecreate-2.4.1.tgz
npm ERR! fetch failed https://registry.npmjs.org/browser-resolve/-/browser-resolve-1.7.0.tgz
npm ERR! fetch failed https://registry.npmjs.org/tmp/-/tmp-0.0.24.tgz
npm ERR! fetch failed https://registry.npmjs.org/dependency-graph/-/dependency-graph-0.1.0.tgz
npm ERR! fetch failed https://registry.npmjs.org/browser-resolve/-/browser-resolve-1.7.0.tgz
npm ERR! fetch failed https://registry.npmjs.org/tmp/-/tmp-0.0.24.tgz
npm ERR! fetch failed https://registry.npmjs.org/bn.js/-/bn.js-1.3.0.tgz
 
> ws@0.4.31 install /home/charles/codes/angular.js/node_modules/karma/node_modules/socket.io/node_modules/socket.io-client/node_modules/engine.io-client/node_modules/ws
> (node-gyp rebuild 2> builderror.log) || (exit 0)
 
make: Entering directory `/home/charles/codes/angular.js/node_modules/karma/node_modules/socket.io/node_modules/socket.io-client/node_modules/engine.io-client/node_modules/ws/build'
  CXX(target) Release/obj.target/bufferutil/src/bufferutil.o
  SOLINK_MODULE(target) Release/obj.target/bufferutil.node
  SOLINK_MODULE(target) Release/obj.target/bufferutil.node: Finished
  COPY Release/bufferutil.node
  CXX(target) Release/obj.target/validation/src/validation.o
  SOLINK_MODULE(target) Release/obj.target/validation.node
  SOLINK_MODULE(target) Release/obj.target/validation.node: Finished
  COPY Release/validation.node
make: Leaving directory `/home/charles/codes/angular.js/node_modules/karma/node_modules/socket.io/node_modules/socket.io-client/node_modules/engine.io-client/node_modules/ws/build'
 
> utf-8-validate@1.0.1 install /home/charles/codes/angular.js/node_modules/protractor/node_modules/selenium-webdriver/node_modules/ws/node_modules/utf-8-validate
> node-gyp rebuild
 
make: Entering directory `/home/charles/codes/angular.js/node_modules/protractor/node_modules/selenium-webdriver/node_modules/ws/node_modules/utf-8-validate/build'
  CXX(target) Release/obj.target/validation/src/validation.o
  SOLINK_MODULE(target) Release/obj.target/validation.node
  SOLINK_MODULE(target) Release/obj.target/validation.node: Finished
  COPY Release/validation.node
make: Leaving directory `/home/charles/codes/angular.js/node_modules/protractor/node_modules/selenium-webdriver/node_modules/ws/node_modules/utf-8-validate/build'
 
> bufferutil@1.0.1 install /home/charles/codes/angular.js/node_modules/protractor/node_modules/selenium-webdriver/node_modules/ws/node_modules/bufferutil
> node-gyp rebuild
 
make: Entering directory `/home/charles/codes/angular.js/node_modules/protractor/node_modules/selenium-webdriver/node_modules/ws/node_modules/bufferutil/build'
  CXX(target) Release/obj.target/bufferutil/src/bufferutil.o
  SOLINK_MODULE(target) Release/obj.target/bufferutil.node
  SOLINK_MODULE(target) Release/obj.target/bufferutil.node: Finished
  COPY Release/bufferutil.node
make: Leaving directory `/home/charles/codes/angular.js/node_modules/protractor/node_modules/selenium-webdriver/node_modules/ws/node_modules/bufferutil/build'
npm ERR! cb() never called!
npm ERR! not ok code 0
</pre>
 
the solution was to run as sudo:
 
<pre>
$ sudo npm install
npm WARN unmet dependency /home/charles/codes/angular.js/node_modules/dgeni requires q@'~0.9.7' but will load
npm WARN unmet dependency /home/charles/codes/angular.js/node_modules/q,
npm WARN unmet dependency which is version 1.0.1
</pre>

Latest revision as of 09:30, 16 April 2017

Angular Projects on Github

I have a couple of angular projects on Github.

Dang-Pelican-Barebones

This is a barebones, starting-point repository for creating projects that use Pelican to manage sites that have D3 and Angular components.

Bonus: This repository also contains a very clean, very simple Pelican theme.

Github Pages site: http://charlesreid1.github.io/dang-pelican-barebones

Github Repository: http://github.com/charlesreid1/dang-pelican-barebones

Sea Budgets

This is a repository illustrating how to use dang-pelican-barebones, and extends its capabilities to cover iPython Notebooks. It uses the simple theme from the dang-pelican-barebones repository.

Github repository: https://github.com/charlesreid1/sea-budgets

Github Pages site: http://charlesreid1.github.io/sea-budgets/

dang sunburst

Using dang-pelican-barebones to explore D3 sunburst charts:

Github repository: http://github.com/charlesreid1/dang-sunburst/

Github Pages site: http://charlesreid1.github.io/dang-sunburst/

dang bars

Exploring D3 bar graphs using dang-pelican-barebones

Github repository: https://github.com/charlesreid1/dang-bars

Github Pages site: http://charlesreid1.github.io/dang-bars/

Older But Still Useful Repositories

A Shrubbery

A Shrubbery is a repository that uses Angular to manage combined maps and D3 graphs. Like Archimedes Pelican, this does not implement a new Pelican theme from scratch, but rather uses a pared-down (and less simple) version of the default.

Github Pages link: http://charlesreid1.github.io/a-shrubbery/

Github repository: https://github.com/charlesreid1/a-shrubbery

Archimedes Pelican

This is a repository that demonstrates the use of Pelican to manage sites that have Javascript components, specifically D3 and Angular.

This repository was created first, so the theme was just a stripped down version of the default, and therefore less simple than the dang-pelican-barebones repository.

Github Pages site: http://charlesreid1.github.io/archimedes-pelican/

Github repository: http://github.com/charlesreid1/archimedes-pelican

References