bitjson / typescript-starter

Quickly create and configure a new library or Node.js project
https://bitjson.github.io/typescript-starter/
MIT License
3.48k stars 245 forks source link

Add copy/paste detector to scripts in package.json #149

Closed kucherenko closed 4 years ago

kucherenko commented 5 years ago

What kind of change does this PR introduce? (Bug fix, feature, docs update, ...) feature

What is the current behavior? (You can also link to an open issue here) no copy/paste detection

What is the new behavior (if this is a feature change)? add copy/paste detector for typescript-starter

Other information:

codecov[bot] commented 5 years ago

Codecov Report

Merging #149 into master will not change coverage. The diff coverage is n/a.

Impacted file tree graph

@@          Coverage Diff          @@
##           master   #149   +/-   ##
=====================================
  Coverage     100%   100%           
=====================================
  Files           9      9           
  Lines         259    259           
  Branches       39     39           
=====================================
  Hits          259    259

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update 8eaf963...07cad43. Read the comment docs.

codecov[bot] commented 5 years ago

Codecov Report

Merging #149 into master will decrease coverage by 0.38%. The diff coverage is 75%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #149      +/-   ##
==========================================
- Coverage     100%   99.61%   -0.39%     
==========================================
  Files           9        9              
  Lines         259      263       +4     
  Branches       39       40       +1     
==========================================
+ Hits          259      262       +3     
- Partials        0        1       +1
Impacted Files Coverage Δ
src/cli/tasks.ts 100% <ø> (ø) :arrow_up:
src/cli/args.ts 100% <ø> (ø) :arrow_up:
src/cli/utils.ts 100% <ø> (ø) :arrow_up:
src/cli/inquire.ts 100% <100%> (ø) :arrow_up:
src/cli/typescript-starter.ts 98.94% <66.66%> (-1.06%) :arrow_down:

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update 8eaf963...aa8e6c6. Read the comment docs.

bitjson commented 5 years ago

Hey @kucherenko, thanks for the PR!

The goal here is to provide a very minimal "good" setup, and then optionally provide plenty of other "Extras" like Travis or Yarn. Could you add this as an option? Just needs to be configured in a few places. See the Travis option for an example:

https://github.com/bitjson/typescript-starter/blob/8eaf9636c6cfbd9b1b5c0b4393c32f35f06e8d7d/src/cli/inquire.ts#L121-L125

https://github.com/bitjson/typescript-starter/blob/8eaf9636c6cfbd9b1b5c0b4393c32f35f06e8d7d/src/cli/args.ts#L22-L23

And here's the spot where the magic happens: https://github.com/bitjson/typescript-starter/blob/8eaf9636c6cfbd9b1b5c0b4393c32f35f06e8d7d/src/cli/typescript-starter.ts#L90

So we just need to add this new package to that list if the user enabled the option.

kucherenko commented 5 years ago

@bitjson thank you for comment, fixed

kucherenko commented 5 years ago

@bitjson may I ask your help, looks like appveyor didn't use last changes, could you please restart the build on appveyor?

bitjson commented 4 years ago

Hey @kucherenko, sorry to keep you waiting here. If you're still interested in adding this, could you fix the merge conflicts?

(I'm going to close this for now just to clean up issues, but feel free to re-open if you still want to work on it!)