Skip to content
This repository has been archived by the owner on Jan 5, 2024. It is now read-only.

Commit

Permalink
Add debug to project
Browse files Browse the repository at this point in the history
  • Loading branch information
blakeembrey committed Jan 9, 2016
1 parent 48ae3f2 commit 3f36a28
Show file tree
Hide file tree
Showing 9 changed files with 28 additions and 1 deletion.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,4 @@
.DS_Store
npm-debug.log
/dist/
/typings/
4 changes: 4 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,10 @@ notifications:
on_success: never
on_failure: change

before_install:
- npm i -g typings
- typings install

node_js:
- "0.10"
- "0.12"
Expand Down
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -239,6 +239,10 @@ typings/{main,browser}.d.ts
Where `typings/{main,browser}.d.ts` is a compilation of references to installed definitions. Main and browser typings are written to separate directories for `tsconfig.json` exclude support - you can completely exclude either the primary or browser typings.
## Contributing
The scripts to build the project are in `package.json`. Namely, `npm run test` and `npm run build`. To make compilation work the first time, you'll need to install Typings. Yes, it's recursive. Use `npm install -g typings` and run `typings install` before building.
## License
MIT
Expand Down
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@
"bluebird": "^3.1.1",
"chalk": "^1.0.0",
"columnify": "^1.5.2",
"debug": "^2.2.0",
"detect-indent": "^4.0.0",
"elegant-spinner": "^1.0.1",
"graceful-fs": "^4.1.2",
Expand Down
2 changes: 2 additions & 0 deletions src/install.ts
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,8 @@ export function installDependency (dependency: string, options: InstallDependenc
return Promise.reject(new TypeError('You must specify a name for the dependency'))
}

console.log(options.cwd)

return findProject(options.cwd)
.then(
(cwd) => installTo(dependency, extend(options, { cwd })),
Expand Down
4 changes: 4 additions & 0 deletions src/utils/debug.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
import debug = require('debug')
import { PROJECT_NAME } from './config'

export default debug(PROJECT_NAME)
7 changes: 6 additions & 1 deletion src/utils/fs.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ import { parseReferences, stringifyReferences } from './references'
import { ConfigJson } from '../interfaces/main'
import { CompiledOutput } from '../lib/compile'
import rc from './rc'
import debug from './debug'

// Create a file cache for popsicle.
const requestFileCache = popsicleCache({
Expand Down Expand Up @@ -110,7 +111,11 @@ export function readHttp (url: string): Promise<string> {
})
.use(requestFileCache)
.use(popsicleStatus(200))
.then(x => x.body)
.then(response => {
debug('http response', response.toJSON())

return response.body
})
}

/**
Expand Down
1 change: 1 addition & 0 deletions tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
"src/bin/typings-search.ts",
"src/bin/typings-uninstall.ts",
"src/typings.ts",
"typings/main.d.ts",
"custom_typings/archy.d.ts",
"custom_typings/array-uniq.d.ts",
"custom_typings/blue-tape.d.ts",
Expand Down
5 changes: 5 additions & 0 deletions typings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"dependencies": {
"debug": "github:typings/typed-debug#0a12b05a76400107c70a266dcd4c2b656baa7dae"
}
}

0 comments on commit 3f36a28

Please sign in to comment.