froxy 0.1.0 → 0.1.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: ba923cd0a854a238a03b4fb501c027282477ccc90ca2005379001492f1f531f1
4
- data.tar.gz: 43e8f7e24dc5ace4efc8c1ff7cba5af6786db2dd7a94b271bc83916ac09c6a84
3
+ metadata.gz: 12d6e3b3f546f7f29cffb9bcb9c860e9a50a2f1866b44725c34121eb7ce1f9e4
4
+ data.tar.gz: 98f692f348fa63de27fb6f154648301d4221933c23679347cc9c55ec88ae1651
5
5
  SHA512:
6
- metadata.gz: 4fee298a6f956749521698d204ea6422d2a7fbfdc43d5e1d1443554cff8dba5bf59c57c92836c6759f79c1287614d20f6a7ee4ebd44e61f563021464666387b5
7
- data.tar.gz: 5d5c56b0a0dff9581f339ee563dc83a5c00cc9896355996a887b95a70e461f07a4777b9cac202a0bed9cdda49df80f4cc32aac630b6be100a5b50e376140255f
6
+ metadata.gz: 2e9f27f9374f4f16bf59b79a468f52940330a6995c0cb7a8acffc1ea40c60554905af1bc3fe540451b101b56ffdaaa24f8a310995d225b55980d07707dd2d6d6
7
+ data.tar.gz: 926b281a7af9e4a4860c9ba443fd103d4a05e440f827adb56c7aad35b8208826dcea844090ef6c8224b752b55824ada82e73bbaafb311b7a851322a59b19dcf7
data/bin/froxy CHANGED
@@ -1,14 +1,8 @@
1
1
  #!/usr/bin/env node
2
2
 
3
- const path = require('path')
4
- const fs = require('fs')
5
- const cli = require('cac')()
6
3
  const esbuild = require('esbuild')
7
- const crypto = require('crypto')
8
4
 
9
- const parsed = cli.parse()
10
- const [absWorkingDir, entryPoint] = parsed.args
11
- const entryPointKey = crypto.createHash('sha1').update(entryPoint).digest('base64')
5
+ const [, , absWorkingDir, entryPoint] = process.argv
12
6
 
13
7
  const { resolve, config } = require('../lib/froxy/esbuild/utils')
14
8
  const loadStylePlugin = require('../lib/froxy/esbuild/plugins/load_style')
@@ -18,18 +12,6 @@ const cssPlugin = require('../lib/froxy/esbuild/plugins/css')(absWorkingDir)
18
12
  const imagesPlugin = require('../lib/froxy/esbuild/plugins/images')(absWorkingDir)
19
13
  const rootPlugin = require('../lib/froxy/esbuild/plugins/root')(absWorkingDir)
20
14
 
21
- const testPlugin = {
22
- name: 'froxy.test',
23
- setup(build) {
24
- build.onResolve({ filter: /.*/ }, args => {
25
- console.log('onResolve', args)
26
- })
27
- build.onLoad({ filter: /.*/ }, args => {
28
- console.log('onLoad', args)
29
- })
30
- }
31
- }
32
-
33
15
  const conf = config(absWorkingDir)
34
16
 
35
17
  const buildOptions = {
@@ -50,20 +32,9 @@ const buildOptions = {
50
32
  'process.env.NODE_ENV': `"${process.env.NODE_ENV || 'development'}"`,
51
33
  'process.env.RAILS_ENV': `"${process.env.RAILS_ENV || 'development'}"`
52
34
  },
53
- // metafile: `public/froxy/meta/${entryPointKey}.json`,
54
35
  plugins: [aliasPlugin, envPlugin, loadStylePlugin, cssPlugin, imagesPlugin, rootPlugin]
55
36
  }
56
37
 
57
38
  esbuild.build(buildOptions).catch(() => {
58
39
  process.exit(1)
59
40
  })
60
- // .then(results => {
61
- // // console.log(results)
62
- // const meta = JSON.parse(fs.readFileSync(`${absWorkingDir}/${buildOptions.metafile}`, 'utf8'))
63
- // console.log(meta)
64
- // // console.log(Object.keys(meta.inputs))
65
- // // console.log(Object.keys(meta.outputs))
66
-
67
- // process.stdout.write(buildOptions.metafile)
68
- // // process.stdout.write(fs.readFileSync(`${absWorkingDir}/${buildOptions.metafile}`, 'utf8'))
69
- // })
@@ -0,0 +1,11 @@
1
+ module.exports = {
2
+ name: 'froxy.debug',
3
+ setup(build) {
4
+ build.onResolve({ filter: /.*/ }, args => {
5
+ console.log('onResolve', args)
6
+ })
7
+ build.onLoad({ filter: /.*/ }, args => {
8
+ console.log('onLoad', args)
9
+ })
10
+ }
11
+ }
data/lib/froxy/version.rb CHANGED
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Froxy
4
- VERSION = '0.1.0'
4
+ VERSION = '0.1.1'
5
5
  end
data/package.json CHANGED
@@ -9,7 +9,6 @@
9
9
  "arrowParens": "avoid"
10
10
  },
11
11
  "dependencies": {
12
- "cac": "^6.7.1",
13
12
  "esbuild": "^0.8.1"
14
13
  }
15
14
  }
data/yarn.lock CHANGED
@@ -2,12 +2,7 @@
2
2
  # yarn lockfile v1
3
3
 
4
4
 
5
- cac@^6.7.1:
6
- version "6.7.2"
7
- resolved "https://registry.yarnpkg.com/cac/-/cac-6.7.2.tgz#e7f0d21f4776c46c7d0de7976e56fa5562e17597"
8
- integrity sha512-w0bH1IF9rEjdi0a6lTtlXYT+vBZEJL9oytaXXRdsD68MH6+SrZGOGsu7s2saHQvYXqwo/wBdkW75tt8wFpj+mw==
9
-
10
5
  esbuild@^0.8.1:
11
- version "0.8.48"
12
- resolved "https://registry.yarnpkg.com/esbuild/-/esbuild-0.8.48.tgz#a57e4dde84ec56da1c6ecaefee97e9da6c5b00b5"
13
- integrity sha512-lrH8lA8wWQ6Lpe1z6C7ZZaFSmRsUlcQAqe16nf7ITySQ7MV4+vI7qAqQlT/u+c3+9AL3VXmT4MXTxV2e63pO4A==
6
+ version "0.8.50"
7
+ resolved "https://registry.yarnpkg.com/esbuild/-/esbuild-0.8.50.tgz#ebf24fde0cdad1a369789dd6fd7a820b0a01e46c"
8
+ integrity sha512-oidFLXssA7IccYzkqLVZSqNJDwDq8Mh/vqvrW+3fPWM7iUiC5O2bCllhnO8+K9LlyL/2Z6n+WwRJAz9fqSIVRg==
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: froxy
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Joel Moss
@@ -53,6 +53,7 @@ files:
53
53
  - lib/froxy.rb
54
54
  - lib/froxy/esbuild/plugins/alias.js
55
55
  - lib/froxy/esbuild/plugins/css.js
56
+ - lib/froxy/esbuild/plugins/debug.js
56
57
  - lib/froxy/esbuild/plugins/env.js
57
58
  - lib/froxy/esbuild/plugins/images.js
58
59
  - lib/froxy/esbuild/plugins/load_style.js