Skip to content
This repository has been archived by the owner on Dec 3, 2022. It is now read-only.

Commit

Permalink
Switch to TypeScript
Browse files Browse the repository at this point in the history
  • Loading branch information
MattiasBuelens committed Jan 14, 2018
1 parent 31aac84 commit de8bbfe
Show file tree
Hide file tree
Showing 4 changed files with 28 additions and 6 deletions.
7 changes: 4 additions & 3 deletions package.json
Expand Up @@ -6,7 +6,7 @@
"module": "dist/sourcemap-codec.es.js",
"scripts": {
"test": "mocha",
"build": "rm -rf dist && rollup -c",
"build": "rm -rf dist && rollup -c && tsc",
"pretest": "npm run build",
"prepublish": "npm test",
"lint": "eslint src",
Expand Down Expand Up @@ -41,8 +41,9 @@
"mocha": "^3.2.0",
"remap-istanbul": "^0.9.5",
"rollup": "^0.54.0",
"rollup-plugin-buble": "^0.15.0",
"rollup-plugin-node-resolve": "^3.0.0"
"rollup-plugin-node-resolve": "^3.0.0",
"rollup-plugin-typescript": "^0.8.1",
"typescript": "^2.6.2"
},
"files": [
"src",
Expand Down
9 changes: 6 additions & 3 deletions rollup.config.js
@@ -1,12 +1,15 @@
import buble from 'rollup-plugin-buble';
import typescript from 'rollup-plugin-typescript';
import resolve from 'rollup-plugin-node-resolve';

const pkg = require( './package.json' );

export default {
input: 'src/sourcemap-codec.js',
input: 'src/sourcemap-codec.ts',
plugins: [
buble({ exclude: 'node_modules/**' }),
typescript({
exclude: 'node_modules/**',
typescript: require('typescript')
}),
resolve({ jsnext: true })
],
output: [{
Expand Down
File renamed without changes.
18 changes: 18 additions & 0 deletions tsconfig.json
@@ -0,0 +1,18 @@
{
"compilerOptions": {
"noImplicitAny": true,
"diagnostics": true,
"noImplicitThis": true,
"noEmitOnError": true,
"target": "es5",
"lib": ["es5", "es6"],
"declaration": true,
"outDir": "dist/types"
},
"include": [
"src"
],
"exclude": [
"node_modules"
]
}

0 comments on commit de8bbfe

Please sign in to comment.