Skip to content

Commit

Permalink
chore: publish pure ts package to npm
Browse files Browse the repository at this point in the history
  • Loading branch information
tanlethanh committed Apr 23, 2024
1 parent d336a64 commit da6c889
Show file tree
Hide file tree
Showing 8 changed files with 46 additions and 14 deletions.
6 changes: 5 additions & 1 deletion .eslintrc.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
/** @type {import('eslint').Linter.Config} */
module.exports = {
extends: ['@metacraft/eslint-config'],
ignorePatterns: ['**/metacraft/'],
ignorePatterns: ['**/metacraft/', '**/dist/'],
env: {
node: true,
},
};
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,5 @@
node_modules

# dist
**/metacraft
**/metacraft
**/dist
6 changes: 5 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,10 @@
],
"scripts": {
"test": "jest --passWithNoTests",
"lint": "eslint . --ext .ts"
"lint": "eslint . --ext .ts",
"clean": "rimraf src/dist",
"build": "yarn clean && tsc",
"publish": "cd src && npm publish --access public && cd .."
},
"author": "",
"license": "MIT",
Expand All @@ -23,6 +26,7 @@
"eslint": "^8.0.0",
"jest": "^29.7.0",
"prettier": "^3.2.5",
"rimraf": "^5.0.5",
"typescript": "5.3.3"
}
}
File renamed without changes.
15 changes: 11 additions & 4 deletions src/package.json
Original file line number Diff line number Diff line change
@@ -1,10 +1,17 @@
{
"name": "@metacraft/crab",
"version": "0.0.1",
"description": "",
"main": "index.js",
"author": "",
"version": "0.0.2",
"description": "A universal messaging library for cross-platform applications",
"author": "https://metacraft.studio",
"license": "MIT",
"files": [
"core",
"chrome",
"web",
"mobile",
"embed",
"utils"
],
"devDependencies": {
"@types/chrome": "^0.0.266"
}
Expand Down
File renamed without changes.
16 changes: 10 additions & 6 deletions tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,10 +1,14 @@
{
"extends": "@metacraft/tsconfig/application.json",
"extends": "@metacraft/tsconfig/base.json",
"include": ["src"],
"exclude": ["src/dist"],
"compilerOptions": {
"baseUrl": "src",
"paths": {
"core": ["./core"],
"core/*": ["./core/*"]
}
"target": "es2018",
"moduleResolution": "node", // don't have to import actual filenames, can import extensionless files
"declaration": true, // generate .d.ts files
"sourceMap": true, // generate source map
"outDir": "src/dist", // output compiled js, d.ts, and source map to dist folder
"strict": true,
"esModuleInterop": true
}
}
14 changes: 13 additions & 1 deletion yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -2910,6 +2910,7 @@ __metadata:
eslint: "npm:^8.0.0"
jest: "npm:^29.7.0"
prettier: "npm:^3.2.5"
rimraf: "npm:^5.0.5"
typescript: "npm:5.3.3"
languageName: unknown
linkType: soft
Expand Down Expand Up @@ -3896,7 +3897,7 @@ __metadata:
languageName: node
linkType: hard

"glob@npm:^10.2.2, glob@npm:^10.3.10":
"glob@npm:^10.2.2, glob@npm:^10.3.10, glob@npm:^10.3.7":
version: 10.3.12
resolution: "glob@npm:10.3.12"
dependencies:
Expand Down Expand Up @@ -6099,6 +6100,17 @@ __metadata:
languageName: node
linkType: hard

"rimraf@npm:^5.0.5":
version: 5.0.5
resolution: "rimraf@npm:5.0.5"
dependencies:
glob: "npm:^10.3.7"
bin:
rimraf: dist/esm/bin.mjs
checksum: 10c0/d50dbe724f33835decd88395b25ed35995077c60a50ae78ded06e0185418914e555817aad1b4243edbff2254548c2f6ad6f70cc850040bebb4da9e8cc016f586
languageName: node
linkType: hard

"run-parallel@npm:^1.1.9":
version: 1.2.0
resolution: "run-parallel@npm:1.2.0"
Expand Down

0 comments on commit da6c889

Please sign in to comment.