nanoc-webpack.rb 0.10.4 → 0.10.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.github/workflows/specs.yml +2 -2
- data/.rubocop.yml +18 -2
- data/README.md +7 -9
- data/Rakefile +11 -0
- data/lib/nanoc/webpack/filter.rb +1 -1
- data/lib/nanoc/webpack/spawn.rb +4 -2
- data/lib/nanoc/webpack/version.rb +1 -1
- data/nanoc-webpack.rb.gemspec +1 -1
- data/spec/filter_spec.rb +4 -4
- metadata +5 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 2fdc00807eb072da16f117215c66052074d76b7dc40a76899298d0fa755b9376
|
4
|
+
data.tar.gz: b0430e14cf0c766dde324210a320e1c6f2a2e6d7c3f99232d280b8ab367491fb
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 68416b498b3dd31793efa9997c07436ee03637514a1cc1f6626916cf7f1e2c1414da09c8622cd62e9fa371c831937ce0e71c2f70871bd61881176614c19bcea5
|
7
|
+
data.tar.gz: 3cf699b79de05f3760f4e98c4056d3ca93832b33957546b067c2a5f4caaac2611b23d310621884cdb1f72c33679d7b19c117d52c5d596e27d94e76b8a11d7483
|
data/.github/workflows/specs.yml
CHANGED
@@ -12,7 +12,7 @@ jobs:
|
|
12
12
|
fail-fast: false
|
13
13
|
matrix:
|
14
14
|
os: [ubuntu-latest]
|
15
|
-
ruby: [3.1, 3.2]
|
15
|
+
ruby: [3.1, 3.2, 3.3]
|
16
16
|
runs-on: ${{ matrix.os }}
|
17
17
|
steps:
|
18
18
|
- uses: actions/checkout@v2
|
@@ -20,4 +20,4 @@ jobs:
|
|
20
20
|
with:
|
21
21
|
ruby-version: ${{ matrix.ruby }}
|
22
22
|
- run: bundle install
|
23
|
-
- run:
|
23
|
+
- run: rake ci
|
data/.rubocop.yml
CHANGED
@@ -20,11 +20,11 @@ AllCops:
|
|
20
20
|
# Enabled
|
21
21
|
Style/FrozenStringLiteralComment:
|
22
22
|
Enabled: true
|
23
|
-
Layout/ArrayAlignment:
|
24
|
-
Enabled: false
|
25
23
|
|
26
24
|
##
|
27
25
|
# Disabled
|
26
|
+
|
27
|
+
# RSpec
|
28
28
|
RSpec/FilePath:
|
29
29
|
Enabled: false
|
30
30
|
RSpec/NestedGroups:
|
@@ -49,9 +49,25 @@ RSpec/MessageSpies:
|
|
49
49
|
Enabled: false
|
50
50
|
RSpec/MultipleMemoizedHelpers:
|
51
51
|
Enabled: false
|
52
|
+
RSpec/ExampleLength:
|
53
|
+
Enabled: false
|
54
|
+
RSpec/StubbedMock:
|
55
|
+
Enabled: false
|
56
|
+
|
57
|
+
# Style
|
52
58
|
Style/LambdaCall:
|
53
59
|
Enabled: false
|
60
|
+
Style/SafeNavigation:
|
61
|
+
Enabled: false
|
62
|
+
Layout/ArrayAlignment:
|
63
|
+
Enabled: false
|
64
|
+
|
65
|
+
# Layout
|
54
66
|
Layout/MultilineMethodCallIndentation:
|
55
67
|
Enabled: false
|
56
68
|
Layout/ArgumentAlignment:
|
57
69
|
Enabled: false
|
70
|
+
Layout/FirstArrayElementIndentation:
|
71
|
+
Enabled: false
|
72
|
+
Layout/FirstArgumentIndentation:
|
73
|
+
Enabled: false
|
data/README.md
CHANGED
@@ -2,11 +2,11 @@
|
|
2
2
|
|
3
3
|
nanoc-webpack.rb is a
|
4
4
|
[nanoc](https://nanoc.app)
|
5
|
-
filter that
|
5
|
+
filter that adds
|
6
6
|
[webpack](https://webpack.js.org/)
|
7
|
-
|
8
|
-
The filter
|
9
|
-
and
|
7
|
+
support to nanoc. <br>
|
8
|
+
The filter connects nanoc to the the JavaScript, TypeScript,
|
9
|
+
and nodejs ecosystems.
|
10
10
|
|
11
11
|
## Examples
|
12
12
|
|
@@ -74,9 +74,7 @@ end
|
|
74
74
|
|
75
75
|
## Install
|
76
76
|
|
77
|
-
|
78
|
-
|
79
|
-
nanoc-webpack.rb can be installed via rubygems.org
|
77
|
+
nanoc-webpack.rb can be installed via rubygems.org:
|
80
78
|
|
81
79
|
gem install nanoc-webpack.rb
|
82
80
|
|
@@ -92,6 +90,6 @@ nanoc-webpack.rb can be installed via rubygems.org
|
|
92
90
|
|
93
91
|
## License
|
94
92
|
|
95
|
-
[BSD Zero Clause](https://choosealicense.com/licenses/0bsd/)
|
93
|
+
[BSD Zero Clause](https://choosealicense.com/licenses/0bsd/)
|
96
94
|
<br>
|
97
|
-
See [LICENSE](./LICENSE)
|
95
|
+
See [LICENSE](./LICENSE)
|
data/Rakefile
ADDED
data/lib/nanoc/webpack/filter.rb
CHANGED
@@ -61,7 +61,7 @@ module Nanoc::Webpack
|
|
61
61
|
tmpdir = File.join(Dir.getwd, "tmp", "webpack")
|
62
62
|
name = item.identifier.to_s
|
63
63
|
file = Tempfile.new(
|
64
|
-
[
|
64
|
+
[File.basename(name), File.extname(name).sub(/\A\.(ts|tsx|jsx)\z/, ".js")],
|
65
65
|
mkdir_p(tmpdir).last
|
66
66
|
)
|
67
67
|
file.write(content)
|
data/lib/nanoc/webpack/spawn.rb
CHANGED
@@ -1,3 +1,5 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
1
3
|
module Nanoc::Webpack
|
2
4
|
module Spawn
|
3
5
|
require "test-cmd"
|
@@ -23,8 +25,8 @@ module Nanoc::Webpack
|
|
23
25
|
"#{File.basename(exe)} exited unsuccessfully\n" \
|
24
26
|
"(item: #{item.identifier})\n" \
|
25
27
|
"(exit code: #{r.exit_status})\n" \
|
26
|
-
"(stdout: #{r.stdout.gsub(Dir.getwd,
|
27
|
-
"(stderr: #{r.stderr.gsub(Dir.getwd,
|
28
|
+
"(stdout: #{r.stdout.gsub(Dir.getwd, "")[1..]&.chomp})\n" \
|
29
|
+
"(stderr: #{r.stderr.gsub(Dir.getwd, "")[1..]&.chomp})\n",
|
28
30
|
[]
|
29
31
|
end
|
30
32
|
end
|
data/nanoc-webpack.rb.gemspec
CHANGED
@@ -13,7 +13,7 @@ Gem::Specification.new do |gem|
|
|
13
13
|
gem.summary = "nanoc-webpack.rb = nanoc + webpack"
|
14
14
|
gem.description = gem.summary
|
15
15
|
gem.add_runtime_dependency "ryo.rb", "~> 0.5"
|
16
|
-
gem.add_runtime_dependency "test-cmd.rb", "~> 0.12.
|
16
|
+
gem.add_runtime_dependency "test-cmd.rb", "~> 0.12.4"
|
17
17
|
gem.add_development_dependency "yard", "~> 0.9"
|
18
18
|
gem.add_development_dependency "redcarpet", "~> 3.5"
|
19
19
|
gem.add_development_dependency "rspec", "~> 3.10"
|
data/spec/filter_spec.rb
CHANGED
@@ -136,8 +136,8 @@ RSpec.describe Nanoc::Webpack::Filter do
|
|
136
136
|
expect(filter).to receive(:cmd).with(
|
137
137
|
"node",
|
138
138
|
"./node_modules/webpack/bin/webpack.js",
|
139
|
-
*cmdline
|
140
|
-
).and_return(Ryo(
|
139
|
+
*cmdline
|
140
|
+
).and_return(Ryo("success?" => true))
|
141
141
|
filter.run(item)
|
142
142
|
end
|
143
143
|
end
|
@@ -148,8 +148,8 @@ RSpec.describe Nanoc::Webpack::Filter do
|
|
148
148
|
"node",
|
149
149
|
"./node_modules/webpack/bin/webpack.js",
|
150
150
|
"--no-cache",
|
151
|
-
*cmdline
|
152
|
-
).and_return(Ryo(
|
151
|
+
*cmdline
|
152
|
+
).and_return(Ryo("success?" => true))
|
153
153
|
filter.run(item, argv: ["--no-cache"])
|
154
154
|
end
|
155
155
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: nanoc-webpack.rb
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.10.
|
4
|
+
version: 0.10.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- '0x1eef'
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-06-
|
11
|
+
date: 2024-06-16 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: ryo.rb
|
@@ -30,14 +30,14 @@ dependencies:
|
|
30
30
|
requirements:
|
31
31
|
- - "~>"
|
32
32
|
- !ruby/object:Gem::Version
|
33
|
-
version: 0.12.
|
33
|
+
version: 0.12.4
|
34
34
|
type: :runtime
|
35
35
|
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
38
|
- - "~>"
|
39
39
|
- !ruby/object:Gem::Version
|
40
|
-
version: 0.12.
|
40
|
+
version: 0.12.4
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
42
|
name: yard
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
@@ -124,6 +124,7 @@ files:
|
|
124
124
|
- Gemfile
|
125
125
|
- LICENSE
|
126
126
|
- README.md
|
127
|
+
- Rakefile
|
127
128
|
- lib/nanoc-webpack.rb
|
128
129
|
- lib/nanoc/webpack.rb
|
129
130
|
- lib/nanoc/webpack/filter.rb
|