-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
build: add rollup configuration for building the library
build: add typescript configuration for building the library build: add output formats for the library (cjs, esm, iife) feat: add default export class KinopoiskDev to index.ts chore: add dist folder to .gitignore
- Loading branch information
Showing
5 changed files
with
50 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,2 @@ | ||
node_modules | ||
node_modules | ||
dist |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
import typescript from 'rollup-plugin-typescript2'; | ||
import resolve from '@rollup/plugin-node-resolve'; | ||
import commonjs from '@rollup/plugin-commonjs'; | ||
|
||
export default { | ||
input: 'src/index.ts', | ||
output: [ | ||
{ | ||
file: 'dist/bundle.cjs.js', | ||
format: 'cjs', | ||
}, | ||
{ | ||
file: 'dist/bundle.esm.js', | ||
format: 'esm', | ||
}, | ||
{ | ||
file: 'dist/bundle.iife.js', | ||
format: 'iife', | ||
name: 'kinopoiskdev', | ||
} | ||
], | ||
plugins: [ | ||
typescript(), | ||
resolve(), | ||
commonjs(), | ||
], | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
export default class KinopoiskDev { | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
{ | ||
"compilerOptions": { | ||
"outDir": "./dist", | ||
"sourceMap": true, | ||
"noImplicitAny": true, | ||
"module": "ESNext", | ||
"target": "ESNext", | ||
"jsx": "react" | ||
}, | ||
"include": [ | ||
"./src/**/*" | ||
] | ||
} |