add metadata and build process

This commit is contained in:
Conduitry 2020-10-14 14:35:04 -04:00
parent 32094e87eb
commit 6333eef901
5 changed files with 70 additions and 0 deletions

6
.gitignore vendored Normal file
View File

@ -0,0 +1,6 @@
/dist/
/node_modules/
/package-lock.json
/pnpm-lock.yaml
/shrinkwrap.yaml
/yarn.lock

4
.prettierrc.yaml Normal file
View File

@ -0,0 +1,4 @@
printWidth: 120
useTabs: true
singleQuote: true
trailingComma: all

38
package.json Normal file
View File

@ -0,0 +1,38 @@
{
"name": "@conduitry/autocache",
"version": "0.0.0",
"description": "A cache that cleans itself",
"keywords": [
"cache"
],
"main": "dist/index.cjs.js",
"module": "dist/index.esm.js",
"types": "types/index.d.ts",
"files": [
"dist",
"types"
],
"engines": {
"node": "^12"
},
"repository": {
"type": "git",
"url": "https://github.com/Conduitry/autocache.git"
},
"author": "Conduitry",
"license": "MIT",
"bugs": {
"url": "https://github.com/Conduitry/autocache/issues"
},
"devDependencies": {
"@types/node": "=12",
"rollup": "^2",
"rollup-plugin-cheap-ts": "Conduitry/rollup-plugin-cheap-ts#semver:^1",
"typescript": "^4"
},
"scripts": {
"build": "rollup -c",
"dev": "rollup -cw",
"prepare": "npm run build"
}
}

11
rollup.config.js Normal file
View File

@ -0,0 +1,11 @@
import cheap_ts from 'rollup-plugin-cheap-ts';
export default {
input: './src/index',
external: name => /^[a-z]/.test(name),
plugins: [cheap_ts()],
output: [
{ file: 'dist/index.cjs.js', format: 'cjs', sourcemap: true, interop: false, preferConst: true },
{ file: 'dist/index.esm.js', format: 'esm', sourcemap: true, preferConst: true },
],
};

11
tsconfig.json Normal file
View File

@ -0,0 +1,11 @@
{
"compilerOptions": {
"noImplicitAny": true,
"noImplicitThis": true,
"noUnusedLocals": true,
"removeComments": true,
"sourceMap": true,
"target": "esnext"
},
"include": ["src"]
}