b3498d110e4dca90f00ce325b4f48835b27ed5da

Author
div_bhasin <divbest99@gmail.com>
Committer
div_bhasin <divbest99@gmail.com>
Date

Message

Extracted angularjs to its own context for users who still use Angular <= 2

Diff

 1diff --git a/plugins/frontend-search/README.md b/plugins/frontend-search/README.md
 2index d77a4210d7ade39bb194e8a66b9d5981a29bd0ea..24f82b26264dd7e0cd3b1dda59d1f3747782a176 100644
 3--- a/plugins/frontend-search/README.md
 4+++ b/plugins/frontend-search/README.md
 5@@ -32,7 +32,8 @@ Available search contexts are:
 6 
 7 | context       | URL                                                                      |
 8 |---------------|--------------------------------------------------------------------------|
 9-| angularjs     | `https://angular.io/?search=`                                             |
10+| angular(>=2.0)| `https://angular.io/?search=`                                             |
11+| angularjs(1.x)| `https://google.com/search?as_sitesearch=angularjs.org&as_q=`
12 | aurajs        | `http://aurajs.com/api/#stq=`                                            |
13 | bem           | `https://google.com/search?as_sitesearch=bem.info&as_q=`                 |
14 | bootsnipp     | `https://bootsnipp.com/search?q=`                                         |
15diff --git a/plugins/frontend-search/_frontend-search.sh b/plugins/frontend-search/_frontend-search.sh
16index 9aad76f762d6c6201cb65d8b66479588f19fe944..573aa3aaef8c01c7d952b7b2c39cdbe19d754a52 100644
17--- a/plugins/frontend-search/_frontend-search.sh
18+++ b/plugins/frontend-search/_frontend-search.sh
19@@ -33,7 +33,8 @@ function _frontend() {
20     'unheap: Search in unheap website'
21     'bem: Search in BEM website'
22     'smacss: Search in SMACSS website'
23-    'angularjs: Search in Angular website'
24+    'angular: Search in Angular website for Angular 2.x'
25+    'angularjs: Search in Angular website for Angular 1.x'
26     'reactjs: Search in React website'
27     'emberjs: Search in Ember website'
28     'stackoverflow: Search in StackOverflow website'
29@@ -99,6 +100,9 @@ function _frontend() {
30         smacss)
31           _describe -t points "Warp points" frontend_points && ret=0
32           ;;
33+        angular)
34+          _describe -t points "Warp points" frontend_points && ret=0
35+        ;;
36         angularjs)
37           _describe -t points "Warp points" frontend_points && ret=0
38           ;;
39diff --git a/plugins/frontend-search/frontend-search.plugin.zsh b/plugins/frontend-search/frontend-search.plugin.zsh
40index cad692ec4d558d41463d06500b8de070b4d80df9..c5f5ea7a997f3c43741fec19db44aa207decbe05 100644
41--- a/plugins/frontend-search/frontend-search.plugin.zsh
42+++ b/plugins/frontend-search/frontend-search.plugin.zsh
43@@ -26,7 +26,8 @@ function frontend() {
44   # define search context URLS
45   typeset -A urls
46   urls=(
47-    angularjs      'https://angular.io/?search='
48+    angular        'https://angular.io/?search='
49+    angularjs      'https://google.com/search?as_sitesearch=angularjs.org&as_q='
50     aurajs         'http://aurajs.com/api/#stq='
51     bem            'https://google.com/search?as_sitesearch=bem.info&as_q='
52     bootsnipp      'https://bootsnipp.com/search?q='
53@@ -57,7 +58,7 @@ function frontend() {
54       print -P "%Uterm%u and what follows is what will be searched for in the %Ucontext%u website,"
55       print -P "and %Ucontext%u is one of the following:"
56       print -P ""
57-      print -P "  angularjs, aurajs, bem, bootsnipp, caniuse, codepen, compassdoc, cssflow,"
58+      print -P "  angular (>= 2.0), angularjs (1.x), aurajs, bem, bootsnipp, caniuse, codepen, compassdoc, cssflow,"
59       print -P "  dartlang, emberjs, fontello, html5please, jquery, lodash, mdn, npmjs,"
60       print -P "  qunit, reactjs, smacss, stackoverflow, unheap"
61       print -P ""
62@@ -73,7 +74,7 @@ function frontend() {
63     echo ""
64     echo "Valid contexts are:"
65     echo ""
66-    echo "  angularjs, aurajs, bem, bootsnipp, caniuse, codepen, compassdoc, cssflow, "
67+    echo "  angular (>= 2.0), angularjs (1.x), aurajs, bem, bootsnipp, caniuse, codepen, compassdoc, cssflow, "
68     echo "  dartlang, emberjs, fontello, html5please, jquery, lodash, mdn, npmjs,  "
69     echo "  qunit, reactjs, smacss, stackoverflow, unheap"
70     echo ""