Browse Source

add metadata and build process

master
Conduitry 11 months ago
parent
commit
6333eef901
  1. 6
      .gitignore
  2. 4
      .prettierrc.yaml
  3. 38
      package.json
  4. 11
      rollup.config.js
  5. 11
      tsconfig.json

6
.gitignore

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

4
.prettierrc.yaml

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

38
package.json

@ -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

@ -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

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