View create-your-new-modern-type-script-java-script-library-with-tsup_7.ts
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
import type { Options } from 'tsup' | |
const config: Options = { | |
// | |
} | |
export default config |
View create-your-new-modern-type-script-java-script-library-with-tsup_11.ts
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
const config: Options = { | |
entry: ['src/index.ts'], | |
dts: true, | |
sourcemap: true, | |
format: ['iife', 'cjs', 'esm'], | |
} |
View create-your-new-modern-type-script-java-script-library-with-tsup_5.ts
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
export function sayHello() { | |
console.log('hello') | |
} |
View create-your-new-modern-type-script-java-script-library-with-tsup_1.bash
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
mkdir my-typescript-library | |
cd my-typescript-library |
View create-your-new-modern-type-script-java-script-library-with-tsup_10.ts
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
const config: Options = { | |
entry: ['src/index.ts'], | |
dts: true, | |
sourcemap: true, | |
} |
View create-your-new-modern-type-script-java-script-library-with-tsup_6.js
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
const { sayHello } = require('./dist') | |
sayHello() | |
sayHello() | |
sayHello() | |
sayHello() | |
sayHello() |
View create-your-new-modern-type-script-java-script-library-with-tsup_2.bash
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
npm init -y |
View create-your-new-modern-type-script-java-script-library-with-tsup_12.json
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
"publishConfig": { | |
"access": "public" | |
} |
View create-your-new-modern-type-script-java-script-library-with-tsup_9.bash
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
npm i --save-dev typescript |
View create-your-new-modern-type-script-java-script-library-with-tsup_8.ts
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
const config: Options = { | |
entry: ['src/index.ts'], | |
dts: true, | |
} |
NewerOlder