chore: configure prettier

This commit is contained in:
NateScarlet
2019-04-25 20:51:11 +08:00
parent 18e0ff2395
commit 5c5caec9b8
4 changed files with 55 additions and 39 deletions

3
.gitignore vendored
View File

@@ -3,4 +3,5 @@ node_modules/*
npm-debug.log
# Editor
/.vscode
/.vscode/*
!/.vscode/extensions.json

5
.prettierrc Normal file
View File

@@ -0,0 +1,5 @@
{
"singleQuote": false,
"semi": true,
"tabWidth": 4
}

9
.vscode/extensions.json vendored Normal file
View File

@@ -0,0 +1,9 @@
{
// See http://go.microsoft.com/fwlink/?LinkId=827846 to learn about workspace recommendations.
// Extension identifier format: ${publisher}.${name}. Example: vscode.csharp
// List of extensions which should be recommended for users of this workspace.
"recommendations": ["esbenp.prettier-vscode"],
// List of extensions recommended by VS Code that should not be recommended for users of this workspace.
"unwantedRecommendations": []
}

View File

@@ -1,40 +1,41 @@
{
"name": "litegraph.js",
"version": "0.7.0",
"description": "A graph node editor similar to PD or UDK Blueprints, it works in a HTML5 Canvas and allow to exported graphs to be included in applications.",
"main": "build/litegraph.js",
"directories": {
"doc": "doc"
},
"private": false,
"scripts": {
"prebuild": "rimraf build",
"build": "grunt build",
"start": "nodemon utils/server.js",
"test": "echo \"Error: no test specified\" && exit 1"
},
"repository": {
"type": "git",
"url": "git+https://github.com/jagenjo/litegraph.js.git"
},
"author": "jagenjo",
"license": "MIT",
"files": [
"build",
"css/litegraph.css"
],
"bugs": {
"url": "https://github.com/jagenjo/litegraph.js/issues"
},
"homepage": "https://github.com/kriffe/litegraph.js#readme",
"devDependencies": {
"express": "^4.16.4",
"google-closure-compiler": "^20171112.0.0",
"grunt": "^1.0.3",
"grunt-cli": "^1.2.0",
"grunt-closure-tools": "^1.0.0",
"grunt-contrib-concat": "^1.0.1",
"nodemon": "^1.18.9",
"rimraf": "^2.6.2"
}
"name": "litegraph.js",
"version": "0.7.0",
"description": "A graph node editor similar to PD or UDK Blueprints, it works in a HTML5 Canvas and allow to exported graphs to be included in applications.",
"main": "build/litegraph.js",
"directories": {
"doc": "doc"
},
"private": false,
"scripts": {
"prebuild": "rimraf build",
"build": "grunt build",
"start": "nodemon utils/server.js",
"test": "echo \"Error: no test specified\" && exit 1",
"prettier": "npx prettier --write src/**/*.* css/**/*.*"
},
"repository": {
"type": "git",
"url": "git+https://github.com/jagenjo/litegraph.js.git"
},
"author": "jagenjo",
"license": "MIT",
"files": [
"build",
"css/litegraph.css"
],
"bugs": {
"url": "https://github.com/jagenjo/litegraph.js/issues"
},
"homepage": "https://github.com/kriffe/litegraph.js#readme",
"devDependencies": {
"express": "^4.16.4",
"google-closure-compiler": "^20171112.0.0",
"grunt": "^1.0.3",
"grunt-cli": "^1.2.0",
"grunt-closure-tools": "^1.0.0",
"grunt-contrib-concat": "^1.0.1",
"nodemon": "^1.18.9",
"rimraf": "^2.6.2"
}
}