Building AngularJS developing environment

You can find a document on AngularJS page, that describes how to set up your development environment to build and test AngularJS.

Installing dependencies

Before you can build AngularJS, you must install and configure the following dependencies on your machine:

Forking Angular on Github

What does forking mean and how to fork a repo

Scaffolding AngularJS app

I followed this post to figure out, how to scaffold a project.

When I tried to build with grunt, I got the following message:

Running "karma:unit" (karma) task
Warning: No provider for "framework:jasmine"! (Resolving: framework:jasmine) Use --force to continue.

Aborted due to warnings.

I found this description with the same warning. According to the description, I added to karma.conf.js file (located in the project folder) the following code:

plugins: [
    'karma-chrome-launcher',
    'karma-jasmine'
    ],

After this the grunt is worked without errors.

Deploying AngularJS app

I followed the post mentioned in the previous section to manage the deploying. The method hammered out is really useful, you can automatize the process via shell scripts.

Note: because I am not too familiar with bash scripts yet, For a moment I got some problems with execution of these scripts from the bash. I figured out that there are two ways to handle this; You can

  • type bash some-script.sh or
  • type ./ before the script name (after you set executable permission using chmod command: chmod +x some-script.sh).

I also find some good snippets here to manage the situation when you want to write a code that can be executed without knowing the path of the bash, with the help of env. For this purpose you can use the following hash bang:

#!/usr/bin/env bash

Sources

(1) hipzter's blog


comments powered by Disqus