mirror of
				https://github.com/threeal/cmake-action.git
				synced 2025-11-03 21:33:42 +00:00 
			
		
		
		
	build: initialize JavaScript action project
This commit is contained in:
		
							parent
							
								
									d27fb54a3f
								
							
						
					
					
						commit
						a83bb9b6ec
					
				
							
								
								
									
										28
									
								
								.eslintrc.json
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										28
									
								
								.eslintrc.json
									
									
									
									
									
										Normal file
									
								
							@ -0,0 +1,28 @@
 | 
			
		||||
{
 | 
			
		||||
  "root": true,
 | 
			
		||||
  "extends": ["eslint:recommended", "prettier"],
 | 
			
		||||
  "parserOptions": {
 | 
			
		||||
    "ecmaVersion": 2022,
 | 
			
		||||
    "sourceType": "module"
 | 
			
		||||
  },
 | 
			
		||||
  "overrides": [
 | 
			
		||||
    {
 | 
			
		||||
      "files": ["**/*.mts", "**/*.ts"],
 | 
			
		||||
      "extends": ["plugin:@typescript-eslint/recommended"],
 | 
			
		||||
      "parser": "@typescript-eslint/parser",
 | 
			
		||||
      "parserOptions": {
 | 
			
		||||
        "project": ["tsconfig.eslint.json"]
 | 
			
		||||
      },
 | 
			
		||||
      "plugins": ["@typescript-eslint", "eslint-plugin-tsdoc"],
 | 
			
		||||
      "rules": {
 | 
			
		||||
        "tsdoc/syntax": "error"
 | 
			
		||||
      }
 | 
			
		||||
    },
 | 
			
		||||
    {
 | 
			
		||||
      "files": ["**/*.test.*"],
 | 
			
		||||
      "env": {
 | 
			
		||||
        "jest": true
 | 
			
		||||
      }
 | 
			
		||||
    }
 | 
			
		||||
  ]
 | 
			
		||||
}
 | 
			
		||||
							
								
								
									
										5
									
								
								.gitignore
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										5
									
								
								.gitignore
									
									
									
									
										vendored
									
									
								
							@ -1,4 +1,7 @@
 | 
			
		||||
.*
 | 
			
		||||
!.eslint*
 | 
			
		||||
!.git*
 | 
			
		||||
 | 
			
		||||
build
 | 
			
		||||
build/
 | 
			
		||||
dist/
 | 
			
		||||
node_modules/
 | 
			
		||||
 | 
			
		||||
							
								
								
									
										19
									
								
								jest.config.json
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										19
									
								
								jest.config.json
									
									
									
									
									
										Normal file
									
								
							@ -0,0 +1,19 @@
 | 
			
		||||
{
 | 
			
		||||
  "collectCoverage": true,
 | 
			
		||||
  "coverageThreshold": {
 | 
			
		||||
    "global": {
 | 
			
		||||
      "branches": 100,
 | 
			
		||||
      "functions": 100,
 | 
			
		||||
      "lines": 100,
 | 
			
		||||
      "statements": 100
 | 
			
		||||
    }
 | 
			
		||||
  },
 | 
			
		||||
  "extensionsToTreatAsEsm": [".ts", ".mts"],
 | 
			
		||||
  "moduleNameMapper": {
 | 
			
		||||
    "^(\\.{1,2}/.*)\\.mjs$": "$1.mts"
 | 
			
		||||
  },
 | 
			
		||||
  "testMatch": ["**/*.test.ts"],
 | 
			
		||||
  "transform": {
 | 
			
		||||
    "^.+\\.m?ts$": ["ts-jest", { "useESM": true }]
 | 
			
		||||
  }
 | 
			
		||||
}
 | 
			
		||||
							
								
								
									
										8
									
								
								main/index.mjs
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										8
									
								
								main/index.mjs
									
									
									
									
									
										Normal file
									
								
							@ -0,0 +1,8 @@
 | 
			
		||||
/******/ /* webpack/runtime/compat */
 | 
			
		||||
/******/ 
 | 
			
		||||
/******/ if (typeof __nccwpck_require__ !== 'undefined') __nccwpck_require__.ab = new URL('.', import.meta.url).pathname.slice(import.meta.url.match(/^file:\/\/\/\w:/) ? 1 : 0, -1) + "/";
 | 
			
		||||
/******/ 
 | 
			
		||||
/************************************************************************/
 | 
			
		||||
var __webpack_exports__ = {};
 | 
			
		||||
 | 
			
		||||
//# sourceMappingURL=main.mjs.map
 | 
			
		||||
							
								
								
									
										27
									
								
								package.json
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										27
									
								
								package.json
									
									
									
									
									
										Normal file
									
								
							@ -0,0 +1,27 @@
 | 
			
		||||
{
 | 
			
		||||
  "name": "cmake-action",
 | 
			
		||||
  "private": true,
 | 
			
		||||
  "type": "module",
 | 
			
		||||
  "scripts": {
 | 
			
		||||
    "bundle": "tsc && ncc build dist/main.mjs -o main",
 | 
			
		||||
    "check": "sort-package-json && prettier --write . !dist && eslint src",
 | 
			
		||||
    "test": "jest"
 | 
			
		||||
  },
 | 
			
		||||
  "devDependencies": {
 | 
			
		||||
    "@jest/globals": "^29.7.0",
 | 
			
		||||
    "@types/jest": "^29.5.8",
 | 
			
		||||
    "@types/node": "^20.9.0",
 | 
			
		||||
    "@typescript-eslint/eslint-plugin": "^6.11.0",
 | 
			
		||||
    "@typescript-eslint/parser": "^6.11.0",
 | 
			
		||||
    "@vercel/ncc": "^0.38.1",
 | 
			
		||||
    "eslint": "^8.53.0",
 | 
			
		||||
    "eslint-config-prettier": "^9.0.0",
 | 
			
		||||
    "eslint-plugin-tsdoc": "^0.2.17",
 | 
			
		||||
    "jest": "^29.7.0",
 | 
			
		||||
    "prettier": "^3.1.0",
 | 
			
		||||
    "sort-package-json": "^2.6.0",
 | 
			
		||||
    "ts-jest": "^29.1.1",
 | 
			
		||||
    "typescript": "^5.2.2"
 | 
			
		||||
  },
 | 
			
		||||
  "packageManager": "yarn@4.0.2"
 | 
			
		||||
}
 | 
			
		||||
							
								
								
									
										0
									
								
								src/main.mts
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										0
									
								
								src/main.mts
									
									
									
									
									
										Normal file
									
								
							
							
								
								
									
										4
									
								
								tsconfig.eslint.json
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										4
									
								
								tsconfig.eslint.json
									
									
									
									
									
										Normal file
									
								
							@ -0,0 +1,4 @@
 | 
			
		||||
{
 | 
			
		||||
  "extends": "./tsconfig.json",
 | 
			
		||||
  "exclude": []
 | 
			
		||||
}
 | 
			
		||||
							
								
								
									
										17
									
								
								tsconfig.json
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										17
									
								
								tsconfig.json
									
									
									
									
									
										Normal file
									
								
							@ -0,0 +1,17 @@
 | 
			
		||||
{
 | 
			
		||||
  "compilerOptions": {
 | 
			
		||||
    "strict": true,
 | 
			
		||||
    "module": "NodeNext",
 | 
			
		||||
    "moduleResolution": "NodeNext",
 | 
			
		||||
    "declaration": true,
 | 
			
		||||
    "outDir": "dist",
 | 
			
		||||
    "sourceMap": true,
 | 
			
		||||
    "esModuleInterop": true,
 | 
			
		||||
    "forceConsistentCasingInFileNames": true,
 | 
			
		||||
    "lib": ["ES2022"],
 | 
			
		||||
    "target": "ES2022",
 | 
			
		||||
    "skipLibCheck": true
 | 
			
		||||
  },
 | 
			
		||||
  "include": ["src"],
 | 
			
		||||
  "exclude": ["**/*.test.*"]
 | 
			
		||||
}
 | 
			
		||||
		Loading…
	
		Reference in New Issue
	
	Block a user