lightningcss 0.1.0-arm-linux-gnu → 0.1.1-arm-linux-gnu
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 +4 -4
- data/ext/lightningcss/include/lightningcss.h +2 -0
- data/ext/lightningcss/lightningcss.c +7 -0
- data/lib/lightningcss/3.2/lightningcss.so +0 -0
- data/lib/lightningcss/3.3/lightningcss.so +0 -0
- data/lib/lightningcss/3.4/lightningcss.so +0 -0
- data/lib/lightningcss/4.0/lightningcss.so +0 -0
- data/lib/lightningcss/backend.rb +5 -0
- data/lib/lightningcss/version.rb +1 -1
- data/lib/lightningcss.rb +2 -2
- data/lightningcss.gemspec +1 -1
- data/rust/Cargo.lock +1 -1
- data/rust/Cargo.toml +1 -1
- data/rust/build.rs +30 -0
- data/rust/src/lib.rs +6 -0
- data/sig/lightningcss/backend.rbs +3 -0
- data/sig/lightningcss.rbs +1 -1
- metadata +2 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz: '
|
|
3
|
+
metadata.gz: 17f42e6eaaea63804cfab2ca215c526f318d34b354cc1879308a6c7c507904ff
|
|
4
|
+
data.tar.gz: '03866e4a0fb88ef0ff7974e09ef1a738d2d48999923d7f32da37f1348295a3f0'
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 9b06216474edc9dba81a8363a5ff16d4792f28236d8183ed544fe7653c5b15284ba1712197d58b462c4eae724c822e4c795c5d2ec9716e6826af15d198e053f4
|
|
7
|
+
data.tar.gz: 3cfffbf47c2ddfad5aba582945f75c21b69d73066d0829203b5a29a11ae57f38a7353148c51e3378381ab00b61ab467a7ae1c22c65489aaf03bd8e79124af8d4
|
|
@@ -21,6 +21,8 @@ struct LightningCssResult lightningcss_bundle(const char *path, const char *opti
|
|
|
21
21
|
|
|
22
22
|
char *lightningcss_version(void);
|
|
23
23
|
|
|
24
|
+
char *lightningcss_lightningcss_version(void);
|
|
25
|
+
|
|
24
26
|
void lightningcss_string_free(char *value);
|
|
25
27
|
|
|
26
28
|
void lightningcss_result_free(struct LightningCssResult result);
|
|
@@ -85,6 +85,12 @@ static VALUE rb_native_version(VALUE self) {
|
|
|
85
85
|
return take_utf8_string(lightningcss_version());
|
|
86
86
|
}
|
|
87
87
|
|
|
88
|
+
static VALUE rb_lightningcss_version(VALUE self) {
|
|
89
|
+
(void) self;
|
|
90
|
+
|
|
91
|
+
return take_utf8_string(lightningcss_lightningcss_version());
|
|
92
|
+
}
|
|
93
|
+
|
|
88
94
|
void Init_lightningcss(void) {
|
|
89
95
|
rb_mLightningCSS = rb_define_module("LightningCSS");
|
|
90
96
|
rb_mBackend = rb_define_module_under(rb_mLightningCSS, "Backend");
|
|
@@ -98,4 +104,5 @@ void Init_lightningcss(void) {
|
|
|
98
104
|
rb_define_singleton_method(rb_mBackend, "transform_style_attribute", rb_transform_style_attribute, 2);
|
|
99
105
|
rb_define_singleton_method(rb_mBackend, "bundle", rb_bundle, 2);
|
|
100
106
|
rb_define_singleton_method(rb_mBackend, "version", rb_native_version, 0);
|
|
107
|
+
rb_define_singleton_method(rb_mBackend, "lightningcss_version", rb_lightningcss_version, 0);
|
|
101
108
|
}
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
data/lib/lightningcss/backend.rb
CHANGED
data/lib/lightningcss/version.rb
CHANGED
data/lib/lightningcss.rb
CHANGED
data/lightningcss.gemspec
CHANGED
|
@@ -11,7 +11,7 @@ Gem::Specification.new do |spec|
|
|
|
11
11
|
spec.summary = "An extremely fast CSS parser, transformer, bundler, and minifier."
|
|
12
12
|
spec.description = "Ruby bindings for Lightning CSS, an extremely fast CSS parser, transformer, bundler, and minifier."
|
|
13
13
|
spec.homepage = "https://github.com/marcoroth/lightningcss-ruby"
|
|
14
|
-
spec.
|
|
14
|
+
spec.licenses = ["MIT", "MPL-2.0"]
|
|
15
15
|
spec.required_ruby_version = ">= 3.2.0"
|
|
16
16
|
spec.require_paths = ["lib"]
|
|
17
17
|
|
data/rust/Cargo.lock
CHANGED
data/rust/Cargo.toml
CHANGED
data/rust/build.rs
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
use std::env;
|
|
2
|
+
use std::fs;
|
|
2
3
|
use std::path::PathBuf;
|
|
3
4
|
|
|
4
5
|
fn main() {
|
|
@@ -12,4 +13,33 @@ fn main() {
|
|
|
12
13
|
|
|
13
14
|
bindings.write_to_file(&header_path);
|
|
14
15
|
}
|
|
16
|
+
|
|
17
|
+
let lock_path = PathBuf::from(&crate_dir).join("Cargo.lock");
|
|
18
|
+
|
|
19
|
+
println!("cargo:rerun-if-changed={}", lock_path.display());
|
|
20
|
+
|
|
21
|
+
println!(
|
|
22
|
+
"cargo:rustc-env=LIGHTNINGCSS_VERSION={}",
|
|
23
|
+
locked_version(&lock_path, "lightningcss")
|
|
24
|
+
);
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
fn locked_version(lock_path: &PathBuf, package: &str) -> String {
|
|
28
|
+
let Ok(lock) = fs::read_to_string(lock_path) else {
|
|
29
|
+
return "unknown".to_string();
|
|
30
|
+
};
|
|
31
|
+
|
|
32
|
+
let mut lines = lock.lines();
|
|
33
|
+
|
|
34
|
+
while let Some(line) = lines.next() {
|
|
35
|
+
if line.trim() != format!("name = \"{package}\"") {
|
|
36
|
+
continue;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
if let Some(version) = lines.next().and_then(|next| next.trim().strip_prefix("version = ")) {
|
|
40
|
+
return version.trim_matches('"').to_string();
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
"unknown".to_string()
|
|
15
45
|
}
|
data/rust/src/lib.rs
CHANGED
|
@@ -25,6 +25,7 @@ use crate::options::{TransformOptions, TransformResult};
|
|
|
25
25
|
use crate::scope::Scoper;
|
|
26
26
|
|
|
27
27
|
pub const VERSION: &str = env!("CARGO_PKG_VERSION");
|
|
28
|
+
pub const LIGHTNINGCSS_VERSION: &str = env!("LIGHTNINGCSS_VERSION");
|
|
28
29
|
|
|
29
30
|
#[repr(C)]
|
|
30
31
|
pub struct LightningCssResult {
|
|
@@ -294,6 +295,11 @@ pub unsafe extern "C" fn lightningcss_version() -> *mut c_char {
|
|
|
294
295
|
into_c_string(VERSION)
|
|
295
296
|
}
|
|
296
297
|
|
|
298
|
+
#[no_mangle]
|
|
299
|
+
pub unsafe extern "C" fn lightningcss_lightningcss_version() -> *mut c_char {
|
|
300
|
+
into_c_string(LIGHTNINGCSS_VERSION)
|
|
301
|
+
}
|
|
302
|
+
|
|
297
303
|
#[no_mangle]
|
|
298
304
|
pub unsafe extern "C" fn lightningcss_string_free(value: *mut c_char) {
|
|
299
305
|
if !value.is_null() {
|
data/sig/lightningcss.rbs
CHANGED
|
@@ -27,5 +27,5 @@ module LightningCSS
|
|
|
27
27
|
def self.minify: (String, ?filename: String?, ?error_recovery: bool, ?targets: browsers?, ?css_modules: css_modules?, ?scope: String?) -> String
|
|
28
28
|
|
|
29
29
|
# : () -> String
|
|
30
|
-
def self.
|
|
30
|
+
def self.lightningcss_version: () -> String
|
|
31
31
|
end
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: lightningcss
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.1.
|
|
4
|
+
version: 0.1.1
|
|
5
5
|
platform: arm-linux-gnu
|
|
6
6
|
authors:
|
|
7
7
|
- Marco Roth
|
|
@@ -56,6 +56,7 @@ files:
|
|
|
56
56
|
homepage: https://github.com/marcoroth/lightningcss-ruby
|
|
57
57
|
licenses:
|
|
58
58
|
- MIT
|
|
59
|
+
- MPL-2.0
|
|
59
60
|
metadata:
|
|
60
61
|
homepage_uri: https://github.com/marcoroth/lightningcss-ruby
|
|
61
62
|
source_code_uri: https://github.com/marcoroth/lightningcss-ruby
|