tiny-lite-sys 0.0.1

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.
Files changed (177) hide show
  1. checksums.yaml +7 -0
  2. data/tiny-lite-sys.gemspec +11 -0
  3. data/webpacker-5.4.4/CHANGELOG.md +1074 -0
  4. data/webpacker-5.4.4/CONTRIBUTING.md +33 -0
  5. data/webpacker-5.4.4/Gemfile +13 -0
  6. data/webpacker-5.4.4/Gemfile.lock +183 -0
  7. data/webpacker-5.4.4/MIT-LICENSE +20 -0
  8. data/webpacker-5.4.4/README.md +427 -0
  9. data/webpacker-5.4.4/Rakefile +11 -0
  10. data/webpacker-5.4.4/docs/assets.md +119 -0
  11. data/webpacker-5.4.4/docs/cloud9.md +310 -0
  12. data/webpacker-5.4.4/docs/css.md +308 -0
  13. data/webpacker-5.4.4/docs/deployment.md +130 -0
  14. data/webpacker-5.4.4/docs/docker.md +68 -0
  15. data/webpacker-5.4.4/docs/engines.md +213 -0
  16. data/webpacker-5.4.4/docs/env.md +63 -0
  17. data/webpacker-5.4.4/docs/es6.md +72 -0
  18. data/webpacker-5.4.4/docs/folder-structure.md +66 -0
  19. data/webpacker-5.4.4/docs/integrations.md +220 -0
  20. data/webpacker-5.4.4/docs/misc.md +23 -0
  21. data/webpacker-5.4.4/docs/props.md +223 -0
  22. data/webpacker-5.4.4/docs/target.md +22 -0
  23. data/webpacker-5.4.4/docs/testing.md +136 -0
  24. data/webpacker-5.4.4/docs/troubleshooting.md +158 -0
  25. data/webpacker-5.4.4/docs/typescript.md +190 -0
  26. data/webpacker-5.4.4/docs/v4-upgrade.md +142 -0
  27. data/webpacker-5.4.4/docs/webpack-dev-server.md +92 -0
  28. data/webpacker-5.4.4/docs/webpack.md +364 -0
  29. data/webpacker-5.4.4/docs/yarn.md +23 -0
  30. data/webpacker-5.4.4/gemfiles/Gemfile-rails-edge +12 -0
  31. data/webpacker-5.4.4/gemfiles/Gemfile-rails.5.2.x +9 -0
  32. data/webpacker-5.4.4/gemfiles/Gemfile-rails.6.0.x +9 -0
  33. data/webpacker-5.4.4/lib/install/angular.rb +23 -0
  34. data/webpacker-5.4.4/lib/install/bin/webpack +18 -0
  35. data/webpacker-5.4.4/lib/install/bin/webpack-dev-server +18 -0
  36. data/webpacker-5.4.4/lib/install/binstubs.rb +4 -0
  37. data/webpacker-5.4.4/lib/install/coffee.rb +25 -0
  38. data/webpacker-5.4.4/lib/install/config/babel.config.js +82 -0
  39. data/webpacker-5.4.4/lib/install/config/postcss.config.js +12 -0
  40. data/webpacker-5.4.4/lib/install/config/webpack/development.js +5 -0
  41. data/webpacker-5.4.4/lib/install/config/webpack/environment.js +3 -0
  42. data/webpacker-5.4.4/lib/install/config/webpack/production.js +5 -0
  43. data/webpacker-5.4.4/lib/install/config/webpack/test.js +5 -0
  44. data/webpacker-5.4.4/lib/install/config/webpacker.yml +92 -0
  45. data/webpacker-5.4.4/lib/install/elm.rb +39 -0
  46. data/webpacker-5.4.4/lib/install/erb.rb +25 -0
  47. data/webpacker-5.4.4/lib/install/examples/angular/hello_angular/app/app.component.ts +9 -0
  48. data/webpacker-5.4.4/lib/install/examples/angular/hello_angular/app/app.module.ts +16 -0
  49. data/webpacker-5.4.4/lib/install/examples/angular/hello_angular/index.ts +8 -0
  50. data/webpacker-5.4.4/lib/install/examples/angular/hello_angular/polyfills.ts +73 -0
  51. data/webpacker-5.4.4/lib/install/examples/angular/hello_angular.js +7 -0
  52. data/webpacker-5.4.4/lib/install/examples/coffee/hello_coffee.coffee +4 -0
  53. data/webpacker-5.4.4/lib/install/examples/elm/Main.elm +55 -0
  54. data/webpacker-5.4.4/lib/install/examples/elm/hello_elm.js +16 -0
  55. data/webpacker-5.4.4/lib/install/examples/erb/hello_erb.js.erb +6 -0
  56. data/webpacker-5.4.4/lib/install/examples/react/babel.config.js +99 -0
  57. data/webpacker-5.4.4/lib/install/examples/react/hello_react.jsx +26 -0
  58. data/webpacker-5.4.4/lib/install/examples/react/tsconfig.json +21 -0
  59. data/webpacker-5.4.4/lib/install/examples/stimulus/application.js +1 -0
  60. data/webpacker-5.4.4/lib/install/examples/stimulus/controllers/hello_controller.js +18 -0
  61. data/webpacker-5.4.4/lib/install/examples/stimulus/controllers/index.js +9 -0
  62. data/webpacker-5.4.4/lib/install/examples/svelte/app.svelte +11 -0
  63. data/webpacker-5.4.4/lib/install/examples/svelte/hello_svelte.js +20 -0
  64. data/webpacker-5.4.4/lib/install/examples/typescript/hello_typescript.ts +4 -0
  65. data/webpacker-5.4.4/lib/install/examples/typescript/tsconfig.json +24 -0
  66. data/webpacker-5.4.4/lib/install/examples/vue/app.vue +22 -0
  67. data/webpacker-5.4.4/lib/install/examples/vue/hello_vue.js +72 -0
  68. data/webpacker-5.4.4/lib/install/javascript/packs/application.js +18 -0
  69. data/webpacker-5.4.4/lib/install/loaders/coffee.js +6 -0
  70. data/webpacker-5.4.4/lib/install/loaders/elm.js +25 -0
  71. data/webpacker-5.4.4/lib/install/loaders/erb.js +11 -0
  72. data/webpacker-5.4.4/lib/install/loaders/svelte.js +9 -0
  73. data/webpacker-5.4.4/lib/install/loaders/vue.js +6 -0
  74. data/webpacker-5.4.4/lib/install/react.rb +18 -0
  75. data/webpacker-5.4.4/lib/install/stimulus.rb +12 -0
  76. data/webpacker-5.4.4/lib/install/svelte.rb +29 -0
  77. data/webpacker-5.4.4/lib/install/template.rb +63 -0
  78. data/webpacker-5.4.4/lib/install/typescript.rb +39 -0
  79. data/webpacker-5.4.4/lib/install/vue.rb +49 -0
  80. data/webpacker-5.4.4/lib/tasks/installers.rake +42 -0
  81. data/webpacker-5.4.4/lib/tasks/webpacker/binstubs.rake +13 -0
  82. data/webpacker-5.4.4/lib/tasks/webpacker/check_binstubs.rake +12 -0
  83. data/webpacker-5.4.4/lib/tasks/webpacker/check_node.rake +31 -0
  84. data/webpacker-5.4.4/lib/tasks/webpacker/check_yarn.rake +30 -0
  85. data/webpacker-5.4.4/lib/tasks/webpacker/clean.rake +25 -0
  86. data/webpacker-5.4.4/lib/tasks/webpacker/clobber.rake +20 -0
  87. data/webpacker-5.4.4/lib/tasks/webpacker/compile.rake +43 -0
  88. data/webpacker-5.4.4/lib/tasks/webpacker/info.rake +19 -0
  89. data/webpacker-5.4.4/lib/tasks/webpacker/install.rake +13 -0
  90. data/webpacker-5.4.4/lib/tasks/webpacker/verify_install.rake +13 -0
  91. data/webpacker-5.4.4/lib/tasks/webpacker/yarn_install.rake +16 -0
  92. data/webpacker-5.4.4/lib/tasks/webpacker.rake +28 -0
  93. data/webpacker-5.4.4/lib/webpacker/commands.rb +74 -0
  94. data/webpacker-5.4.4/lib/webpacker/compiler.rb +111 -0
  95. data/webpacker-5.4.4/lib/webpacker/configuration.rb +128 -0
  96. data/webpacker-5.4.4/lib/webpacker/dev_server.rb +66 -0
  97. data/webpacker-5.4.4/lib/webpacker/dev_server_proxy.rb +33 -0
  98. data/webpacker-5.4.4/lib/webpacker/dev_server_runner.rb +72 -0
  99. data/webpacker-5.4.4/lib/webpacker/env.rb +43 -0
  100. data/webpacker-5.4.4/lib/webpacker/helper.rb +195 -0
  101. data/webpacker-5.4.4/lib/webpacker/instance.rb +37 -0
  102. data/webpacker-5.4.4/lib/webpacker/manifest.rb +118 -0
  103. data/webpacker-5.4.4/lib/webpacker/railtie.rb +55 -0
  104. data/webpacker-5.4.4/lib/webpacker/runner.rb +23 -0
  105. data/webpacker-5.4.4/lib/webpacker/version.rb +4 -0
  106. data/webpacker-5.4.4/lib/webpacker/webpack_runner.rb +32 -0
  107. data/webpacker-5.4.4/lib/webpacker.rb +46 -0
  108. data/webpacker-5.4.4/package/__tests__/config.js +66 -0
  109. data/webpacker-5.4.4/package/__tests__/dev_server.js +45 -0
  110. data/webpacker-5.4.4/package/__tests__/development.js +43 -0
  111. data/webpacker-5.4.4/package/__tests__/env.js +46 -0
  112. data/webpacker-5.4.4/package/__tests__/production.js +29 -0
  113. data/webpacker-5.4.4/package/__tests__/staging.js +29 -0
  114. data/webpacker-5.4.4/package/__tests__/test.js +26 -0
  115. data/webpacker-5.4.4/package/config.js +40 -0
  116. data/webpacker-5.4.4/package/configPath.js +3 -0
  117. data/webpacker-5.4.4/package/config_types/__tests__/config_list.js +118 -0
  118. data/webpacker-5.4.4/package/config_types/__tests__/config_object.js +43 -0
  119. data/webpacker-5.4.4/package/config_types/config_list.js +75 -0
  120. data/webpacker-5.4.4/package/config_types/config_object.js +55 -0
  121. data/webpacker-5.4.4/package/config_types/index.js +7 -0
  122. data/webpacker-5.4.4/package/dev_server.js +20 -0
  123. data/webpacker-5.4.4/package/env.js +18 -0
  124. data/webpacker-5.4.4/package/environments/__tests__/base.js +101 -0
  125. data/webpacker-5.4.4/package/environments/base.js +176 -0
  126. data/webpacker-5.4.4/package/environments/development.js +53 -0
  127. data/webpacker-5.4.4/package/environments/production.js +77 -0
  128. data/webpacker-5.4.4/package/environments/test.js +3 -0
  129. data/webpacker-5.4.4/package/index.js +24 -0
  130. data/webpacker-5.4.4/package/rules/babel.js +28 -0
  131. data/webpacker-5.4.4/package/rules/css.js +3 -0
  132. data/webpacker-5.4.4/package/rules/file.js +21 -0
  133. data/webpacker-5.4.4/package/rules/index.js +20 -0
  134. data/webpacker-5.4.4/package/rules/module.css.js +3 -0
  135. data/webpacker-5.4.4/package/rules/module.sass.js +8 -0
  136. data/webpacker-5.4.4/package/rules/node_modules.js +22 -0
  137. data/webpacker-5.4.4/package/rules/sass.js +17 -0
  138. data/webpacker-5.4.4/package/utils/__tests__/deep_assign.js +32 -0
  139. data/webpacker-5.4.4/package/utils/__tests__/deep_merge.js +10 -0
  140. data/webpacker-5.4.4/package/utils/__tests__/get_style_rule.js +65 -0
  141. data/webpacker-5.4.4/package/utils/__tests__/objectify.js +9 -0
  142. data/webpacker-5.4.4/package/utils/deep_assign.js +22 -0
  143. data/webpacker-5.4.4/package/utils/deep_merge.js +22 -0
  144. data/webpacker-5.4.4/package/utils/get_style_rule.js +45 -0
  145. data/webpacker-5.4.4/package/utils/helpers.js +58 -0
  146. data/webpacker-5.4.4/package/utils/objectify.js +3 -0
  147. data/webpacker-5.4.4/package.json +82 -0
  148. data/webpacker-5.4.4/test/command_test.rb +33 -0
  149. data/webpacker-5.4.4/test/compiler_test.rb +80 -0
  150. data/webpacker-5.4.4/test/configuration_test.rb +109 -0
  151. data/webpacker-5.4.4/test/dev_server_runner_test.rb +51 -0
  152. data/webpacker-5.4.4/test/dev_server_test.rb +47 -0
  153. data/webpacker-5.4.4/test/env_test.rb +23 -0
  154. data/webpacker-5.4.4/test/helper_test.rb +157 -0
  155. data/webpacker-5.4.4/test/manifest_test.rb +73 -0
  156. data/webpacker-5.4.4/test/rake_tasks_test.rb +80 -0
  157. data/webpacker-5.4.4/test/test_app/Rakefile +3 -0
  158. data/webpacker-5.4.4/test/test_app/app/javascript/packs/application.js +10 -0
  159. data/webpacker-5.4.4/test/test_app/app/javascript/packs/multi_entry.css +4 -0
  160. data/webpacker-5.4.4/test/test_app/app/javascript/packs/multi_entry.js +4 -0
  161. data/webpacker-5.4.4/test/test_app/bin/webpack +14 -0
  162. data/webpacker-5.4.4/test/test_app/bin/webpack-dev-server +14 -0
  163. data/webpacker-5.4.4/test/test_app/config/application.rb +11 -0
  164. data/webpacker-5.4.4/test/test_app/config/environment.rb +4 -0
  165. data/webpacker-5.4.4/test/test_app/config/webpack/development.js +0 -0
  166. data/webpacker-5.4.4/test/test_app/config/webpacker.yml +103 -0
  167. data/webpacker-5.4.4/test/test_app/config/webpacker_public_root.yml +19 -0
  168. data/webpacker-5.4.4/test/test_app/config.ru +5 -0
  169. data/webpacker-5.4.4/test/test_app/package.json +13 -0
  170. data/webpacker-5.4.4/test/test_app/public/packs/manifest.json +32 -0
  171. data/webpacker-5.4.4/test/test_app/yarn.lock +11 -0
  172. data/webpacker-5.4.4/test/test_helper.rb +33 -0
  173. data/webpacker-5.4.4/test/webpack_runner_test.rb +51 -0
  174. data/webpacker-5.4.4/test/webpacker_test.rb +13 -0
  175. data/webpacker-5.4.4/webpacker.gemspec +31 -0
  176. data/webpacker-5.4.4/yarn.lock +8271 -0
  177. metadata +215 -0
@@ -0,0 +1,92 @@
1
+ # Note: You must restart bin/webpack-dev-server for changes to take effect
2
+
3
+ default: &default
4
+ source_path: app/javascript
5
+ source_entry_path: packs
6
+ public_root_path: public
7
+ public_output_path: packs
8
+ cache_path: tmp/cache/webpacker
9
+ webpack_compile_output: true
10
+
11
+ # Additional paths webpack should lookup modules
12
+ # ['app/assets', 'engine/foo/app/assets']
13
+ additional_paths: []
14
+
15
+ # Reload manifest.json on all requests so we reload latest compiled packs
16
+ cache_manifest: false
17
+
18
+ # Extract and emit a css file
19
+ extract_css: false
20
+
21
+ static_assets_extensions:
22
+ - .jpg
23
+ - .jpeg
24
+ - .png
25
+ - .gif
26
+ - .tiff
27
+ - .ico
28
+ - .svg
29
+ - .eot
30
+ - .otf
31
+ - .ttf
32
+ - .woff
33
+ - .woff2
34
+
35
+ extensions:
36
+ - .mjs
37
+ - .js
38
+ - .sass
39
+ - .scss
40
+ - .css
41
+ - .module.sass
42
+ - .module.scss
43
+ - .module.css
44
+ - .png
45
+ - .svg
46
+ - .gif
47
+ - .jpeg
48
+ - .jpg
49
+
50
+ development:
51
+ <<: *default
52
+ compile: true
53
+
54
+ # Reference: https://webpack.js.org/configuration/dev-server/
55
+ dev_server:
56
+ https: false
57
+ host: localhost
58
+ port: 3035
59
+ public: localhost:3035
60
+ hmr: false
61
+ # Inline should be set to true if using HMR
62
+ inline: true
63
+ overlay: true
64
+ compress: true
65
+ disable_host_check: true
66
+ use_local_ip: false
67
+ quiet: false
68
+ pretty: false
69
+ headers:
70
+ 'Access-Control-Allow-Origin': '*'
71
+ watch_options:
72
+ ignored: '**/node_modules/**'
73
+
74
+
75
+ test:
76
+ <<: *default
77
+ compile: true
78
+
79
+ # Compile test packs to a separate directory
80
+ public_output_path: packs-test
81
+
82
+ production:
83
+ <<: *default
84
+
85
+ # Production depends on precompilation of packs prior to booting for performance.
86
+ compile: false
87
+
88
+ # Extract and emit a css file
89
+ extract_css: true
90
+
91
+ # Cache manifest.json for performance
92
+ cache_manifest: true
@@ -0,0 +1,39 @@
1
+ require "webpacker/configuration"
2
+
3
+ say "Copying elm loader to config/webpack/loaders"
4
+ copy_file "#{__dir__}/loaders/elm.js", Rails.root.join("config/webpack/loaders/elm.js").to_s
5
+
6
+ say "Adding elm loader to config/webpack/environment.js"
7
+ insert_into_file Rails.root.join("config/webpack/environment.js").to_s,
8
+ "const elm = require('./loaders/elm')\n",
9
+ after: /require\(('|")@rails\/webpacker\1\);?\n/
10
+
11
+ insert_into_file Rails.root.join("config/webpack/environment.js").to_s,
12
+ "environment.loaders.prepend('elm', elm)\n",
13
+ before: "module.exports"
14
+
15
+ say "Copying Elm example entry file to #{Webpacker.config.source_entry_path}"
16
+ copy_file "#{__dir__}/examples/elm/hello_elm.js",
17
+ "#{Webpacker.config.source_entry_path}/hello_elm.js"
18
+
19
+ say "Copying Elm app file to #{Webpacker.config.source_path}"
20
+ copy_file "#{__dir__}/examples/elm/Main.elm",
21
+ "#{Webpacker.config.source_path}/Main.elm"
22
+
23
+ say "Installing all Elm dependencies"
24
+ run "yarn add elm elm-webpack-loader"
25
+ run "yarn add --dev elm-hot-webpack-loader"
26
+ run "yarn run elm init"
27
+ run "yarn run elm make #{Webpacker.config.source_path}/Main.elm"
28
+
29
+ say "Updating webpack paths to include .elm file extension"
30
+ insert_into_file Webpacker.config.config_path, "- .elm\n".indent(4), after: /\s+extensions:\n/
31
+
32
+ say "Updating Elm source location"
33
+ gsub_file "elm.json", /\"src\"\n/,
34
+ %("#{Webpacker.config.source_path.relative_path_from(Rails.root)}"\n)
35
+
36
+ say "Updating .gitignore to include elm-stuff folder"
37
+ insert_into_file ".gitignore", "/elm-stuff\n", before: "/node_modules\n"
38
+
39
+ say "Webpacker now supports Elm 🎉", :green
@@ -0,0 +1,25 @@
1
+ require "webpacker/configuration"
2
+
3
+ say "Copying erb loader to config/webpack/loaders"
4
+ copy_file "#{__dir__}/loaders/erb.js", Rails.root.join("config/webpack/loaders/erb.js").to_s
5
+
6
+ say "Adding erb loader to config/webpack/environment.js"
7
+ insert_into_file Rails.root.join("config/webpack/environment.js").to_s,
8
+ "const erb = require('./loaders/erb')\n",
9
+ after: /require\(('|")@rails\/webpacker\1\);?\n/
10
+
11
+ insert_into_file Rails.root.join("config/webpack/environment.js").to_s,
12
+ "environment.loaders.prepend('erb', erb)\n",
13
+ before: "module.exports"
14
+
15
+ say "Updating webpack paths to include .erb file extension"
16
+ insert_into_file Webpacker.config.config_path, "- .erb\n".indent(4), after: /\s+extensions:\n/
17
+
18
+ say "Copying the example entry file to #{Webpacker.config.source_entry_path}"
19
+ copy_file "#{__dir__}/examples/erb/hello_erb.js.erb",
20
+ "#{Webpacker.config.source_entry_path}/hello_erb.js.erb"
21
+
22
+ say "Installing all Erb dependencies"
23
+ run "yarn add rails-erb-loader"
24
+
25
+ say "Webpacker now supports Erb in JS 🎉", :green
@@ -0,0 +1,9 @@
1
+ import { Component } from '@angular/core';
2
+
3
+ @Component({
4
+ selector: 'hello-angular',
5
+ template: `<h1>Hello {{name}}</h1>`
6
+ })
7
+ export class AppComponent {
8
+ name = 'Angular!';
9
+ }
@@ -0,0 +1,16 @@
1
+ import { BrowserModule } from '@angular/platform-browser';
2
+ import { NgModule } from '@angular/core';
3
+
4
+ import { AppComponent } from './app.component';
5
+
6
+ @NgModule({
7
+ declarations: [
8
+ AppComponent
9
+ ],
10
+ imports: [
11
+ BrowserModule
12
+ ],
13
+ providers: [],
14
+ bootstrap: [AppComponent]
15
+ })
16
+ export class AppModule { }
@@ -0,0 +1,8 @@
1
+ import './polyfills.ts';
2
+
3
+ import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';
4
+ import { AppModule } from './app/app.module';
5
+
6
+ document.addEventListener('DOMContentLoaded', () => {
7
+ platformBrowserDynamic().bootstrapModule(AppModule);
8
+ });
@@ -0,0 +1,73 @@
1
+ /**
2
+ * This file includes polyfills needed by Angular and is loaded before the app.
3
+ * You can add your own extra polyfills to this file.
4
+ *
5
+ * This file is divided into 2 sections:
6
+ * 1. Browser polyfills. These are applied before loading ZoneJS and are sorted by browsers.
7
+ * 2. Application imports. Files imported after ZoneJS that should be loaded before your main
8
+ * file.
9
+ *
10
+ * The current setup is for so-called "evergreen" browsers; the last versions of browsers that
11
+ * automatically update themselves. This includes Safari >= 10, Chrome >= 55 (including Opera),
12
+ * Edge >= 13 on the desktop, and iOS 10 and Chrome on mobile.
13
+ *
14
+ * Learn more in https://angular.io/docs/ts/latest/guide/browser-support.html
15
+ */
16
+
17
+ /***************************************************************************************************
18
+ * BROWSER POLYFILLS
19
+ */
20
+
21
+ /** IE9, IE10 and IE11 requires all of the following polyfills. **/
22
+ // import 'core-js/es6/symbol';
23
+ // import 'core-js/es6/object';
24
+ // import 'core-js/es6/function';
25
+ // import 'core-js/es6/parse-int';
26
+ // import 'core-js/es6/parse-float';
27
+ // import 'core-js/es6/number';
28
+ // import 'core-js/es6/math';
29
+ // import 'core-js/es6/string';
30
+ // import 'core-js/es6/date';
31
+ // import 'core-js/es6/array';
32
+ // import 'core-js/es6/regexp';
33
+ // import 'core-js/es6/map';
34
+ // import 'core-js/es6/weak-map';
35
+ // import 'core-js/es6/set';
36
+
37
+ /** IE10 and IE11 requires the following for NgClass support on SVG elements */
38
+ // import 'classlist.js'; // Run `npm install --save classlist.js`.
39
+
40
+ /** Evergreen browsers require these. **/
41
+ import 'core-js/es/reflect';
42
+ import 'core-js/proposals/reflect-metadata';
43
+
44
+
45
+ /**
46
+ * Required to support Web Animations `@angular/animation`.
47
+ * Needed for: All but Chrome, Firefox and Opera. http://caniuse.com/#feat=web-animation
48
+ **/
49
+ // import 'web-animations-js'; // Run `npm install --save web-animations-js`.
50
+
51
+
52
+
53
+ /***************************************************************************************************
54
+ * Zone JS is required by Angular itself.
55
+ */
56
+ import 'zone.js/dist/zone';
57
+ // import 'zone.js/dist/long-stack-trace-zone' // async stack traces with zone.js
58
+
59
+
60
+
61
+ /***************************************************************************************************
62
+ * APPLICATION IMPORTS
63
+ */
64
+
65
+ /**
66
+ * Date, currency, decimal and percent pipes.
67
+ * Needed for: All but Chrome, Firefox, Edge, IE11 and Safari 10
68
+ */
69
+ // import 'intl'; // Run `npm install --save intl`.
70
+ /**
71
+ * Need to import at least one locale-data with intl.
72
+ */
73
+ // import 'intl/locale-data/jsonp/en';
@@ -0,0 +1,7 @@
1
+ // Run this Angular example by adding the following HTML markup to your view:
2
+ //
3
+ // <hello-angular>Loading...</hello-angular>
4
+ //
5
+ // <%= javascript_pack_tag 'hello_angular' %>
6
+
7
+ require('../hello_angular')
@@ -0,0 +1,4 @@
1
+ # Run this example by adding <%= javascript_pack_tag 'hello_coffee' %> to the head of your layout file,
2
+ # like app/views/layouts/application.html.erb.
3
+
4
+ console.log 'Hello world from coffeescript'
@@ -0,0 +1,55 @@
1
+ module Main exposing (..)
2
+
3
+ import Browser
4
+ import Html exposing (Html, h1, text)
5
+ import Html.Attributes exposing (style)
6
+
7
+ -- MODEL
8
+
9
+ type alias Model =
10
+ {
11
+ }
12
+
13
+ -- INIT
14
+
15
+ init : (Model, Cmd Message)
16
+ init =
17
+ (Model, Cmd.none)
18
+
19
+ -- VIEW
20
+
21
+ view : Model -> Html Message
22
+ view model =
23
+ -- The inline style is being used for example purposes in order to keep this example simple and
24
+ -- avoid loading additional resources. Use a proper stylesheet when building your own app.
25
+ h1 [style "display" "flex", style "justify-content" "center"]
26
+ [text "Hello Elm!"]
27
+
28
+ -- MESSAGE
29
+
30
+ type Message
31
+ = None
32
+
33
+ -- UPDATE
34
+
35
+ update : Message -> Model -> (Model, Cmd Message)
36
+ update message model =
37
+ (model, Cmd.none)
38
+
39
+ -- SUBSCRIPTIONS
40
+
41
+ subscriptions : Model -> Sub Message
42
+ subscriptions model =
43
+ Sub.none
44
+
45
+ -- MAIN
46
+
47
+ main : Program (Maybe {}) Model Message
48
+ main =
49
+ Browser.element
50
+ {
51
+ init = always init,
52
+ view = view,
53
+ update = update,
54
+ subscriptions = subscriptions
55
+ }
@@ -0,0 +1,16 @@
1
+ // Run this example by adding <%= javascript_pack_tag "hello_elm" %> to the
2
+ // head of your layout file, like app/views/layouts/application.html.erb.
3
+ // It will render "Hello Elm!" within the page.
4
+
5
+ import {
6
+ Elm
7
+ } from '../Main'
8
+
9
+ document.addEventListener('DOMContentLoaded', () => {
10
+ const target = document.createElement('div')
11
+
12
+ document.body.appendChild(target)
13
+ Elm.Main.init({
14
+ node: target
15
+ })
16
+ })
@@ -0,0 +1,6 @@
1
+ // Run this example by adding <%%= javascript_pack_tag 'hello_erb' %> to the head of your layout file,
2
+ // like app/views/layouts/application.html.erb. Don't forget to uncomment erb tag after adding it to your layout file.
3
+
4
+ <% name = 'Erb' %>
5
+
6
+ console.log('Hello world from <%= name %>')
@@ -0,0 +1,99 @@
1
+ module.exports = function(api) {
2
+ var validEnv = ['development', 'test', 'production']
3
+ var currentEnv = api.env()
4
+ var isDevelopmentEnv = api.env('development')
5
+ var isProductionEnv = api.env('production')
6
+ var isTestEnv = api.env('test')
7
+
8
+ if (!validEnv.includes(currentEnv)) {
9
+ throw new Error(
10
+ 'Please specify a valid `NODE_ENV` or ' +
11
+ '`BABEL_ENV` environment variables. Valid values are "development", ' +
12
+ '"test", and "production". Instead, received: ' +
13
+ JSON.stringify(currentEnv) +
14
+ '.'
15
+ )
16
+ }
17
+
18
+ return {
19
+ presets: [
20
+ isTestEnv && [
21
+ '@babel/preset-env',
22
+ {
23
+ targets: {
24
+ node: 'current'
25
+ },
26
+ modules: 'commonjs'
27
+ },
28
+ '@babel/preset-react'
29
+ ],
30
+ (isProductionEnv || isDevelopmentEnv) && [
31
+ '@babel/preset-env',
32
+ {
33
+ forceAllTransforms: true,
34
+ useBuiltIns: 'entry',
35
+ corejs: 3,
36
+ modules: false,
37
+ exclude: ['transform-typeof-symbol']
38
+ }
39
+ ],
40
+ [
41
+ '@babel/preset-react',
42
+ {
43
+ development: isDevelopmentEnv || isTestEnv,
44
+ useBuiltIns: true
45
+ }
46
+ ]
47
+ ].filter(Boolean),
48
+ plugins: [
49
+ 'babel-plugin-macros',
50
+ '@babel/plugin-syntax-dynamic-import',
51
+ isTestEnv && 'babel-plugin-dynamic-import-node',
52
+ '@babel/plugin-transform-destructuring',
53
+ [
54
+ '@babel/plugin-proposal-class-properties',
55
+ {
56
+ loose: true
57
+ }
58
+ ],
59
+ [
60
+ '@babel/plugin-proposal-object-rest-spread',
61
+ {
62
+ useBuiltIns: true
63
+ }
64
+ ],
65
+ [
66
+ '@babel/plugin-proposal-private-methods',
67
+ {
68
+ loose: true
69
+ }
70
+ ],
71
+ [
72
+ '@babel/plugin-proposal-private-property-in-object',
73
+ {
74
+ loose: true
75
+ }
76
+ ],
77
+ [
78
+ '@babel/plugin-transform-runtime',
79
+ {
80
+ helpers: false,
81
+ regenerator: true,
82
+ corejs: false
83
+ }
84
+ ],
85
+ [
86
+ '@babel/plugin-transform-regenerator',
87
+ {
88
+ async: false
89
+ }
90
+ ],
91
+ isProductionEnv && [
92
+ 'babel-plugin-transform-react-remove-prop-types',
93
+ {
94
+ removeImport: true
95
+ }
96
+ ]
97
+ ].filter(Boolean)
98
+ }
99
+ }
@@ -0,0 +1,26 @@
1
+ // Run this example by adding <%= javascript_pack_tag 'hello_react' %> to the head of your layout file,
2
+ // like app/views/layouts/application.html.erb. All it does is render <div>Hello React</div> at the bottom
3
+ // of the page.
4
+
5
+ import React from 'react'
6
+ import ReactDOM from 'react-dom'
7
+ import PropTypes from 'prop-types'
8
+
9
+ const Hello = props => (
10
+ <div>Hello {props.name}!</div>
11
+ )
12
+
13
+ Hello.defaultProps = {
14
+ name: 'David'
15
+ }
16
+
17
+ Hello.propTypes = {
18
+ name: PropTypes.string
19
+ }
20
+
21
+ document.addEventListener('DOMContentLoaded', () => {
22
+ ReactDOM.render(
23
+ <Hello name="React" />,
24
+ document.body.appendChild(document.createElement('div')),
25
+ )
26
+ })
@@ -0,0 +1,21 @@
1
+ {
2
+ "compilerOptions": {
3
+ "declaration": false,
4
+ "emitDecoratorMetadata": true,
5
+ "experimentalDecorators": true,
6
+ "lib": ["es6", "dom"],
7
+ "module": "es6",
8
+ "moduleResolution": "node",
9
+ "sourceMap": true,
10
+ "target": "es5",
11
+ "jsx": "react",
12
+ "noEmit": true
13
+ },
14
+ "exclude": [
15
+ "**/*.spec.ts",
16
+ "node_modules",
17
+ "vendor",
18
+ "public"
19
+ ],
20
+ "compileOnSave": false
21
+ }
@@ -0,0 +1 @@
1
+ import "controllers"
@@ -0,0 +1,18 @@
1
+ // Visit The Stimulus Handbook for more details
2
+ // https://stimulusjs.org/handbook/introduction
3
+ //
4
+ // This example controller works with specially annotated HTML like:
5
+ //
6
+ // <div data-controller="hello">
7
+ // <h1 data-target="hello.output"></h1>
8
+ // </div>
9
+
10
+ import { Controller } from "stimulus"
11
+
12
+ export default class extends Controller {
13
+ static targets = [ "output" ]
14
+
15
+ connect() {
16
+ this.outputTarget.textContent = 'Hello, Stimulus!'
17
+ }
18
+ }
@@ -0,0 +1,9 @@
1
+ // Load all the controllers within this directory and all subdirectories.
2
+ // Controller files must be named *_controller.js.
3
+
4
+ import { Application } from "stimulus"
5
+ import { definitionsFromContext } from "stimulus/webpack-helpers"
6
+
7
+ const application = Application.start()
8
+ const context = require.context("controllers", true, /_controller\.js$/)
9
+ application.load(definitionsFromContext(context))
@@ -0,0 +1,11 @@
1
+ <script>
2
+ export let name;
3
+ </script>
4
+
5
+ <style>
6
+ h1 {
7
+ color: #FF3E00;
8
+ }
9
+ </style>
10
+
11
+ <h1>Hello {name}!</h1>
@@ -0,0 +1,20 @@
1
+ /* eslint no-console: 0 */
2
+ // Run this example by adding <%= javascript_pack_tag 'hello_svelte' %> (and
3
+ // <%= stylesheet_pack_tag 'hello_svelte' %> if you have styles in your component)
4
+ // to the head of your layout file,
5
+ // like app/views/layouts/application.html.erb.
6
+ // All it does is render <div>Hello Svelte!</div> at the bottom of the page.
7
+
8
+ import App from '../app.svelte'
9
+
10
+ document.addEventListener('DOMContentLoaded', () => {
11
+ const app = new App({
12
+ target: document.body,
13
+ props: {
14
+ name: 'Svelte'
15
+ }
16
+ });
17
+
18
+ window.app = app;
19
+ })
20
+
@@ -0,0 +1,4 @@
1
+ // Run this example by adding <%= javascript_pack_tag 'hello_typescript' %> to the head of your layout file,
2
+ // like app/views/layouts/application.html.erb.
3
+
4
+ console.log('Hello world from typescript');
@@ -0,0 +1,24 @@
1
+ {
2
+ "compilerOptions": {
3
+ "declaration": false,
4
+ "emitDecoratorMetadata": true,
5
+ "experimentalDecorators": true,
6
+ "lib": ["es6", "dom"],
7
+ "module": "es6",
8
+ "moduleResolution": "node",
9
+ "baseUrl": ".",
10
+ "paths": {
11
+ "*": ["node_modules/*", "app/javascript/*"]
12
+ },
13
+ "sourceMap": true,
14
+ "target": "es5",
15
+ "noEmit": true
16
+ },
17
+ "exclude": [
18
+ "**/*.spec.ts",
19
+ "node_modules",
20
+ "vendor",
21
+ "public"
22
+ ],
23
+ "compileOnSave": false
24
+ }
@@ -0,0 +1,22 @@
1
+ <template>
2
+ <div id="app">
3
+ <p>{{ message }}</p>
4
+ </div>
5
+ </template>
6
+
7
+ <script>
8
+ export default {
9
+ data: function () {
10
+ return {
11
+ message: "Hello Vue!"
12
+ }
13
+ }
14
+ }
15
+ </script>
16
+
17
+ <style scoped>
18
+ p {
19
+ font-size: 2em;
20
+ text-align: center;
21
+ }
22
+ </style>