Comparing version 0.0.4 to 1.0.0
{ | ||
"name":"angular", | ||
"author":"Edward Hotchkiss <edwardhotchkiss@me.com>", | ||
"contributors":[ | ||
{ "name": "Edward Hotchkiss", "email": "edwardhotchkiss@me.com" }, | ||
{ "name": "Christopher Najewicz", "email": "chief@beefdisciple.com" } | ||
], | ||
"homepage":"http://github.com/edwardhotchkiss/node-angular", | ||
"description":"Node.JS + AngularJS project generator", | ||
"version":"0.0.4", | ||
"repository":{ | ||
"type":"git", | ||
"url":"git://github.com/edwardhotchkiss/node-angular.git" | ||
"name": "angular", | ||
"version": "1.0.0", | ||
"description": "AngularJS provided as a CommonJS module. Compiled with jsdom when running in Node. Useful for client-side apps built with Browserify and for testing AngularJS code in Node without depending on a browser.", | ||
"main": "index.js", | ||
"browser": "index-browserify.js", | ||
"scripts": { | ||
"test": "tape test/index.js" | ||
}, | ||
"keywords":["mvc","angular","routing", "angular.js"], | ||
"engines":{ | ||
"node":">= 0.8.0" | ||
"repository": { | ||
"type": "git", | ||
"url": "http://github.com/bclinkinbeard/angular.git" | ||
}, | ||
"main": "./lib/index", | ||
"bin" : { | ||
"angular":"./bin/angular.js" | ||
"keywords": [ | ||
"angular", | ||
"angularjs", | ||
"commonjs", | ||
"require", | ||
"testing" | ||
], | ||
"author": { | ||
"name": "Ben Clinkinbeard", | ||
"email": "ben.clinkinbeard@gmail.com" | ||
}, | ||
"dependencies":{ | ||
"mongoose":"2.5.13", | ||
"express":"2.5.10", | ||
"colors":"0.6.0-1" | ||
"license": "MIT", | ||
"dependencies": { | ||
"jsdom": "~0.8.8" | ||
}, | ||
"devDependencies":{ | ||
"vows":"0.6.2" | ||
}, | ||
"bugs": { | ||
"url": "https://github.com/edwardhotchkiss/node-angular/issues" | ||
}, | ||
"licenses":[{ | ||
"type":"MIT", | ||
"url":"http://github.com/edwardhotchkiss/node-angular/LICENSE" | ||
}], | ||
"scripts":{ | ||
"test":"vows test/*.test.js --spec" | ||
"devDependencies": { | ||
"tape": "~2.1.0" | ||
} | ||
} | ||
} |
@@ -1,31 +0,70 @@ | ||
# node-angular [![Build Status](https://secure.travis-ci.org/edwardhotchkiss/node-angular.png)](http://travis-ci.org/edwardhotchkiss/node-angular) | ||
angular | ||
============ | ||
> Node.JS + Angular.JS project generator | ||
AngularJS provided as a CommonJS module. Compiled with jsdom when running in Node. Useful for client-side apps built with Browserify and for testing AngularJS code in Node without depending on a browser. | ||
Install: | ||
## Versioning | ||
```bash | ||
$ sudo npm install angular -g | ||
The version number of this module reflects the version of AngularJS it provides. | ||
## Why | ||
For client-side apps using Browserify, this module provides a way for them to use AngularJS without shimming. | ||
Having a version of AngularJS that works outside the browser could also be convenient for many reasons. The primary motivation was around testability and modularity of AngularJS related projects. For developers utilizing the CommonJS standard and Browserify to build AngularJS projects and ecosystems, the hope is that this module will greatly simplify their workflow. | ||
As [egghead.io](http://egghead.io) has shown, testing [simple views](https://egghead.io/lessons/angularjs-unit-testing-hello-world) and [directives](https://egghead.io/lessons/angularjs-unit-testing-a-directive) is a great way to ensure the pieces of your app are working as intended. Unfortunately, testing this way usually requires running your code in a real browser via something like Karma, because AngularJS assumes `window` and `document` are both available. Additionally, AngularJS (via `angular-mocks.js`) only exposes the `inject` method shown in the [egghead.io](http://egghead.io) videos if `window.jasmine` is defined. | ||
This module allows you to test AngularJS views and directives using any testing framework and runner you like, from [Mocha](http://visionmedia.github.io/mocha/) to [Nodeunit](https://github.com/caolan/nodeunit) to [tape](https://github.com/substack/tape). | ||
This module also aims to make it much easier to create AngularJS directives, modules, and other components that can be independently published to and versioned on npm and/or their own repositories. | ||
## Examples | ||
The `inject` method referenced above is really just a shortcut to `$injector.invoke`, but `$injector` is only available from within AngularJS. Fortunately, there are two ways to get a reference to Angular's injector from outside of AngularJS code. | ||
``` | ||
// this will return a fresh instance of injector each time it's called | ||
// if your code is not running in a browser you must use this method | ||
var injector = angular.injector(['ng']); | ||
Start a mongod process: | ||
// provided only as an FYI, the following method WILL NOT WORK outside a web browser | ||
// this will return the injector singleton for the application in which <element> is defined. | ||
// for code that runs in a browser you could just use document if ng-app is defined on <html> | ||
// otherwise you can use any element that is a descendent of the tag your app is defined/bootstrapped on | ||
var injector = angular.element(<element>).injector(); | ||
``` | ||
See here for details - http://www.mongodb.org/display/DOCS/Starting+and+Stopping+Mongo | ||
### Testing view compilation | ||
Generate New Project: | ||
``` | ||
var angular = require('angular'), | ||
inject = angular.injector(['ng']).invoke, | ||
num; | ||
```bash | ||
$ angular new myapp && cd myapp | ||
$ npm install | ||
$ npm test | ||
$ angular server 9000 | ||
$ open http://localhost:9000/ | ||
inject(function ($rootScope, $compile) { | ||
var el = angular.element('<div>{{ 2 + 2 }}</div>'); | ||
el = $compile(el)($rootScope); | ||
$rootScope.$digest(); | ||
num = +el.html(); | ||
}); | ||
// num === 4 | ||
``` | ||
## License (MIT) | ||
### Testing event handling | ||
Copyright (c) 2012, Edward Hotchkiss. | ||
``` | ||
var angular = require('angular'), | ||
inject = angular.injector(['ng']).invoke, | ||
answer; | ||
### Author: [Edward Hotchkiss][0] | ||
inject(function ($rootScope) { | ||
$rootScope.$on('foo', function (e, val) { | ||
answer = val; | ||
}); | ||
$rootScope.$broadcast('foo', 'bar') | ||
}); | ||
[0]: http://edwardhotchkiss.com/ | ||
// answer === 'bar' | ||
``` |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
Uses eval
Supply chain riskPackage uses eval() which is a dangerous function. This prevents the code from running in certain environments and increases the risk that the code may contain exploits or malicious behavior.
Found 1 instance in 1 package
Dynamic require
Supply chain riskDynamic require can indicate the package is performing dangerous or unsafe dynamic code execution.
Found 1 instance in 1 package
No bug tracker
MaintenancePackage does not have a linked bug tracker in package.json.
Found 1 instance in 1 package
No website
QualityPackage does not have a website.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Shell access
Supply chain riskThis module accesses the system shell. Accessing the system shell increases the risk of executing arbitrary code.
Found 1 instance in 1 package
Dynamic require
Supply chain riskDynamic require can indicate the package is performing dangerous or unsafe dynamic code execution.
Found 1 instance in 1 package
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
Found 1 instance in 1 package
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
1
1
70
3
84528
8
369
3
+ Addedjsdom@~0.8.8
+ Addedajv@6.12.6(transitive)
+ Addedasn1@0.2.6(transitive)
+ Addedassert-plus@1.0.0(transitive)
+ Addedasynckit@0.4.0(transitive)
+ Addedaws-sign2@0.7.0(transitive)
+ Addedaws4@1.13.2(transitive)
+ Addedbcrypt-pbkdf@1.0.2(transitive)
+ Addedbindings@1.5.0(transitive)
+ Addedcaseless@0.12.0(transitive)
+ Addedcombined-stream@1.0.8(transitive)
+ Addedcontextify@0.1.15(transitive)
+ Addedcore-util-is@1.0.2(transitive)
+ Addedcssom@0.3.8(transitive)
+ Addedcssstyle@0.2.37(transitive)
+ Addeddashdash@1.14.1(transitive)
+ Addeddelayed-stream@1.0.0(transitive)
+ Addeddom-serializer@0.2.2(transitive)
+ Addeddomelementtype@1.3.12.3.0(transitive)
+ Addeddomhandler@2.4.2(transitive)
+ Addeddomutils@1.7.0(transitive)
+ Addedecc-jsbn@0.1.2(transitive)
+ Addedentities@1.1.22.2.0(transitive)
+ Addedextend@3.0.2(transitive)
+ Addedextsprintf@1.3.0(transitive)
+ Addedfast-deep-equal@3.1.3(transitive)
+ Addedfast-json-stable-stringify@2.1.0(transitive)
+ Addedfile-uri-to-path@1.0.0(transitive)
+ Addedforever-agent@0.6.1(transitive)
+ Addedform-data@2.3.3(transitive)
+ Addedgetpass@0.1.7(transitive)
+ Addedhar-schema@2.0.0(transitive)
+ Addedhar-validator@5.1.5(transitive)
+ Addedhtmlparser2@3.10.1(transitive)
+ Addedhttp-signature@1.2.0(transitive)
+ Addedinherits@2.0.4(transitive)
+ Addedis-typedarray@1.0.0(transitive)
+ Addedisstream@0.1.2(transitive)
+ Addedjsbn@0.1.1(transitive)
+ Addedjsdom@0.8.11(transitive)
+ Addedjson-schema@0.4.0(transitive)
+ Addedjson-schema-traverse@0.4.1(transitive)
+ Addedjson-stringify-safe@5.0.1(transitive)
+ Addedjsprim@1.4.2(transitive)
+ Addedmime-db@1.52.0(transitive)
+ Addedmime-types@2.1.35(transitive)
+ Addednan@2.20.0(transitive)
+ Addednwmatcher@1.3.9(transitive)
+ Addedoauth-sign@0.9.0(transitive)
+ Addedperformance-now@2.1.0(transitive)
+ Addedpsl@1.9.0(transitive)
+ Addedpunycode@2.3.1(transitive)
+ Addedqs@6.5.3(transitive)
+ Addedreadable-stream@3.6.2(transitive)
+ Addedrequest@2.88.2(transitive)
+ Addedsafe-buffer@5.2.1(transitive)
+ Addedsafer-buffer@2.1.2(transitive)
+ Addedsshpk@1.18.0(transitive)
+ Addedstring_decoder@1.3.0(transitive)
+ Addedtough-cookie@2.5.0(transitive)
+ Addedtunnel-agent@0.6.0(transitive)
+ Addedtweetnacl@0.14.5(transitive)
+ Addeduri-js@4.4.1(transitive)
+ Addedutil-deprecate@1.0.2(transitive)
+ Addeduuid@3.4.0(transitive)
+ Addedverror@1.10.0(transitive)
+ Addedxmlhttprequest@1.8.0(transitive)
- Removedcolors@0.6.0-1
- Removedexpress@2.5.10
- Removedmongoose@2.5.13
- Removedbson@0.0.4(transitive)
- Removedcolors@0.6.0-1(transitive)
- Removedconnect@1.9.2(transitive)
- Removedexpress@2.5.10(transitive)
- Removedformidable@1.0.17(transitive)
- Removedhooks@0.2.0(transitive)
- Removedmime@1.2.4(transitive)
- Removedmkdirp@0.3.0(transitive)
- Removedmongodb@0.9.9-7(transitive)
- Removedmongoose@2.5.13(transitive)
- Removedqs@0.4.2(transitive)