|
|
| (47 intermediate revisions by 2 users not shown) |
| Line 1: |
Line 1: |
| =Installing: First Try= | | ==Angular Projects on Github== |
|
| |
|
| The first try with node.js from aptitude: [[Angular/FirstTry]]
| | I have a couple of angular projects on Github. |
|
| |
|
| =Installing: Trying Again= | | ===Dang-Pelican-Barebones=== |
|
| |
|
| This documentation is worthless. | | This is a barebones, starting-point repository for creating projects that use Pelican to manage sites that have D3 and Angular components. |
|
| |
|
| The second try with node from aptitude: [[Angular/SecondTry]]
| | '''Bonus:''' This repository also contains a very clean, very simple Pelican theme. |
|
| |
|
| =Installing: Third Try=
| | Github Pages site: http://charlesreid1.github.io/dang-pelican-barebones |
|
| |
|
| ==Install node with nvm==
| | Github Repository: http://github.com/charlesreid1/dang-pelican-barebones |
|
| |
|
| Use nvm
| | ===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. |
| git clone https://github.com/creationix/nvm.git ~/.nvm
| |
| echo "source ~/.nvm/nvm.sh" >> .bashrc
| |
| nvm ls-remote
| |
| nvm install -s v0.11.16
| |
| nvm alias default 0.11.16
| |
| </pre>
| |
|
| |
|
| test:
| | Github repository: https://github.com/charlesreid1/sea-budgets |
|
| |
|
| <pre>
| | Github Pages site: http://charlesreid1.github.io/sea-budgets/ |
| node -v && npm -v
| |
| </pre>
| |
|
| |
|
| ==Install grunt and bower== | | ===dang sunburst=== |
|
| |
|
| Now install grunt and bower:
| | Using dang-pelican-barebones to explore D3 sunburst charts: |
|
| |
|
| <pre>
| | Github repository: http://github.com/charlesreid1/dang-sunburst/ |
| npm install -g grunt-cli
| |
| npm install -g bower
| |
| </pre>
| |
|
| |
|
| but this time, when you need to use them, use the link command [https://www.digitalocean.com/community/tutorials/how-to-install-node-js-on-an-ubuntu-14-04-server]:
| | Github Pages site: http://charlesreid1.github.io/dang-sunburst/ |
|
| |
|
| <pre>
| | ===dang bars=== |
| npm link grunt-cli
| |
| npm link bower
| |
| </pre>
| |
|
| |
|
| ==Get Angular==
| | 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>
| |
|
| |
|
| ==Build Angular==
| | Github Pages site: http://charlesreid1.github.io/dang-bars/ |
|
| |
|
| Change dir and link to node modules:
| | ==Older But Still Useful Repositories== |
|
| |
|
| <pre>
| | ===A Shrubbery=== |
| cd angular.js/
| |
| </pre>
| |
|
| |
|
| First, link grunt
| | 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. |
|
| |
|
| <pre>
| | Github Pages link: http://charlesreid1.github.io/a-shrubbery/ |
| npm link grunt-cli
| |
| </pre>
| |
|
| |
|
| which returns:
| | Github repository: https://github.com/charlesreid1/a-shrubbery |
|
| |
|
| <pre>
| | ===Archimedes Pelican=== |
| $ npm link grunt-cli
| |
| unbuild grunt-cli@0.1.13
| |
| npm WARN prefer global grunt-cli@0.1.13 should be installed with -g
| |
| /home/charles/codes/angular.js/node_modules/grunt-cli -> /home/charles/.nvm/v0.11.16/lib/node_modules/grunt-cli
| |
| </pre>
| |
|
| |
|
| I DID install grunt-cli with -g. Don't know what this thing is talking about.
| | This is a repository that demonstrates the use of Pelican to manage sites that have Javascript components, specifically D3 and Angular. |
|
| |
|
| Next, bower:
| | 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/ |
| npm link bower
| |
| </pre>
| |
|
| |
|
| and the same damn error:
| | Github repository: http://github.com/charlesreid1/archimedes-pelican |
|
| |
|
| <pre>
| | =References= |
| $ npm link bower
| |
| npm WARN prefer global bower@1.3.12 should be installed with -g
| |
| /home/charles/codes/angular.js/node_modules/bower -> /home/charles/.nvm/v0.11.16/lib/node_modules/bower
| |
| </pre>
| |
|
| |
|
| ==Build/Install/Package==
| | [[Category:Javascript]] |
| | | [[Category:Github]] |
| Now the last three commands:
| | [[Category:Angular]] |
| | |
| <pre>
| |
| npm install
| |
| bower install
| |
| grunt package
| |
| </pre>
| |
| | |
| ===npm install===
| |
| | |
| First:
| |
| | |
| <pre>
| |
| $ npm install
| |
| npm WARN engine karma@0.12.32: wanted: {"node":"~0.8 || ~0.10"} (current: {"node":"0.11.16","npm":"2.3.0"})
| |
| npm WARN optional dep failed, continuing fsevents@0.3.5
| |
| npm WARN engine hawk@0.10.2: wanted: {"node":"0.8.x"} (current: {"node":"0.11.16","npm":"2.3.0"})
| |
| npm WARN engine cryptiles@0.1.3: wanted: {"node":"0.8.x"} (current: {"node":"0.11.16","npm":"2.3.0"})
| |
| npm WARN engine sntp@0.1.4: wanted: {"node":"0.8.x"} (current: {"node":"0.11.16","npm":"2.3.0"})
| |
| npm WARN engine boom@0.3.8: wanted: {"node":"0.8.x"} (current: {"node":"0.11.16","npm":"2.3.0"})
| |
| npm WARN engine hoek@0.7.6: wanted: {"node":"0.8.x"} (current: {"node":"0.11.16","npm":"2.3.0"})
| |
| npm WARN optional dep failed, continuing fsevents@0.2.1
| |
| | |
| > 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)
| |
| | |
| npm WARN engine hawk@0.10.2: wanted: {"node":"0.8.x"} (current: {"node":"0.11.16","npm":"2.3.0"})
| |
| npm WARN engine cryptiles@0.1.3: wanted: {"node":"0.8.x"} (current: {"node":"0.11.16","npm":"2.3.0"})
| |
| npm WARN engine sntp@0.1.4: wanted: {"node":"0.8.x"} (current: {"node":"0.11.16","npm":"2.3.0"})
| |
| npm WARN engine boom@0.3.8: wanted: {"node":"0.8.x"} (current: {"node":"0.11.16","npm":"2.3.0"})
| |
| npm WARN engine hoek@0.7.6: wanted: {"node":"0.8.x"} (current: {"node":"0.11.16","npm":"2.3.0"})
| |
| | |
| > 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
| |
| 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'
| |
| npm WARN engine bootstrap@3.3.2: wanted: {"node":"~0.10.1"} (current: {"node":"0.11.16","npm":"2.3.0"})
| |
| | |
| > 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
| |
| </pre>
| |
| | |
| okay! it worked!
| |
| | |
| ===bower install===
| |
| | |
| next:
| |
| | |
| <pre>
| |
| $ bower install
| |
| bower ng-closure-runner#* cached https://raw.github.com/angular/ng-closure-runner/v0.2.3/assets/ng-closure-runner.zip#e-tag:91da43ccc
| |
| bower ng-closure-runner#* validate e-tag:91da43ccc against https://raw.github.com/angular/ng-closure-runner/v0.2.3/assets/ng-closure-runner.zip#*
| |
| bower closure-compiler#* cached https://dl.google.com/closure-compiler/compiler-20140814.zip#e-tag:469db
| |
| bower closure-compiler#* validate e-tag:469db against https://dl.google.com/closure-compiler/compiler-20140814.zip#*
| |
| bower jquery#2.1.1 cached git://github.com/jquery/jquery.git#2.1.1
| |
| bower jquery#2.1.1 validate 2.1.1 against git://github.com/jquery/jquery.git#2.1.1
| |
| bower closure-compiler#* install closure-compiler#e-tag:469db
| |
| bower jquery#2.1.1 install jquery#2.1.1
| |
| bower ng-closure-runner#* install ng-closure-runner#e-tag:91da43ccc
| |
| | |
| closure-compiler#e-tag:469db bower_components/closure-compiler
| |
| | |
| jquery#2.1.1 bower_components/jquery
| |
| | |
| ng-closure-runner#e-tag:91da43ccc bower_components/ng-closure-runner
| |
| </pre>
| |
| | |
| worked!
| |
| | |
| ===grunt package===
| |
| | |
| okay, last but not least, the step that keeps failing:
| |
| | |
| <pre>
| |
| $ grunt package
| |
| | |
| Running "shell:npm-install" (shell) task
| |
| diff: node_modules/npm-shrinkwrap.cached.json: No such file or directory
| |
| Blowing away node_modules and reinstalling npm dependencies...
| |
| npm WARN engine karma@0.12.32: wanted: {"node":"~0.8 || ~0.10"} (current: {"node":"0.11.16","npm":"2.3.0"})
| |
| npm WARN optional dep failed, continuing fsevents@0.3.5
| |
| npm WARN engine hawk@0.10.2: wanted: {"node":"0.8.x"} (current: {"node":"0.11.16","npm":"2.3.0"})
| |
| npm WARN engine cryptiles@0.1.3: wanted: {"node":"0.8.x"} (current: {"node":"0.11.16","npm":"2.3.0"})
| |
| npm WARN engine sntp@0.1.4: wanted: {"node":"0.8.x"} (current: {"node":"0.11.16","npm":"2.3.0"})
| |
| npm WARN engine boom@0.3.8: wanted: {"node":"0.8.x"} (current: {"node":"0.11.16","npm":"2.3.0"})
| |
| npm WARN engine hoek@0.7.6: wanted: {"node":"0.8.x"} (current: {"node":"0.11.16","npm":"2.3.0"})
| |
| npm ERR! Linux 3.13.0-36-generic
| |
| npm ERR! argv "/home/charles/.nvm/v0.11.16/bin/node" "/home/charles/.nvm/v0.11.16/bin/npm" "install"
| |
| npm ERR! node v0.11.16
| |
| npm ERR! npm v2.3.0
| |
| npm ERR! code ENOMEM
| |
| npm ERR! errno ENOMEM
| |
| npm ERR! syscall spawn
| |
| | |
| npm ERR! spawn ENOMEM
| |
| npm ERR!
| |
| npm ERR! If you need help, you may report this error at:
| |
| npm ERR! <http://github.com/npm/npm/issues>
| |
| | |
| > 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)
| |
| | |
| | |
| | |
| | |
| Fatal error: read ECONNRESET
| |
| </pre>
| |
| | |
| =Using Angular with Python=
| |
| | |
| Problem: most Python libraries are using Jinja or something similar, and those use double curly brackets <code>{{ }}</code>, conflicting with Angular.
| |
| | |
| Solution: use interpolateProvider variable to control start/end symbol https://docs.angularjs.org/api/ng/provider/$interpolateProvider
| |