Skip to content

Commit

Permalink
Merge pull request #63 from Unibeautify/dependency-manager
Browse files Browse the repository at this point in the history
WIP: Dependency manager
  • Loading branch information
stevenzeck committed Apr 5, 2018
2 parents 4db977d + 2480ff1 commit 1256b50
Show file tree
Hide file tree
Showing 35 changed files with 3,091 additions and 867 deletions.
2 changes: 2 additions & 0 deletions .codeclimate.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,8 @@ exclude_patterns:
- "**/node_modules/"
- "/test/"
- "**/*.d.ts"
- "__mocks__/"
- "jest.*.js"
plugins:
fixme:
enabled: true
2 changes: 1 addition & 1 deletion .node-version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v9.5.0
v9.10.1
3 changes: 2 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,8 @@ before_script:
- ./cc-test-reporter before-build
script:
- npm run lint
- npm test
- npm run build-test
- jest --maxWorkers=4
notifications:
email:
on_success: never
Expand Down
2 changes: 1 addition & 1 deletion .unibeautifyrc.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
TypeScript:
beautifiers: ["Pretty Diff", "Prettier"]
beautifiers: ["Prettier"]
align_assignments: false
arrow_parens: "as-needed"
break_chained_methods: true
Expand Down
5 changes: 3 additions & 2 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@
{
"type": "node",
"request": "launch",
"name": "Jest Tests",
"name": "Debug Tests",
"runtimeVersion": "9.10.1",
"program": "${workspaceRoot}/node_modules/jest/bin/jest.js",
"args": ["--config", "jest.config.js", "--runInBand"],
"runtimeArgs": ["--nolazy"],
Expand All @@ -20,4 +21,4 @@
"outFiles": ["${workspaceRoot}/dist/"]
}
]
}
}
10 changes: 9 additions & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,12 @@
{
"editor.insertSpaces": true,
"editor.tabSize": 4
"editor.tabSize": 2,
"jest.autoEnable": true,
"jest.rootPath": ".",
"jest.pathToConfig": "jest.config.js",
"jest.showCoverageOnLoad": true,
"prettier.semi": true,
"prettier.singleQuote": false,
"prettier.trailingComma": "es5",
"prettier.printWidth": 80
}
13 changes: 13 additions & 0 deletions .vscode/tasks.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,19 @@
"kind": "test",
"isDefault": true
}
},
{
"type": "npm",
"script": "build",
"problemMatcher": []
},
{
"identifier": "build-test",
"type": "npm",
"script": "build-test",
"problemMatcher": [
"$tsc"
]
}
]
}
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# Unibeautify

[![Greenkeeper badge](https://badges.greenkeeper.io/Unibeautify/unibeautify.svg)](https://greenkeeper.io/)
[![Maintainability](https://api.codeclimate.com/v1/badges/b472e3d8388e14a6d9ea/maintainability)](https://codeclimate.com/github/Unibeautify/unibeautify/maintainability)

> One Beautifier to rule them all, One Beautifier to clean them, One Beautifier to bring them all and in the darkness sheen them
Expand Down
1 change: 1 addition & 0 deletions __mocks__/fakedep/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
module.exports = function() {};
12 changes: 12 additions & 0 deletions __mocks__/fakedep/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"name": "fakedep",
"version": "1.0.0",
"description": "",
"main": "index.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"keywords": [],
"author": "",
"license": "ISC"
}
1 change: 1 addition & 0 deletions __mocks__/requireg-global-fakedep/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
module.exports = function() {};
12 changes: 12 additions & 0 deletions __mocks__/requireg-global-fakedep/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"name": "requireg-global-fakedep",
"version": "1.0.0",
"description": "",
"main": "index.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"keywords": [],
"author": "",
"license": "ISC"
}
23 changes: 22 additions & 1 deletion jest.config.js
Original file line number Diff line number Diff line change
@@ -1,12 +1,33 @@
"use strict";

module.exports = {
rootDir: ".",
testEnvironment: "node",
setupFiles: [
"./test/setupTests.js"
],
transform: {
"^.+\\.tsx?$": "ts-jest"
},
testRegex: "test/.+\\.(test|spec)\\.ts$",
testPathIgnorePatterns: [
"<rootDir>/__mocks__/",
"<rootDir>/dist/",
"<rootDir>/node_modules/",
],
moduleFileExtensions: ["ts", "tsx", "js", "jsx", "json", "node"],
collectCoverage: true,
coverageReporters: ["json", "lcov", "text", "html"],
mapCoverage: true
coveragePathIgnorePatterns: [
"<rootDir>/__mocks__/",
"<rootDir>/dist/",
"<rootDir>/test/",
"<rootDir>/node_modules/",
],
globals: {
"ts-jest": {
tsConfigFile: "tsconfig.json",
enableTsDiagnostics: true,
},
},
};
Loading

0 comments on commit 1256b50

Please sign in to comment.