Skip to content

Commit

Permalink
chore: build sources
Browse files Browse the repository at this point in the history
  • Loading branch information
tsmd committed Oct 26, 2020
1 parent 1dbf041 commit 4d4b776
Show file tree
Hide file tree
Showing 4 changed files with 145 additions and 7 deletions.
107 changes: 107 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

26 changes: 19 additions & 7 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,25 @@
"name": "eripusisu",
"version": "0.0.0",
"description": "Text truncation library",
"main": "dist/index.js",
"scripts": {},
"author": "Takayuki Shimada",
"license": "MIT",
"main": "dist/eripusisu.umd.js",
"module": "dist/eripusisu.js",
"scripts": {
"build:umd": "rollup --config rollup.config.js",
"build:esm": "tsc --project tsconfig.esm.json",
"build": "npm run-script build:umd && npm run-script build:esm"
},
"devDependencies": {
"@rollup/plugin-typescript": "^6.0.0",
"prettier": "^2.1.2",
"rollup": "^2.32.1",
"tslib": "^2.0.3",
"typescript": "^4.0.3"
},
"files": [
"dist"
],
"keywords": [
"text",
"truncate",
Expand All @@ -13,9 +30,4 @@
"float",
"inline-block"
],
"author": "Takayuki Shimada",
"license": "MIT",
"devDependencies": {
"prettier": "^2.1.2"
}
}
11 changes: 11 additions & 0 deletions rollup.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
import typescript from "@rollup/plugin-typescript";

export default {
input: "src/eripusisu.ts",
output: {
file: "dist/eripusisu.umd.js",
format: "umd",
name: "Eripusisu",
},
plugins: [typescript({ target: "ES5" })],
};
8 changes: 8 additions & 0 deletions tsconfig.esm.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"files": ["src/eripusisu.ts"],
"compilerOptions": {
"declaration": true,
"outDir": "dist",
"target": "ESNext"
}
}

0 comments on commit 4d4b776

Please sign in to comment.