Skip to content

Commit

Permalink
feat(build)
Browse files Browse the repository at this point in the history
  • Loading branch information
juanrgm committed Nov 2, 2020
1 parent 8b1c702 commit 5799690
Show file tree
Hide file tree
Showing 12 changed files with 204 additions and 0 deletions.
14 changes: 14 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
root = true

[*]
charset = utf-8
end_of_line = lf

[*.{ts,js}]
indent_style = tab
indent_size = 4

[*.json]
indent_style = space
indent_size = 2
insert_final_newline = true
4 changes: 4 additions & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
.history
lib
node_modules
package-lock.json
14 changes: 14 additions & 0 deletions .eslintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{
"root": true,
"parser": "@typescript-eslint/parser",
"plugins": ["prettier"],
"env": {
"node": true
},
"extends": [
"eslint:recommended",
"plugin:@typescript-eslint/eslint-recommended",
"plugin:@typescript-eslint/recommended",
"plugin:prettier/recommended"
]
}
15 changes: 15 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@

name: CI

on: [push]

jobs:
test:
name: Test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- uses: actions/setup-node@v1
with:
node-version: 12
- run: npm install
16 changes: 16 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
name: Publish

on:
release:
types: [published]

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- uses: actions/setup-node@v1
- run: npm install
- run: npm run publish -- -p $VSCODE_MARKETPLACE_TOKEN
env:
VSCODE_MARKETPLACE_TOKEN: ${{secrets.VSCODE_MARKETPLACE_TOKEN}}
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
.history
lib
node_modules
1 change: 1 addition & 0 deletions .prettierrc.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
semi: false
16 changes: 16 additions & 0 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{
"version": "0.2.0",
"configurations": [
{
"name": "Run Extension",
"type": "extensionHost",
"request": "launch",
"args": [
"--extensionDevelopmentPath=${workspaceFolder}"
],
"outFiles": [
"${workspaceFolder}/lib/**/*.js"
]
}
]
}
5 changes: 5 additions & 0 deletions .vscodeignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
**
!assets
!lib/*.js
!README.md
!LICENSE
102 changes: 102 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,102 @@
{
"name": "phpstan",
"displayName": "PHPStan",
"description": "PHPStan for VSCode",
"version": "1.0.0",
"license": "MIT",
"publisher": "swordev",
"author": "Juanra Gálvez <[email protected]>",
"icon": "assets/logo.png",
"engines": {
"vscode": "^1.50.0"
},
"categories": [
"Linters",
"Programming Languages"
],
"keywords": [
"php",
"phpstan",
"linter",
"problems",
"errors",
"analyse"
],
"activationEvents": [
"workspaceContains:**/phpstan.neon",
"workspaceContains:**/phpstan.neon.dist"
],
"repository": {
"type": "git",
"url": "https://github.com/swordev/phpstan-vscode.git"
},
"bugs": {
"url": "https://github.com/swordev/phpstan-vscode/issues"
},
"main": "./lib/extension.js",
"contributes": {
"configuration": {
"type": "object",
"title": "PHPStan",
"properties": {
"phpstan.enabled": {
"type": "boolean",
"description": "Enables PHPStan",
"default": true
},
"phpstan.path": {
"type": "string",
"description": "PHPStan binary path",
"default": "./vendor/phpstan/phpstan/phpstan"
},
"phpstan.phpPath": {
"type": "string",
"description": "PHP binary path",
"default": "php"
},
"phpstan.memoryLimit": {
"type": "string",
"description": "PHP memory limit",
"default": "-1"
},
"phpstan.fileWatcher": {
"type": "boolean",
"description": "Enables file watcher",
"default": true
},
"phpstan.fileWatcherPattern": {
"type": "string",
"description": "File watcher glob pattern",
"default": "**/*.{php}"
},
"phpstan.analysedDelay": {
"type": "integer",
"description": "Milliseconds delay between file changes before run analyse",
"default": 200
}
}
}
},
"scripts": {
"publish": "vsce publish",
"vscode:prepublish": "npm run prepare",
"build": "rimraf lib/* && tsc -p ./src/tsconfig.json",
"dev": "tsc -p ./src/tsconfig.json -w",
"lint": "eslint . --ext .ts,.js,.json",
"lint:fix": "eslint . --ext .ts,.js,.json --fix",
"prepare": "npm run build && npm run lint"
},
"devDependencies": {
"@types/node": "^14.14.6",
"@types/vscode": "^1.50.0",
"@typescript-eslint/eslint-plugin": "^4.6.0",
"@typescript-eslint/parser": "^4.6.0",
"eslint": "^7.12.1",
"eslint-config-prettier": "^6.15.0",
"eslint-plugin-prettier": "^3.1.4",
"prettier": "2.1.2",
"rimraf": "^3.0.2",
"typescript": "^4.0.5",
"vsce": "^1.81.1"
}
}
7 changes: 7 additions & 0 deletions src/tsconfig.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"extends": "../tsconfig.json",
"compilerOptions": {
"composite": true
},
"include": ["./*.ts"]
}
7 changes: 7 additions & 0 deletions tsconfig.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"compilerOptions": {
"module": "CommonJS",
"target": "ES6",
"outDir": "lib"
}
}

0 comments on commit 5799690

Please sign in to comment.