This repository was archived by the owner on Feb 26, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 410
Fix #532, Fix #566, add tslint in ci, add tslint/format/test/karma in precommit of git #565
Merged
Merged
Changes from all commits
Commits
Show all changes
11 commits
Select commit
Hold shift + click to select a range
d28189f
fix #532, add tslint in ci, add tslint/karma/testnode/format in git c…
JiaLiPassion 979595f
fix #532, add tslint in ci, add tslint/karma/testnode/format in git c…
JiaLiPassion 0abb331
use format:enforce
JiaLiPassion f95ae76
rename package.json script's name
JiaLiPassion e59aabc
update developer.md to add precommit details
JiaLiPassion 49a3847
merge from master
JiaLiPassion 7cee76f
change var to const
JiaLiPassion 043dc9a
add scripts explaination into DEVELOPER.md, use gulp lint
JiaLiPassion 46c48e8
remove pre-commit hooks
JiaLiPassion 91fdf32
update DEVELOPER.md to add process for before commit
JiaLiPassion 100482a
format DEVELOPMER.md
JiaLiPassion File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -15,11 +15,19 @@ | |
}, | ||
"scripts": { | ||
"changelog": "gulp changelog", | ||
"ci": "npm run lint && npm run format && npm run test:single && npm run test-node", | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. document those in the README ? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yes, I will organize all those scripts and add them into DEVELOPER.md |
||
"format": "gulp format:enforce", | ||
"karma-jasmine": "karma start karma-build-jasmine.conf.js", | ||
"karma-jasmine:single": "karma start karma-build-jasmine.conf.js --single-run", | ||
"karma-jasmine:autoclose": "npm run karma-jasmine:single && npm run ws-client", | ||
"lint": "gulp lint", | ||
"prepublish": "tsc && gulp build", | ||
"ws-client": "node ./test/ws-client.js", | ||
"ws-server": "node ./test/ws-server.js", | ||
"tsc": "tsc", | ||
"tsc:w": "tsc -w", | ||
"test": "npm run tsc && concurrently \"npm run tsc:w\" \"npm run ws-server\" \"karma start karma-build-jasmine.conf.js\"", | ||
"test": "npm run tsc && concurrently \"npm run tsc:w\" \"npm run ws-server\" \"npm run karma-jasmine\"", | ||
"test:single": "npm run tsc && concurrently \"npm run ws-server\" \"npm run karma-jasmine:autoclose\"", | ||
"test-dist": "concurrently \"npm run tsc:w\" \"npm run ws-server\" \"karma start karma-dist-jasmine.conf.js\"", | ||
"test-node": "gulp test/node", | ||
"test-mocha": "npm run tsc && concurrently \"npm run tsc:w\" \"npm run ws-server\" \"karma start karma-build-mocha.conf.js\"", | ||
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
/** | ||
* @license | ||
* Copyright Google Inc. All Rights Reserved. | ||
* | ||
* Use of this source code is governed by an MIT-style license that can be | ||
* found in the LICENSE file at https://angular.io/license | ||
*/ | ||
|
||
const ws = require('nodejs-websocket'); | ||
|
||
const conn = ws.connect('ws://localhost:8001', {}, function() { | ||
conn.send('close'); | ||
conn.close(); | ||
}); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm -1 on creating a commit hook.
Test should run in watch mode anyway ?
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, test in monitor mode can make sure all jasmine test passed.
But with pre commit, the hook can check format and lint.
Sometimes I forget to do gulp format and gulp lint, and make a commit, the format error was found by Travis, I just want to let developer find the error before commit.
Are you suggesting when code changes, automatically run format and lint check?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
you can set up your IDE/editor for that
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ok, I see, I have removed the hook