vueonrails 1.0.0.beta2 → 1.0.0.beta3

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: db191c0206d670d87864af0aa9a9c72b14bf900cb69484de1c17a670625c3ace
4
- data.tar.gz: 5631b0e8d8c9af119048f86b7f3e64bfe2943123b474b3ed30482d38f4708103
3
+ metadata.gz: 4308786754408c51f8a1e1299c0dffbd7d7f23d42e693815c56474d6a5b2de86
4
+ data.tar.gz: 1915f256ee3faddc68ab55ebaee0f958e74338b403f5e6f314a39c4746dcf03a
5
5
  SHA512:
6
- metadata.gz: e9df496e99bdd437dfff15979b016ed5e409a26ce94c0188404887b063216e8f5a02760526a684372f5273c1798eb666e9d572ec76c0be6a7d07ec07b1c6c604
7
- data.tar.gz: 91262456fc0092fa9b0bca55cac34b1230fcfb763d50c45f7f8e7c577ee93c48772367f106c3ff7fe0271792ee240e3cc3fbf82f5532236f6cfc88b349e2fbdf
6
+ metadata.gz: 4d79f39ad995fba55953daaeef8cdfc387064a548a77cc99511952782ccff674f6700a66209ffa30ef26047d1dbfd21468e572e596e590e6c4ad364ca257260f
7
+ data.tar.gz: 00df4fbf3c519c7e1420e1c74d9b5241630daa15302ff667cd1a0dd3b3776aaef837e9db27ff4e92950f1fa8803e3f43c4e8be8decc48d631a25b28ae0067641
@@ -1,5 +1,3 @@
1
- require 'hypernova'
2
-
3
1
  module SyntaxHelper
4
2
  def specific_page_vue
5
3
  " #{controller_name} #{action_name} "
@@ -19,7 +19,6 @@ class VueGenerator < Rails::Generators::NamedBase
19
19
  table: {type: :boolean, default: false},
20
20
  modal: {type: :boolean, default: false},
21
21
  click: {type: :boolean, default: false},
22
- pug: {type: :boolean, default: false}
23
22
  }.freeze
24
23
 
25
24
  class_option :ssr, type: :string, default: nil
@@ -83,6 +83,19 @@ eos
83
83
  insert_into_file Rails.root.join("package.json").to_s,
84
84
  scripts, after: "\"private\": true,\n"
85
85
 
86
+ babelrc = <<-eos
87
+ "env": {
88
+ "test": {
89
+ "presets": [
90
+ ["env", { "targets": { "node": "current" }}]
91
+ ]
92
+ }
93
+ },
94
+ eos
95
+
96
+ insert_into_file Rails.root.join(".babelrc").to_s,
97
+ babelrc, before: " \"presets\": ["
98
+
86
99
  # Insert locale.js as a default i18n and add second locale cn.yml
87
100
  copy_file "#{__dir__}/../generators/templates/i18n/index.js", Rails.root.join("app/javascript/locales/locale.js").to_s
88
101
  copy_file "#{__dir__}/../generators/templates/i18n/cn.yml", Rails.root.join("config/locales/cn.yml").to_s
data/lib/installs/test.rb CHANGED
@@ -28,4 +28,16 @@ insert_into_file Rails.root.join("package.json").to_s,
28
28
  "#{scripts}",
29
29
  after: "\"private\": true,\n"
30
30
 
31
- run "yarn add jest-serializer-vue vue-jest babel-jest --no-progress --silent"
31
+ babelrc = <<-eos
32
+ "test": {
33
+ "presets": [
34
+ ["env", { "targets": { "node": "current" }}]
35
+ ]
36
+ },
37
+ eos
38
+
39
+ insert_into_file Rails.root.join(".babelrc").to_s,
40
+ "#{babelrc}",
41
+ before: " \"presets\": ["
42
+
43
+ run "yarn add jest-serializer-vue vue-jest babel-jest --no-progress --silent"
@@ -1,3 +1,4 @@
1
1
  module Vueonrails
2
- VERSION = "1.0.0.beta2"
2
+ # VERSION = "0.3.1"
3
+ VERSION = "1.0.0.beta3"
3
4
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: vueonrails
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0.beta2
4
+ version: 1.0.0.beta3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Bryan Lim
@@ -57,7 +57,6 @@ files:
57
57
  - lib/generators/options/list.rb
58
58
  - lib/generators/options/modal.rb
59
59
  - lib/generators/options/parent.rb
60
- - lib/generators/options/pug.rb
61
60
  - lib/generators/options/seperate.rb
62
61
  - lib/generators/options/single.rb
63
62
  - lib/generators/options/ssr.rb
@@ -83,8 +82,6 @@ files:
83
82
  - lib/installs/Procfile
84
83
  - lib/installs/config/alias.js
85
84
  - lib/installs/i18n.rb
86
- - lib/installs/loaders/pug.js
87
- - lib/installs/pug.rb
88
85
  - lib/installs/setup.rb
89
86
  - lib/installs/spv.rb
90
87
  - lib/installs/ssr.rb
@@ -1,14 +0,0 @@
1
- pugtemplate = <<-eos
2
- <template lang="pug">
3
- ##{name}
4
- p {{ message }}
5
- </template>
6
- eos
7
-
8
- if options[:seperate] == true
9
- gsub_file Rails.root.join("#{PARTS_PATH}/#{name}/#{name}.vue").to_s,
10
- /<template>[^\]]*<\/template>/, pugtemplate
11
- else
12
- gsub_file Rails.root.join("#{PARTS_PATH}/#{name}.vue").to_s,
13
- /<template>[^\]]*<\/template>/, pugtemplate
14
- end
@@ -1,15 +0,0 @@
1
- // Generated by Vue on Rails https://github.com/vueonrails/vueonrails
2
- // This is required to support Pug in Vue on Rails.
3
-
4
- module.exports = {
5
- test: /\.pug$/,
6
- oneOf: [
7
- {
8
- resourceQuery: /^\?vue/,
9
- use: ['pug-plain-loader']
10
- },
11
- {
12
- use: ['raw-loader', 'pug-plain-loader']
13
- }
14
- ]
15
- }
data/lib/installs/pug.rb DELETED
@@ -1,12 +0,0 @@
1
- # install pug dependencies
2
- run "yarn add pug pug-plain-loader"
3
-
4
- # add the pug loader
5
- copy_file "#{__dir__}/loaders/pug.js", Rails.root.join("config/webpack/loaders/pug.js").to_s
6
-
7
- # insert pug into the environment.js
8
- insert_into_file Rails.root.join("config/webpack/environment.js").to_s,
9
- "const pug = require('./loaders/pug')\n", after: "require('@rails/webpacker')\n"
10
-
11
- insert_into_file Rails.root.join("config/webpack/environment.js").to_s,
12
- "environment.loaders.prepend('pug', pug)\n", before: "module.exports = environment"