---
id: getting-started/installation-and-usage
---

# Installation and Usage

## Examples

### Running a webpack compiler

```js
const project = require('skypager/current')
const compiler = project.compiler('node')

const compiler = project.compiler('node', options).configure(c => c 
  .entry(project.join('src/index.js'))
  .plugin('webpack.DefinePlugin', {
    __PROJECT_INFO__: JSON.stringify(project.select('info')),
  })
)

compiler.run().then(() => {
  if (compiler.hasErrors) {
    console.log('OH NO')
  } else {
    console.log(compiler.stats.toString('normal'))
  }
})
```