isomorfeus-asset-manager 0.19.3 → 0.19.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +4 -1
- data/lib/isomorfeus/asset_manager/version.rb +1 -1
- data/lib/isomorfeus/asset_manager.rb +7 -2
- metadata +6 -6
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 4be3eb8ec0f4c7a71098a5e24e674e6f5cc009feab9823279c0fc5f77475a566
|
4
|
+
data.tar.gz: 5e8b06eca8613334a6a68c9429294c78c10d535c383e65eefc1b81b43dd23d1c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ca5b8cc4745fd9a3c3385ba2344c751f4c580ad31852008a53c401c18c004f83839eb308861fdac5a59ecbfc54c38b22f69018568c7d9d160406107374ba23f8
|
7
|
+
data.tar.gz: fbd95f8dcac26cb1126d0741d6ac92d92f40d125871edea988ad2cb7437ae8d1bb78c6a690bac2b6916d433719e6e61fa776dfe373c67da5b7ac10be6f520fe5
|
data/README.md
CHANGED
@@ -15,4 +15,7 @@ However, if within the project the 'esbuild' npm package is installed in node_mo
|
|
15
15
|
At the [Isomorfeus Framework Project](https://isomorfeus.com)
|
16
16
|
|
17
17
|
### Targets
|
18
|
-
By default Isomorfeus Asset Manager bundles for browsers using the 'es6' target and for node using the '
|
18
|
+
By default Isomorfeus Asset Manager bundles for browsers using the 'es6' target and for node using the 'node18' target of esbuild.
|
19
|
+
|
20
|
+
### SASS
|
21
|
+
For SASS support, installing the [esbuild-sass-plugin](https://www.npmjs.com/package/esbuild-sass-plugin) is enough, it will be automatically loaded when available in the node load path, eg. in node_modules of the project.
|
@@ -84,6 +84,9 @@ module Isomorfeus
|
|
84
84
|
try { esbuild_r = require('esbuild'); }
|
85
85
|
catch { esbuild_r = require('esbuild-wasm'); }
|
86
86
|
const esbuild = esbuild_r;
|
87
|
+
try { esbuild_r = require('esbuild-sass-plugin'); }
|
88
|
+
catch { esbuild_r = null; }
|
89
|
+
const esbuild_sass_plugin = esbuild_r;
|
87
90
|
global.imports_path = '#{@imports_path}';
|
88
91
|
global.output_path = '#{@output_path}';
|
89
92
|
JAVASCRIPT
|
@@ -148,7 +151,7 @@ module Isomorfeus
|
|
148
151
|
entryPoints: [path.resolve(global.imports_path, '#{entry}')],
|
149
152
|
bundle: true,
|
150
153
|
color: false,
|
151
|
-
format: '#{asset.node? ?
|
154
|
+
format: '#{asset.node? ? "cjs" : "iife"}',
|
152
155
|
legalComments: 'linked',
|
153
156
|
loader: { '.svg': 'text', '.png': 'dataurl' },
|
154
157
|
logLimit: 0,
|
@@ -157,15 +160,17 @@ module Isomorfeus
|
|
157
160
|
nodePaths: #{resolve_paths},
|
158
161
|
outdir: global.output_path,
|
159
162
|
platform: '#{asset.target}',
|
163
|
+
plugins: (esbuild_sass_plugin ? [esbuild_sass_plugin()] : []),
|
160
164
|
publicPath: '#{asset.browser? ? Isomorfeus.assets_path : @output_path}',
|
161
165
|
sourcemap: #{(!Isomorfeus.production? && asset.browser?) ? 'true' : 'false'},
|
162
166
|
splitting: false,
|
163
|
-
target: '#{asset.browser? ? 'es6' : '
|
167
|
+
target: '#{asset.browser? ? 'es6' : 'node18' }',
|
164
168
|
write: true
|
165
169
|
})
|
166
170
|
.then((result) => { global.res_meta = result.metafile; return result; }, (reason) => { return { result: { errors: [{text: reason}]}}; })
|
167
171
|
.catch((error) => { return { result: { errors: [{text: error.message}]}}; });
|
168
172
|
JAVASCRIPT
|
173
|
+
|
169
174
|
if analyze
|
170
175
|
analysis = context.await <<~JAVASCRIPT
|
171
176
|
esbuild.analyzeMetafile(global.res_meta, { verbose: true });
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: isomorfeus-asset-manager
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.19.
|
4
|
+
version: 0.19.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jan Biedermann
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2023-
|
11
|
+
date: 2023-09-22 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: brotli
|
@@ -44,14 +44,14 @@ dependencies:
|
|
44
44
|
requirements:
|
45
45
|
- - "~>"
|
46
46
|
- !ruby/object:Gem::Version
|
47
|
-
version: 0.7.
|
47
|
+
version: 0.7.1
|
48
48
|
type: :runtime
|
49
49
|
prerelease: false
|
50
50
|
version_requirements: !ruby/object:Gem::Requirement
|
51
51
|
requirements:
|
52
52
|
- - "~>"
|
53
53
|
- !ruby/object:Gem::Version
|
54
|
-
version: 0.7.
|
54
|
+
version: 0.7.1
|
55
55
|
- !ruby/object:Gem::Dependency
|
56
56
|
name: listen
|
57
57
|
requirement: !ruby/object:Gem::Requirement
|
@@ -75,7 +75,7 @@ dependencies:
|
|
75
75
|
version: 3.13.23
|
76
76
|
- - "<"
|
77
77
|
- !ruby/object:Gem::Version
|
78
|
-
version: 3.
|
78
|
+
version: 3.17.0
|
79
79
|
type: :runtime
|
80
80
|
prerelease: false
|
81
81
|
version_requirements: !ruby/object:Gem::Requirement
|
@@ -85,7 +85,7 @@ dependencies:
|
|
85
85
|
version: 3.13.23
|
86
86
|
- - "<"
|
87
87
|
- !ruby/object:Gem::Version
|
88
|
-
version: 3.
|
88
|
+
version: 3.17.0
|
89
89
|
- !ruby/object:Gem::Dependency
|
90
90
|
name: opal
|
91
91
|
requirement: !ruby/object:Gem::Requirement
|