fastlane-plugin-npm 0.2.0 → 0.2.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: fd934fcc7364a6ea35c25b152feb8e99b4fb31356991b4f541b7c344c973f7bc
4
- data.tar.gz: dd77a9c60180186ce5df50334ab25fccbc14adc456c78fd42267dc009c24f0a6
3
+ metadata.gz: 4ccc983c93f0ab055b0185c9e4b628473f4312c4f54b1a923c9c19a14eff36e5
4
+ data.tar.gz: f9dee2b29b096224220e1c6d7686754d333a4398a328f5dd080dca871ee2b7f4
5
5
  SHA512:
6
- metadata.gz: aa002fba732679883ba2cb8414c059b80b1cc6fbee72eeeb839b93d057c4f7fb3932f795ce3c5ea659580570e3334e51c07a0928f55f687aa330c780fdec2278
7
- data.tar.gz: c59ab6c570d6f398b026891eaad20a3600973772084f95bb3eff930d82c4988fdb199e65e0fa71459733b3737b5c762a3baa0cb690b9fcefaf96009e526e860a
6
+ metadata.gz: efb4b8ec0c879420623e4146c702df158754630c944f5b98241a55703e0e4e59b338d5b60d651c1c017f32c95244ac7c198f58711c93e0e10d81f48e2518cf42
7
+ data.tar.gz: f22e19cca0724db8d9ad9bdad6f0258dbc6924b9ee787f91dbcdcc756e031d7a65bd8e8b160d50884811db678481251bb7011668203477c845867c863ad3f7a5
data/README.md CHANGED
@@ -2,6 +2,8 @@
2
2
 
3
3
  [![fastlane Plugin Badge](https://rawcdn.githack.com/fastlane/fastlane/master/fastlane/assets/plugin-badge.svg)](https://rubygems.org/gems/fastlane-plugin-npm)
4
4
 
5
+
6
+
5
7
  ## Getting Started
6
8
 
7
9
  This project is a [_fastlane_](https://github.com/fastlane/fastlane) plugin. To get started with `fastlane-plugin-npm`, add it to your project by running:
@@ -10,17 +12,21 @@ This project is a [_fastlane_](https://github.com/fastlane/fastlane) plugin. To
10
12
  fastlane add_plugin npm
11
13
  ```
12
14
 
15
+
16
+
13
17
  ## About npm
14
18
 
15
19
  A very simple plugin to run npm scripts
16
20
 
17
21
  **Note to author:** Add a more detailed description about this plugin here. If your plugin contains multiple actions, make sure to mention them here.
18
22
 
23
+
24
+
19
25
  ## Example
20
26
 
21
27
  Check out the [example `Fastfile`](fastlane/Fastfile) to see how to use this plugin. Try it by cloning the repo, running `fastlane install_plugins` and `bundle exec fastlane test`.
22
28
 
23
- **Note to author:** Please set up a sample project to make it easy for users to explore what your plugin does. Provide everything that is necessary to try out the plugin in this project (including a sample Xcode/Android project if necessary)
29
+
24
30
 
25
31
  ## Run tests for this plugin
26
32
 
@@ -35,18 +41,26 @@ To automatically fix many of the styling issues, use
35
41
  rubocop -a
36
42
  ```
37
43
 
44
+
45
+
38
46
  ## Issues and Feedback
39
47
 
40
48
  For any other issues and feedback about this plugin, please submit it to this repository.
41
49
 
50
+
51
+
42
52
  ## Troubleshooting
43
53
 
44
54
  If you have trouble using plugins, check out the [Plugins Troubleshooting](https://docs.fastlane.tools/plugins/plugins-troubleshooting/) guide.
45
55
 
56
+
57
+
46
58
  ## Using _fastlane_ Plugins
47
59
 
48
60
  For more information about how the `fastlane` plugin system works, check out the [Plugins documentation](https://docs.fastlane.tools/plugins/create-plugin/).
49
61
 
62
+
63
+
50
64
  ## About _fastlane_
51
65
 
52
66
  _fastlane_ is the easiest way to automate beta deployments and releases for your iOS and Android apps. To learn more, check out [fastlane.tools](https://fastlane.tools).
@@ -6,17 +6,17 @@ module Fastlane
6
6
  class NpmInstallAction < Action
7
7
  def self.run(params)
8
8
  # rm may exit with non zero in the case where there is no node_modules and that's what we want anyway
9
- FastlaneCore::CommandExecutor.execute(command: 'rm -rf ../node_modules 2> /dev/null',
10
- print_command: FastlaneCore::Globals.verbose?,
11
- print_all: FastlaneCore::Globals.verbose?)
9
+ if params[:fresh]
10
+ FastlaneCore::CommandExecutor.execute(command: 'rm -rf ../node_modules 2> /dev/null',
11
+ print_command: FastlaneCore::Globals.verbose?,
12
+ print_all: FastlaneCore::Globals.verbose?)
13
+ end
12
14
 
13
15
  other_action.npm_run(
14
16
  script: 'install',
15
17
  step_name: params[:step_name],
16
18
  arguments: params[:arguments]
17
19
  )
18
-
19
- other_action.npm_post_install if params[:post_install_after]
20
20
  end
21
21
 
22
22
  def self.description
@@ -44,7 +44,7 @@ module Fastlane
44
44
  optional: true,
45
45
  type: String),
46
46
 
47
- FastlaneCore::ConfigItem.new(key: :clean,
47
+ FastlaneCore::ConfigItem.new(key: :fresh,
48
48
  default_value: false,
49
49
  description: "Deletes node_modules folder",
50
50
  optional: true,
@@ -55,12 +55,6 @@ module Fastlane
55
55
  description: "Script arguments",
56
56
  optional: true,
57
57
  type: Array),
58
-
59
- FastlaneCore::ConfigItem.new(key: :post_install_after,
60
- default_value: false,
61
- description: "Run postinstall script right after",
62
- optional: true,
63
- type: Boolean),
64
58
  ]
65
59
  end
66
60
 
@@ -5,15 +5,19 @@ module Fastlane
5
5
  module Actions
6
6
  class NpmLintAction < Action
7
7
  def self.run(params)
8
+ arguments = []
9
+ arguments = ['--fix'] if params[:fix]
10
+ arguments.concat params[:fix]
11
+
8
12
  other_action.npm_run(
9
13
  script: 'lint',
10
14
  step_name: params[:step_name],
11
- arguments: params[:arguments]
15
+ arguments: arguments
12
16
  )
13
17
  end
14
18
 
15
19
  def self.description
16
- "A very simple plugin to run npm scripts"
20
+ "Runs lint script"
17
21
  end
18
22
 
19
23
  def self.authors
@@ -37,6 +41,12 @@ module Fastlane
37
41
  optional: true,
38
42
  type: String),
39
43
 
44
+ FastlaneCore::ConfigItem.new(key: :fix,
45
+ default_value: false,
46
+ description: "Run postinstall script right after",
47
+ optional: true,
48
+ type: Boolean),
49
+
40
50
  FastlaneCore::ConfigItem.new(key: :arguments,
41
51
  default_value: [],
42
52
  description: "Script arguments",
@@ -6,7 +6,7 @@ module Fastlane
6
6
  class NpmRunAction < Action
7
7
  def self.run(params)
8
8
  command = ['npm', 'run', params[:script]]
9
- command = ['npm', params[:script]] if ['install', 'test'].include? params[:script]
9
+ command = ['npm', params[:script]] if ['install', 'test', 'start'].include? params[:script]
10
10
 
11
11
  command.concat params[:arguments]
12
12
 
@@ -1,5 +1,5 @@
1
1
  module Fastlane
2
2
  module Npm
3
- VERSION = "0.2.0"
3
+ VERSION = "0.2.5"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fastlane-plugin-npm
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0
4
+ version: 0.2.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Erick Martins