ember-cli-rails 0.8.2 → 0.8.3

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
  SHA1:
3
- metadata.gz: af3a20f6caa120e87d2e61347d2bb117b5bcad75
4
- data.tar.gz: 304bfae43332d480932067522ef703c780d04207
3
+ metadata.gz: 6a9a7180945c981aa7cd40061080728d0b3479ea
4
+ data.tar.gz: d74ef9352b130fc0f4865ec79e68591eba9c8eb3
5
5
  SHA512:
6
- metadata.gz: 4f0186521688b4bc2730641f1526004f295b37ebf21e26e506363879f0540dd736743bd19bcdda9b906956fe4f69f77ac823f4d3f43812a33d1d46ef707f0f07
7
- data.tar.gz: 70ca38c2abbc29ee08ce154e6d6e9554ce45110eabd678ea4164165ecb6e35c66d7072a2e26a40c5a45aecdedf200482ec191495f62dbc36534331bbc92bc8a0
6
+ metadata.gz: 015b3b7369a54946bb94f0bbb8f488a5eaaf80b1ce20ce6c9aee4126d048c07f15b41a1667fee4ac3896180a4116b0738af3eb061cc079bd5f86a8c59553229c
7
+ data.tar.gz: 84671272943be7d029051112fa052e2bb7cdca22ff6bdf3a3ce0000c1f9d8676791f020143040c8a9a0225fcc5177a1045c83302cc0887e3e86e39b32e6b0b39
data/CHANGELOG.md CHANGED
@@ -1,6 +1,13 @@
1
1
  master
2
2
  ------
3
3
 
4
+ 0.8.3
5
+ -----
6
+
7
+ * Add support for integrating with `yarn`. [#496]
8
+
9
+ [#496]: https://github.com/thoughtbot/ember-cli-rails/pull/496
10
+
4
11
  0.8.2.
5
12
  ------
6
13
 
data/README.md CHANGED
@@ -79,6 +79,8 @@ c.app :frontend, path: "~/projects/my-ember-app"
79
79
 
80
80
  - `silent` - this provides `--silent` option for Ember CLI commands to control verbosity of their output.
81
81
 
82
+ - `yarn` - enables the [yarn](https://github.com/yarnpkg/yarn) package manager when installing dependencies
83
+
82
84
  ```ruby
83
85
  EmberCli.configure do |c|
84
86
  c.app :adminpanel # path defaults to `Rails.root.join("adminpanel")`
@@ -45,7 +45,7 @@ module EmberCli
45
45
  Install it:
46
46
 
47
47
  $ cd #{root}
48
- $ npm install
48
+ $ #{package_manager} install
49
49
  MSG
50
50
  end
51
51
  end
@@ -86,6 +86,12 @@ module EmberCli
86
86
  @npm ||= app_options.fetch(:npm_path) { which("npm") }
87
87
  end
88
88
 
89
+ def yarn
90
+ if yarn?
91
+ @yarn ||= app_options.fetch(:yarn_path) { which("yarn") }
92
+ end
93
+ end
94
+
89
95
  def node_modules
90
96
  @node_modules ||= root.join("node_modules")
91
97
  end
@@ -102,6 +108,18 @@ module EmberCli
102
108
 
103
109
  attr_reader :app, :ember_cli_root, :environment, :rails_root
104
110
 
111
+ def package_manager
112
+ if yarn?
113
+ "yarn"
114
+ else
115
+ "npm"
116
+ end
117
+ end
118
+
119
+ def yarn?
120
+ app_options[:yarn] || app_options[:yarn_path]
121
+ end
122
+
105
123
  def app_name
106
124
  app.name
107
125
  end
@@ -41,7 +41,12 @@ module EmberCli
41
41
  clean_ember_dependencies!
42
42
  end
43
43
 
44
- run! "#{paths.npm} prune && #{paths.npm} install"
44
+ if paths.yarn
45
+ run! "#{paths.yarn} install"
46
+ else
47
+ run! "#{paths.npm} prune && #{paths.npm} install"
48
+ end
49
+
45
50
  run! "#{paths.bower} prune && #{paths.bower} install"
46
51
  end
47
52
 
@@ -1,3 +1,3 @@
1
1
  module EmberCli
2
- VERSION = "0.8.2".freeze
2
+ VERSION = "0.8.3".freeze
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ember-cli-rails
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.8.2
4
+ version: 0.8.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Pavel Pravosud
@@ -10,7 +10,7 @@ authors:
10
10
  autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2016-10-24 00:00:00.000000000 Z
13
+ date: 2016-10-28 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: ember-cli-rails-assets