Skip to content

Instantly share code, notes, and snippets.

View ashleygwilliams's full-sized avatar

ashley williams ashleygwilliams

  • 20:49 (UTC -05:00)
View GitHub Profile

Types of Dependencies

Most people who use npm use it to install packages that their applications depend one, known familiarly as dependencies. What a lot of people don't know is that there's actually a vibrant array of different dependency types (ok, fine, just 5ish) that can help you better serve yourself, as either an application or package author, as well as the users of your package.

Before now it was a little tricky to learn what those dependency types are, what differentiates them, and why you'd want to use them. This article will hopefully make that a bit more clear.

{
"scripts": {
"step-1": "jshint index.js"
"step-2": "sass styles/custom.sass"
"all-together-now": "npm run step-1 && npm run step-2"
}
}

help us with npm's website! (in a new different way)

From it's inception, npm has been keenly focused on open source values. However, as we've grown as a company, we've learned the important lesson that making source code available under a open license is the bare minimum for open source software. To take it even further, we also learned that "open source" doesn't necessarily mean community driven. With these insights in mind, the web team has decided to make some changes to the community interface of npm's website- with the goal of creating a more efficient and effective experience for everyone involved.

Summary

  • npm/newww is being retired and made private
  • npm/www has been created for new issues and release notes

Sunsetting npm/newww

checking:mysql-prettify
/Users/ag_dubs/npm/bad-words-follower/index.js:23
        if ((change.doc.readme).match(bad_words[i])) {
                                ^

TypeError: change.doc.readme.match is not a function
 Compiling assert_approx_eq v0.2.0 (file:///Users/ag_dubs/rust/assert_approx_eq)
src/lib.rs:17:27: 17:30 error: no method named `abs` found for type `_` in the current scope
src/lib.rs:17         assert!((*a - *b).abs() < 1.0e-6,
                                        ^~~
src/lib.rs:17:9: 20:26 note: in this expansion of assert! (defined in <std macros>)
src/lib.rs:32:3: 32:27 note: in this expansion of assert_approx_eq! (defined in src/lib.rs)
error: aborting due to previous error
error: Could not compile `assert_approx_eq`.
@ashleygwilliams
ashleygwilliams / accepted.md
Last active May 23, 2016 17:43
NPM CAMP SCHOLARSHIPS

Hi {{}}!

Thanks so much for applying for a scholarship to npmcamp! We're excited to inform you we've chosen you for one of the scholarships!

The event is happening all-day on July 30th in Oakland, CA, and your scholarship covers the cost of the event ticket. We unfortunately do not have the means to sponsor travel at the moment.

Please let us know as soon as possible if you'llbe able to attend!

Additionally, we'll be having a pre-conference educational event, NodeTogether, which will happen the night before at npm's offices, close to the conference venue. We'd love for you to attend as a student or mentor!

@ashleygwilliams
ashleygwilliams / accepted.md
Last active May 23, 2016 17:42
NPM CAMP SCHOLARSHIPS

Hi {{}}!

Thanks so much for applying for a scholarship to npmcamp! We're excited to inform you we've chosen you for one of the scholarships!

Object.keys(request) - ashley/ceej

BLUEBIRD_LONG_STACK_TRACES=1 - chris

(ooh, just remembered another tip: kill -s USR1 <node pid> will turn the debugger on any node process and you can point node-inspector at it) -chris

ooh another fun debugging tip: dbg = vm.runInDebugContext('Debug'); mirror = dbg.MakeMirror(objectValue); console.log(mirror.referencedBy()) - chris it lists all referencing objects to the object you pass to MakeMirror

turn on browser styles in computed properties in the browser - jeff

// given a certain state, return the value of a variable
// STATE:
// variables: [a, b, c]
// values: { a: 5, b: a, c: 1 }
//
// value_of: b
value_of(variable) {
var val_vars = Object.keys(this.values);
if (variable.name != 'undefined' && val_vars.indexOf(variable.name) !== -1) {
var val = this.values[variable.name]