Skip to content

Instantly share code, notes, and snippets.

View bclinkinbeard's full-sized avatar

Ben Clinkinbeard bclinkinbeard

View GitHub Profile
"browserify": {
"transform": [ "browserify-shim" ]
},
"browser": {
"angular": "./test/support/vendor/angular.js",
"angular-mocks": "./test/support/vendor/angular-mocks.js"
},
"browserify-shim": {
"angular": "angular", <---- everything seems to work even without this line
"angular-mocks" : {
@bclinkinbeard
bclinkinbeard / readme.md
Last active August 29, 2015 13:55
Am I missing something here regarding dependencies?

devDependencies are only installed when your module is top level (not in another project's node_modules dir). peerDependencies are only installed when your module is not top level.

So for Browserify projects, where nothing is truly a dependency in the sense it is required to run the app, you are left with a sub-optimal scenario. Any modules you depend on to function must be listed in both devDependencies (to ensure they are installed when you are working on this module) and in peerDependencies (to ensure they are installed when this module is used by another module). The only exception seems to be testing dependencies, which can be left out of peerDependencies.

Or do you say eff it and list everything but testing modules in dependencies?

@bclinkinbeard
bclinkinbeard / gist:8853209
Created February 6, 2014 21:51
Self contained directive
'use strict';
var angular = require('angular');
function LoginFormDirective ($compile) {
return {
restrict: 'E',
link: function (scope, element) {
'use strict';
var angular = require('angular'),
_ = require('underscore');
module.exports = function (opts) {
opts = _.defaults(opts || {}, {
authenticateButtonLabel: 'Log in',
setPasswordButtonLabel: 'Set Password',
'use strict';
var angular = require('angular'),
_ = require('underscore');
module.exports = function (opts) {
opts = _.defaults(opts || {}, {
authenticateButtonLabel: 'Log in',
setPasswordButtonLabel: 'Set Password',
var st = require('st'),
http = require('http'),
atomify = require('atomify');
var atom = atomify.http({
js: {
entry: __dirname + '/index.js'
},
css: {
entry: __dirname + '/../src/index.css'
ran 0 times
whoops { [Error: module "hbsfy/runtime" not found from "/Users/bclinkinbeard/Code/SpatialKey/sk-login-form/example/ugh.hbs"]
filename: 'hbsfy/runtime',
parent: '/Users/bclinkinbeard/Code/SpatialKey/sk-login-form/example/ugh.hbs' }
ran 1 times
whoops { [Error: module "hbsfy/runtime" not found from "/Users/bclinkinbeard/Code/SpatialKey/sk-login-form/example/ugh.hbs"]
filename: 'hbsfy/runtime',
parent: '/Users/bclinkinbeard/Code/SpatialKey/sk-login-form/example/ugh.hbs' }
/Users/bclinkinbeard/Code/SpatialKey/sk-login-form/example/foo.js:17
'use strict';
var _ = require('underscore');
module.exports = function () {
var proto,
injections = [];
// define constructor function
/\<[img|video|audio][\S\s]+?src\=[\"\'](.+?)[\"\'][\S\s]+?\>/g
'use strict';
var mix = require('sk-ng-mixin');
var PodContentsController = mix({
$inject: ['$scope', 'dataset', 'filtersModel'],
init: function ($scope, dataset, filtersModel) {