Add prettier + style command

This commit is contained in:
Dolan
2018-01-22 23:38:49 +00:00
parent cb47d4f772
commit f2027230a0
4 changed files with 30 additions and 6 deletions

9
.gitignore vendored
View File

@ -36,8 +36,13 @@ node_modules
build build
build-tests build-tests
# vscode # VSCode
.vscode .vscode/*
!.vscode/settings.json
!.vscode/tasks.json
!.vscode/launch.json
!.vscode/extensions.json
.history
# Lock files # Lock files
package-lock.json package-lock.json

View File

@ -6,6 +6,7 @@ install:
script: script:
- npm run lint - npm run lint
- npm test - npm test
- npm run style
after_failure: after_failure:
- "cat /home/travis/builds/dolanmiu/docx/npm-debug.log" - "cat /home/travis/builds/dolanmiu/docx/npm-debug.log"
after_success: after_success:

16
.vscode/settings.json vendored Normal file
View File

@ -0,0 +1,16 @@
{
"cSpell.words": [
"clippy",
"docx",
"dolan",
"miu",
"officegen",
"typedoc"
],
"prettier.trailingComma": "all",
"prettier.printWidth": 140,
"editor.formatOnSave": false,
"prettier.tabWidth": 4,
"prettier.arrowParens": "always",
"prettier.bracketSpacing": true,
}

View File

@ -12,7 +12,8 @@
"tsc": "rimraf ./build && tsc -p .", "tsc": "rimraf ./build && tsc -p .",
"webpack": "rimraf ./build && webpack", "webpack": "rimraf ./build && webpack",
"demo": "npm run build && node ./demo", "demo": "npm run build && node ./demo",
"typedoc": "npm run build && typedoc --out docs/ src/ --module commonjs --target ES6 --disableOutputCheck" "typedoc": "npm run build && typedoc --out docs/ src/ --module commonjs --target ES6 --disableOutputCheck",
"style": "prettier -l --trailing-comma all --print-width 140 --arrow-parens always \"src/**/*.ts\""
}, },
"files": [ "files": [
"src", "src",
@ -61,6 +62,7 @@
"chai": "^3.5.0", "chai": "^3.5.0",
"mocha": "^3.2.0", "mocha": "^3.2.0",
"mocha-webpack": "^1.0.1", "mocha-webpack": "^1.0.1",
"prettier": "^1.10.2",
"prompt": "^1.0.0", "prompt": "^1.0.0",
"rimraf": "^2.5.2", "rimraf": "^2.5.2",
"shelljs": "^0.7.7", "shelljs": "^0.7.7",