-
Notifications
You must be signed in to change notification settings - Fork 1.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add static assets support #153
Changes from all commits
4625a6a
769cd06
5772382
443eef4
90b2462
bd5c74f
3a7fb6d
64e05e2
57b568a
573baa0
2d9d2de
dca884b
47031e4
539f448
bc12929
524c746
d73ca35
77b1cf5
64e34c0
63ae3cd
e4736d1
bb37152
596e77d
ef48e6f
2b0d4ed
ec86811
101c4f6
5842c70
d7278d2
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,124 @@ | ||
AllCops: | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Can we use the same as rails/rails using the There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think we should follow https://github.com/github/rubocop-github and create a gem There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
|
||
TargetRubyVersion: 2.2 | ||
# RuboCop has a bunch of cops enabled by default. This setting tells RuboCop | ||
# to ignore them, so only the ones explicitly set in this file are enabled. | ||
DisabledByDefault: true | ||
Exclude: | ||
- 'lib/install/templates/**' | ||
- 'vendor/**/*' | ||
- 'node_modules/**/*' | ||
|
||
# Prefer &&/|| over and/or. | ||
Style/AndOr: | ||
Enabled: true | ||
|
||
# Do not use braces for hash literals when they are the last argument of a | ||
# method call. | ||
Style/BracesAroundHashParameters: | ||
Enabled: true | ||
|
||
# Align `when` with `case`. | ||
Style/CaseIndentation: | ||
Enabled: true | ||
|
||
# Align comments with method definitions. | ||
Style/CommentIndentation: | ||
Enabled: true | ||
|
||
# No extra empty lines. | ||
Style/EmptyLines: | ||
Enabled: true | ||
|
||
# In a regular class definition, no empty lines around the body. | ||
Style/EmptyLinesAroundClassBody: | ||
Enabled: true | ||
|
||
# In a regular method definition, no empty lines around the body. | ||
Style/EmptyLinesAroundMethodBody: | ||
Enabled: true | ||
|
||
# In a regular module definition, no empty lines around the body. | ||
Style/EmptyLinesAroundModuleBody: | ||
Enabled: true | ||
|
||
# Use Ruby >= 1.9 syntax for hashes. Prefer { a: :b } over { :a => :b }. | ||
Style/HashSyntax: | ||
Enabled: true | ||
|
||
# Method definitions after `private` or `protected` isolated calls need one | ||
# extra level of indentation. | ||
Style/IndentationConsistency: | ||
Enabled: true | ||
EnforcedStyle: rails | ||
|
||
# Two spaces, no tabs (for indentation). | ||
Style/IndentationWidth: | ||
Enabled: true | ||
|
||
Style/SpaceAfterColon: | ||
Enabled: true | ||
|
||
Style/SpaceAfterComma: | ||
Enabled: true | ||
|
||
Style/SpaceAroundEqualsInParameterDefault: | ||
Enabled: true | ||
|
||
Style/SpaceAroundKeyword: | ||
Enabled: true | ||
|
||
Style/SpaceAroundOperators: | ||
Enabled: true | ||
|
||
Style/SpaceBeforeFirstArg: | ||
Enabled: true | ||
|
||
# Defining a method with parameters needs parentheses. | ||
Style/MethodDefParentheses: | ||
Enabled: true | ||
|
||
# Use `foo {}` not `foo{}`. | ||
Style/SpaceBeforeBlockBraces: | ||
Enabled: true | ||
|
||
# Use `foo { bar }` not `foo {bar}`. | ||
Style/SpaceInsideBlockBraces: | ||
Enabled: true | ||
|
||
# Use `{ a: 1 }` not `{a:1}`. | ||
Style/SpaceInsideHashLiteralBraces: | ||
Enabled: true | ||
|
||
Style/SpaceInsideParens: | ||
Enabled: true | ||
|
||
# Check quotes usage according to lint rule below. | ||
Style/StringLiterals: | ||
Enabled: true | ||
EnforcedStyle: double_quotes | ||
|
||
# Detect hard tabs, no hard tabs. | ||
Style/Tab: | ||
Enabled: true | ||
|
||
# Blank lines should not have any spaces. | ||
Style/TrailingBlankLines: | ||
Enabled: true | ||
|
||
# No trailing whitespace. | ||
Style/TrailingWhitespace: | ||
Enabled: true | ||
|
||
# Use quotes for string literals when they are enough. | ||
Style/UnneededPercentQ: | ||
Enabled: true | ||
|
||
# Align `end` with the matching keyword or starting expression except for | ||
# assignments, where it should be aligned with the LHS. | ||
Lint/EndAlignment: | ||
Enabled: true | ||
EnforcedStyleAlignWith: variable | ||
|
||
# Use my_method(my_arg) not my_method( my_arg ) or my_method my_arg. | ||
Lint/RequireParentheses: | ||
Enabled: true |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -13,10 +13,12 @@ cache: | |
yarn: true | ||
|
||
install: | ||
- gem install rubocop | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. shouldn't this get handled by the gemfile? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @justin808 hmm, may be but don't like dependencies. Also, it seems rubocop is more kinda of standalone program now, like yarn and npm There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yes, it should be in the Gemfile. If it is a development dependency, it should be there. |
||
- nvm install node | ||
- node -v | ||
- npm i -g yarn | ||
- yarn | ||
|
||
script: | ||
- yarn lint | ||
- rubocop |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
source 'https://rubygems.org' | ||
source "https://rubygems.org" | ||
|
||
gemspec |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
require "webpacker/configuration" | ||
|
||
puts "Copying angular loader to #{Webpacker::Configuration.config_path}/loaders" | ||
copy_file "#{__dir__}/config/loaders/installers/angular.js", "config/webpack/loaders/angular.js" | ||
|
||
puts "Copying angular example entry file to #{Webpacker::Configuration.entry_path}" | ||
copy_file "#{__dir__}/examples/angular/hello_angular.js", "#{Webpacker::Configuration.entry_path}/hello_angular.js" | ||
|
||
puts "Copying hello_angular app to #{Webpacker::Configuration.source_path}" | ||
directory "#{__dir__}/examples/angular/hello_angular", "#{Webpacker::Configuration.source_path}/hello_angular" | ||
|
||
puts "Copying tsconfig.json to the Rails root directory for typescript" | ||
copy_file "#{__dir__}/examples/angular/tsconfig.json", "tsconfig.json" | ||
|
||
puts "Installing all angular dependencies" | ||
run "./bin/yarn add typescript ts-loader core-js zone.js rxjs @angular/core @angular/common @angular/compiler @angular/platform-browser @angular/platform-browser-dynamic" | ||
|
||
puts "Webpacker now supports angular.js and typescript 🎉" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
awesome to have rubocop!