Skip to content
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

Remove webpacker as a dependency #146

Closed
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
64 changes: 53 additions & 11 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -1,18 +1,49 @@
version: 2
jobs:
build:
working_directory: ~/webpacker-react
version: 2.1

orbs:
ruby: circleci/[email protected]
node: circleci/[email protected]
browser-tools: circleci/[email protected]

executors:
ruby-node-executor:
parameters:
ruby-version:
type: string
default: '3.0'
working_directory: ~/react-rails-components
docker:
- image: circleci/ruby:2.4.3-node-browsers
environment:
RAILS_ENV: test
- image: cimg/ruby:<< parameters.ruby-version >>-node
environment:
RAILS_ENV: test

jobs:
run-build:
parameters:
ruby-version:
type: string
default: '3.0'
parallelism: 1
executor:
name: ruby-node-executor
ruby-version: << parameters.ruby-version >>

steps:
- checkout

# Install dependencies
- run:
name: bundle install
command: bundle install --path=vendor/bundle --jobs=4 --retry=3
# Docs: https://circleci.com/developer/orbs/orb/circleci/browser-tools#commands-install-chromedriver
- browser-tools/install-chrome
- browser-tools/install-chromedriver

# Docs: https://circleci.com/developer/orbs/orb/circleci/ruby#commands-install-deps
- ruby/install-deps

# Docs: https://circleci.com/developer/orbs/orb/circleci/node#commands-install-packages
- node/install-packages:
pkg-manager: yarn
app-dir: javascript/webpacker_react-npm-module
include-branch-in-cache-key: false

- run:
command: yarn
pwd: javascript/webpacker_react-npm-module
Expand All @@ -30,3 +61,14 @@ jobs:
# Tests
- run:
command: bundle exec rake test

workflows:
version: 2
build:
jobs:
- run-build:
matrix:
parameters:
ruby-version:
- '3.0'
- '3.1'
11 changes: 3 additions & 8 deletions .rubocop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,6 @@ AllCops:
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`.
Layout/CaseIndentation:
Enabled: true
Expand Down Expand Up @@ -93,19 +88,19 @@ Style/StringLiterals:
EnforcedStyle: double_quotes

# Detect hard tabs, no hard tabs.
Layout/Tab:
Layout/IndentationStyle:
Enabled: true

# Blank lines should not have any spaces.
Layout/TrailingBlankLines:
LineLayout/TrailingEmptyLines:
Enabled: true

# No trailing whitespace.
Layout/TrailingWhitespace:
Enabled: true

# Use quotes for string literals when they are enough.
Style/UnneededPercentQ:
Style/RedundantPercentQ:
Enabled: true

# Align `end` with the matching keyword or starting expression except for
Expand Down
4 changes: 1 addition & 3 deletions Gemfile
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
source "https://rubygems.org"

gem "rubocop", ">= 0.47", require: false
gem "rails", "~> 5.2.0"
gem "webpacker", "~> 4.0.0"
gem "puma", "~> 4.0"
gem "pry-byebug"

# Specify your gem's dependencies in webpacker-react.gemspec
gemspec
Loading