Skip to content

Commit

Permalink
chore: update README with commonJS usage
Browse files Browse the repository at this point in the history
  • Loading branch information
troch committed Apr 9, 2018
1 parent bff09c7 commit 84c67ce
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 1 deletion.
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ It is used by [route-node](https://github.com/troch/route-node)

```javascript
import Path from 'path-parser'
// or
const Path = require('path-parser').default

const path = new Path('/users/:id')

Expand Down
3 changes: 2 additions & 1 deletion rollup.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@ export default ['es', 'cjs'].map(format => ({
input: 'modules/Path.ts',
plugins: [
typescript({
useTsconfigDeclarationDir: true
useTsconfigDeclarationDir: true,
clean: true
})
],
output: {
Expand Down
1 change: 1 addition & 0 deletions tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
"target": "es5",
"declaration": true,
"declarationDir": "./typings",
"esModuleInterop": true,
"outDir": "./temp",
"lib": [
"es2015"
Expand Down

0 comments on commit 84c67ce

Please sign in to comment.