Skip to content

Commit

Permalink
Template to generate packages
Browse files Browse the repository at this point in the history
  • Loading branch information
ggazzo committed Apr 13, 2022
1 parent 47c861e commit ea1456e
Show file tree
Hide file tree
Showing 4 changed files with 45 additions and 0 deletions.
1 change: 1 addition & 0 deletions .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
packages/core-typings/* @RocketChat/chat-engine
.vscode/* @RocketChat/chat-engine
.github/* @RocketChat/chat-engine
_templates/* @RocketChat/chat-engine
4 changes: 4 additions & 0 deletions _templates/package/new/index.ejs.t
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
---
to: packages/<%= name %>/src/index.ts
---
export default () => "<%= h.capitalize(name) %>";
29 changes: 29 additions & 0 deletions _templates/package/new/package.json.ejs.t
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
---
to: packages/<%= name %>/package.json
---

{
"name": "@rocket.chat/<%= h.capitalize(name) %>",
"version": "0.0.1",
"private": true,
"devDependencies": {
"@types/jest": "^27.4.1",
"eslint": "^8.12.0",
"jest": "^27.5.1",
"ts-jest": "^27.1.4",
"typescript": "~4.3.5"
},
"scripts": {
"eslint": "eslint --ext .js,.jsx,.ts,.tsx .",
"eslint:fix": "eslint --ext .js,.jsx,.ts,.tsx . --fix",
"jest": "jest",
"build": "tsc -p tsconfig.json"
},
"main": "./dist/index.js",
"typings": "./dist/index.d.ts",
"files": [
"/dist"
],
"dependencies": {
}
}
11 changes: 11 additions & 0 deletions _templates/package/new/tsconfig.json.ejs.t
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
---
to: packages/<%= name %>/tsconfig.json
---
{
"extends": "../../tsconfig.base.json",
"compilerOptions": {
"rootDir": "./src",
"outDir": "./dist"
},
"include": ["./src/**/*"]
}

0 comments on commit ea1456e

Please sign in to comment.