npm_3pp_lister 0.2.0 → 1.0.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: f0db2048f2476a26bfc5bd22838aacd12511f4c6b468586e465f784e38652655
4
- data.tar.gz: a17a762eee3c5410865b35a439481e60ff9cc1f1006750e17f076c511cc84a01
3
+ metadata.gz: 7f1f4a26f822b2367f0952d52687a758a493cf1f93ba54c9d81e1e5d1dbf9429
4
+ data.tar.gz: a12c8faf2fe735aaeabc74b39ab68dbec990f9088ded5796b2f5ebbc333f9978
5
5
  SHA512:
6
- metadata.gz: 1c76d599e30a3c72c3176b99272e9415cf68cc32ede3833a61837f3d74eb45d09d22d620f5eec8565e44c3faffa388f77b05252f465ff3c90bc3be8d50c536c6
7
- data.tar.gz: c9daa04fd13820e43088379edf4e671749a509df01facde309f16e35185ba61897685235b62de9cf65796bf64b705526522198568f3ce3c0541670f43b8716d1
6
+ metadata.gz: 709df33278b0ca70114ccaf1fb53b8e86af458812635a5e41330c1f02e2e8fb82d885ce4dd6f0e962ced43035d43d1b229387f83f8a7e5fe322cf1cab92e4728
7
+ data.tar.gz: b43abb6a7e0247a7bff3d00c76ec978c9da6e2b7722a8d1ca57fe9cc5579bfd6e740dd756f07eb248a8f46bcc2330646901709b11fa323684fd330edda00ae95
@@ -120,4 +120,4 @@ DEPENDENCIES
120
120
  rspec (~> 3.0)
121
121
 
122
122
  BUNDLED WITH
123
- 1.17.1
123
+ 2.1.4
data/README.md CHANGED
@@ -9,8 +9,16 @@ link to the source code of the specific version on the NPM registry.
9
9
 
10
10
  ## Usage
11
11
 
12
+ In any directory with a package.json file:
13
+
12
14
  $ npm_3pp_lister list
13
15
 
16
+ ![Output](Screenshot.png)
17
+
18
+ ## Todo
19
+ - list dev/peer dependencies
20
+ - ??
21
+
14
22
  ## License
15
23
 
16
24
  Do whatever you want
Binary file
@@ -16,13 +16,20 @@ module Npm3ppLister
16
16
  file = File.read('./package.json')
17
17
  json = JSON.parse(file)
18
18
 
19
+ output.puts "dependencies:"
20
+ output.puts "\n"
19
21
  json["dependencies"].each do |key, val|
20
- File.open("./3pp_list.txt","a") do |f|
21
- output.puts "#{key.colorize(:yellow)}: #{val}" + " " + "https://registry.npmjs.org/#{key}/-/#{key}-#{val.gsub("^", "").gsub("~", "")}.tgz".colorize(:green)
22
- f.puts "#{key}:#{val} - https://registry.npmjs.org/#{key}/-/#{key}-#{val.gsub("^", "").gsub("~", "")}.tgz"
23
- end
22
+ source_code_url = `npm view #{key}@#{val} dist.tarball`
23
+ output.puts "#{key.colorize(:yellow)}: #{val}" + " " + source_code_url.colorize(:green)
24
+ end
25
+
26
+ output.puts "\n\n\n"
27
+ output.puts "devDependencies:"
28
+ output.puts "\n"
29
+ json["devDependencies"].each do |key, val|
30
+ source_code_url = `npm view #{key}@#{val} dist.tarball`
31
+ output.puts "#{key.colorize(:yellow)}: #{val}" + " " + source_code_url.colorize(:green)
24
32
  end
25
- output.puts "\n\nResult written to 3pp_list.txt"
26
33
 
27
34
  else
28
35
  output.puts "- No package.json found here -"
@@ -1,3 +1,3 @@
1
1
  module Npm3ppLister
2
- VERSION = "0.2.0"
2
+ VERSION = "1.0.0"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: npm_3pp_lister
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0
4
+ version: 1.0.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Eric Khoury
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2018-12-19 00:00:00.000000000 Z
11
+ date: 2020-04-14 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: tty-color
@@ -348,6 +348,7 @@ files:
348
348
  - LICENSE.txt
349
349
  - README.md
350
350
  - Rakefile
351
+ - Screenshot.png
351
352
  - bin/console
352
353
  - bin/setup
353
354
  - exe/npm_3pp_lister
@@ -383,8 +384,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
383
384
  - !ruby/object:Gem::Version
384
385
  version: '0'
385
386
  requirements: []
386
- rubyforge_project:
387
- rubygems_version: 2.7.6
387
+ rubygems_version: 3.1.2
388
388
  signing_key:
389
389
  specification_version: 4
390
390
  summary: Generates a list of dependencies in package.json, with name, version and