Skip to content

Commit

Permalink
Drop webpack(er) (#960)
Browse files Browse the repository at this point in the history
* Drop webpack(er)

It can be easily added in via https://github.com/rails/webpacker#installation

However, we encourage everyone to use Storefront API and SDK to build a custom Storefront UI

https://dev-docs.spreecommerce.org/getting-started/headless-commerce
  • Loading branch information
damianlegawiec authored Aug 20, 2021
1 parent e9eb0df commit a4db9d7
Show file tree
Hide file tree
Showing 30 changed files with 21 additions and 7,331 deletions.
1 change: 0 additions & 1 deletion .browserslistrc

This file was deleted.

30 changes: 2 additions & 28 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ version: 2
jobs:
install_ruby_dependencies:
docker:
- image: circleci/ruby:2.7.4-node-browsers
- image: circleci/ruby:2.7.4
working_directory: ~/app
environment:
BUNDLE_JOBS: 4
Expand All @@ -24,30 +24,10 @@ jobs:
paths:
- vendor/bundle
key: ruby-dependencies-v2-{{ checksum "Gemfile.lock" }}
install_javascript_dependencies:
docker:
- image: circleci/ruby:2.7.4-node-browsers
working_directory: ~/app
steps:
- checkout
- restore_cache:
keys:
- javascript-dependencies-v2-{{ checksum "yarn.lock" }}
- javascript-dependencies-v2
- run:
name: Which yarn?
command: yarn -v
- run:
name: Install Yarn
command: yarn install
- save_cache:
paths:
- node_modules
key: javascript-dependencies-v2-{{ checksum "yarn.lock" }}

run_tests:
docker:
- image: circleci/ruby:2.7.4-node-browsers
- image: circleci/ruby:2.7.4
- image: postgres:13.0-alpine
environment:
POSTGRES_HOST_AUTH_METHOD: trust
Expand All @@ -61,10 +41,6 @@ jobs:
keys:
- ruby-dependencies-v2-{{ checksum "Gemfile.lock" }}
- ruby-dependencies-v2
- restore_cache:
keys:
- javascript-dependencies-v2-{{ checksum "yarn.lock" }}
- javascript-dependencies-v2
- run:
name: Set bundle path
command: bundle config --local path vendor/bundle
Expand Down Expand Up @@ -93,8 +69,6 @@ workflows:
main:
jobs:
- install_ruby_dependencies
- install_javascript_dependencies
- run_tests:
requires:
- install_ruby_dependencies
- install_javascript_dependencies
7 changes: 0 additions & 7 deletions .codeclimate.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,17 +4,10 @@ plugins:
enabled: true
channel: "rubocop-0-59-2" # need to keep this value the same as rubocop version
# https://docs.codeclimate.com/v1.0/docs/rubocop#section-using-rubocop-s-newer-versions
eslint:
enabled: true
channel: "eslint-5-6-0" # need to keep this value the same as eslint version
# https://docs.codeclimate.com/v1.0/docs/eslint#section-eslint-versions
stylelint:
enabled: true
exclude_patterns:
- "**/bin/"
- "config/"
- "db/"
- "**/node_modules/"
- "**/tmp/"
- "**/spec/"
- "**/test/"
Expand Down
3 changes: 0 additions & 3 deletions .eslintignore

This file was deleted.

79 changes: 0 additions & 79 deletions .eslintrc

This file was deleted.

13 changes: 0 additions & 13 deletions .eslintrc.js

This file was deleted.

1 change: 0 additions & 1 deletion .nvmrc

This file was deleted.

3 changes: 0 additions & 3 deletions .postcssrc.yml

This file was deleted.

10 changes: 0 additions & 10 deletions Dockerfile.development
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,6 @@ RUN apt-get update -yq \
# RAILS PACKAGES NEEDED
&& apt-get update \
&& apt-get install -y --no-install-recommends imagemagick postgresql-client \
# INSTALL NODE
&& curl -sL https://deb.nodesource.com/setup_16.x | bash - \
&& apt-get install -y --no-install-recommends nodejs \
# INSTALL YARN
&& curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | apt-key add - \
&& echo "deb https://dl.yarnpkg.com/debian/ stable main" | tee /etc/apt/sources.list.d/yarn.list \
&& apt-get update && apt-get install yarn \
# INSTALL CHROME WEB DRIVER
&& apt-get update \
&& apt-get install -y xvfb \
Expand All @@ -38,9 +31,6 @@ RUN apt-get clean -qy \
RUN mkdir /app
WORKDIR /app

COPY package.json yarn.lock
RUN yarn install

# install specific version of bundler
RUN gem install bundler -v 2.1.4

Expand Down
12 changes: 1 addition & 11 deletions Dockerfile.production
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,7 @@ RUN apt-get update -yq \
&& apt-get install -y -qq --no-install-recommends build-essential curl git-core vim passwd unzip cron gcc wget netcat \
# RAILS PACKAGES NEEDED
&& apt-get update \
&& apt-get install -y --no-install-recommends imagemagick postgresql-client \
# INSTALL NODE
&& curl -sL https://deb.nodesource.com/setup_16.x | bash - \
&& apt-get install -y --no-install-recommends nodejs \
# INSTALL YARN
&& curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | apt-key add - \
&& echo "deb https://dl.yarnpkg.com/debian/ stable main" | tee /etc/apt/sources.list.d/yarn.list \
&& apt-get update && apt-get install yarn
&& apt-get install -y --no-install-recommends imagemagick postgresql-client

# Clean cache and temp files, fix permissions
RUN apt-get clean -qy \
Expand All @@ -22,9 +15,6 @@ RUN apt-get clean -qy \
RUN mkdir /app
WORKDIR /app

COPY package.json yarn.lock ./
RUN yarn install --production

# install specific version of bundler
RUN gem install bundler -v 2.1.4

Expand Down
3 changes: 0 additions & 3 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -70,9 +70,6 @@ gem 'rack-cache' # http caching
# sidekiq
gem 'sidekiq'

# front end
gem 'webpacker', '~> 5.4'

# Spree gems
spree_opts = '~> 4.3.0.rc1'
gem 'spree', spree_opts
Expand Down
9 changes: 0 additions & 9 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -349,8 +349,6 @@ GEM
rack (>= 1.2.0)
rack-protection (2.1.0)
rack
rack-proxy (0.6.5)
rack
rack-test (1.1.0)
rack (>= 1.0, < 3)
rack-timeout (0.6.0)
Expand Down Expand Up @@ -470,7 +468,6 @@ GEM
selenium-webdriver (3.142.7)
childprocess (>= 0.5, < 4.0)
rubyzip (>= 1.2.2)
semantic_range (3.0.0)
sendgrid-actionmailer (3.2.0)
mail (~> 2.7)
sendgrid-ruby (~> 6.4)
Expand Down Expand Up @@ -660,11 +657,6 @@ GEM
addressable (>= 2.3.6)
crack (>= 0.3.2)
hashdiff (>= 0.4.0, < 2.0.0)
webpacker (5.4.0)
activesupport (>= 5.2)
rack-proxy (>= 0.6.1)
railties (>= 5.2)
semantic_range (>= 2.3.0)
websocket-driver (0.7.5)
websocket-extensions (>= 0.1.0)
websocket-extensions (0.1.5)
Expand Down Expand Up @@ -722,7 +714,6 @@ DEPENDENCIES
vcr
web-console (~> 4.0)
webmock
webpacker (~> 5.4)

RUBY VERSION
ruby 2.7.4p191
Expand Down
28 changes: 15 additions & 13 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

[![Circle CI](https://circleci.com/gh/spree/spree_starter.svg?style=svg)](https://circleci.com/gh/spree/spree_starter) [![Maintainability](https://api.codeclimate.com/v1/badges/d240686c99b3d35eb61b/maintainability)](https://codeclimate.com/github/spree/spree_starter/maintainability)

This is a Ruby on Rails application minimal template with [Spree Commerce](https://spreecommerce.org) pre-installed, fully dockerized and ready to be deployed to Heroku.
This a dockerized [Spree Commerce](https://spreecommerce.org) application template ready to for local development and deployment to cloud providers.

## Launch on Heroku

Expand All @@ -20,33 +20,42 @@ This is a Ruby on Rails application minimal template with [Spree Commerce](https
bin/setup
```

### Import sample data such as products, categories, etc (optionally)
### (Optional) Import sample data such as products, categories, etc

```bash
docker-compose run web rake spree_sample:load
```

## Running the project
### Launching local server

```bash
docker-compose up
```

## Updating

```bash
bundle update spree
docker-compose build
```

For additional instructions please visit [Spree Upgrade Guides](https://dev-docs.spreecommerce.org/upgrades)

## Development

### Running rails console
### Launching rails console

```bash
docker-compose run web rails c
```

### Running tests
### Launching bash console

```bash
docker-compose run web bash
bundle exec rspec
```

## Customization
### Adding new gems

Update `Gemfile` and run
Expand All @@ -62,13 +71,6 @@ You will need to restart the server if running:
docker-compose restart
```

### Updating gems

```bash
bundle update spree
docker-compose build
```

## Environment variables

| variable | description | default value |
Expand Down
5 changes: 3 additions & 2 deletions app.json
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
{
"name": "Spree Commerce Demo",
"description": "Spree is a complete open source e-commerce solution built with Ruby on Rails",
"description": "Spree is a is a headless open source e-commerce platform for global brands",
"keywords": [
"spree commerce",
"spree",
"ecommerce",
"rails ecommerce"
"headless commerce",
"global commerce"
],
"logo": "https://spreecommerce.org/wp-content/uploads/2019/09/spree-60x60@2x.png",
"website": "https://spreecommerce.org",
Expand Down
18 changes: 0 additions & 18 deletions app/javascript/packs/application.js

This file was deleted.

Loading

0 comments on commit a4db9d7

Please sign in to comment.