esbuild-rails 0.1.1 → 0.1.2

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: ea02c3de6d84b9d5181fa87935369ecdd5dc46d042079c44b4634f5929ffecf6
4
- data.tar.gz: 965a84e11aa7585646ca6863410e0d0c3b7cb45f101f3b8e7b5495e15e2f8145
3
+ metadata.gz: c6981c18075254b8cf323625401fd3ac8e4823cd7c751de38b62cad747011e5a
4
+ data.tar.gz: c157fb4d1ab9390d1b687ec101ec54f2a986875912c7e57fbc1f4d7efd321916
5
5
  SHA512:
6
- metadata.gz: b99b0218f265d3179c6aa3349895a48ef046a2cfd277af306b2cafb257145fcf59d330d86a0762622e1a5295d224a462b53394b012a9c4f5a1d49b2627d64cf5
7
- data.tar.gz: cdc7303a7ec2888080a864591602562c316ef3ba35df1b5e148a632a65b54ad93aed0e992af30efdb7067e923c4f85d2aa94de7edcaaeb2d5f617efa9a666d58
6
+ metadata.gz: b92bdd273cb9fbdbe188cef5ee63ed095ca051af2445caad93955e1d396c995c6b8a47a72807eda2ed49e149fc12bbf6e22e12d63b98cbc1954b005c5006b53f
7
+ data.tar.gz: 041e8bfa9e2a8008dbb39f2907ee4550fdd381ec6fd0ee2ceac2ae826c9ee1a675daecde7a0b384a6972c883230f89e126ed7f8140cf0a4612c9b90e6aae19a1
data/README.md CHANGED
@@ -2,9 +2,9 @@
2
2
 
3
3
  Use [esbuild](https://esbuild.github.io) to bundle your JavaScript and deliver it via the asset pipeline in Rails. This gem provides an installer to get you going with esbuild in a new Rails application, and a convention to use `app/assets/esbuilds` to hold your bundled output as artifacts that are not checked into source control (the installer adds this directory to `.gitignore` by default).
4
4
 
5
- You develop using this approach by running esbuild in watch mode in a terminal with `npm run watch` (and your Rails server in another, if you're not using something like [puma-dev](https://github.com/puma/puma-dev). Whenever esbuild detects changes to any of the JavaScript files in your project, it'll bundle `app/javascript/application.js` into `app/assets/esbuilds/javascript.js`. You can refer to the build output in your layout using the standard asset pipeline approach with `<%= javascript_include_tag "application" %>`.
5
+ You develop using this approach by running esbuild in watch mode in a terminal with `yarn build --watch` (and your Rails server in another, if you're not using something like [puma-dev](https://github.com/puma/puma-dev). Whenever esbuild detects changes to any of the JavaScript files in your project, it'll bundle `app/javascript/application.js` into `app/assets/esbuilds/javascript.js`. You can refer to the build output in your layout using the standard asset pipeline approach with `<%= javascript_include_tag "application" %>`.
6
6
 
7
- When you deploy your application to production, esbuild attaches to the `assets:precompile` task to ensure that all your package dependencies from `package.json` have been installed via npm, and then runs `npm run build` to process `app/javascript/application.js` into `app/assets/esbuilds/javascript.js`. The latter file is then picked up by the asset pipeline, digested, and copied into public/assets, as any other asset pipeline file.
7
+ When you deploy your application to production, esbuild attaches to the `assets:precompile` task to ensure that all your package dependencies from `package.json` have been installed via npm, and then runs `yarn build` to process `app/javascript/application.js` into `app/assets/esbuilds/javascript.js`. The latter file is then picked up by the asset pipeline, digested, and copied into public/assets, as any other asset pipeline file.
8
8
 
9
9
  That's it!
10
10
 
@@ -13,7 +13,7 @@ You can tailor the configuration of esbuild through the build script in `package
13
13
 
14
14
  ## Installation
15
15
 
16
- You must already have node and npm installed on your system. Then:
16
+ You must already have node and yarn installed on your system. Then:
17
17
 
18
18
  1. Add `esbuild-rails` to your Gemfile with `gem 'esbuild-rails'`
19
19
  2. Run `./bin/bundle install`
@@ -1,3 +1,3 @@
1
1
  module Esbuild
2
- VERSION = "0.1.1"
2
+ VERSION = "0.1.2"
3
3
  end
@@ -26,4 +26,4 @@ end
26
26
 
27
27
  say "Create default package.json and install esbuild"
28
28
  copy_file "#{__dir__}/package.json", "package.json"
29
- run "npm i esbuild"
29
+ run "yarn add esbuild"
@@ -2,7 +2,6 @@
2
2
  "name": "myapp",
3
3
  "private": "true",
4
4
  "scripts": {
5
- "build": "esbuild app/javascript/application.js --outfile=app/assets/esbuilds/application.js --bundle",
6
- "watch": "npm run build -- --watch"
5
+ "build": "esbuild app/javascript/application.js --outfile=app/assets/esbuilds/application.js --bundle"
7
6
  }
8
7
  }
@@ -1,7 +1,7 @@
1
1
  namespace :esbuild do
2
- desc "Compile using esbuild with npm run build"
2
+ desc "Compile using esbuild with yarn build"
3
3
  task :compile do
4
- system "npm install && npm run build"
4
+ system "yarn install && yarn build"
5
5
  end
6
6
  end
7
7
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: esbuild-rails
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: 0.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - David Heinemeier Hansson
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-09-02 00:00:00.000000000 Z
11
+ date: 2021-09-03 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails