lightningcss 0.0.1 → 0.1.1

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.
@@ -0,0 +1,39 @@
1
+ # Generated from lib/lightningcss/transformer.rb with RBS::Inline
2
+
3
+ module LightningCSS
4
+ # A set of options to transform many stylesheets with.
5
+ #
6
+ # transformer = LightningCSS::Transformer.new(minify: true, targets: { chrome: 100 })
7
+ #
8
+ # transformer.transform(".a { color: red }").code
9
+ # transformer.transform(".b { color: red }", scope: "[data-scope-abc]").code
10
+ #
11
+ # Options given to a call are merged over the ones it was built with, so the ones that belong to
12
+ # the project are written once and the ones that belong to a single stylesheet travel with it.
13
+ class Transformer
14
+ attr_reader options: Hash[Symbol, untyped]
15
+
16
+ # : (?filename: String?, ?minify: bool, ?error_recovery: bool, ?targets: browsers?, ?css_modules: css_modules?, ?scope: String?) -> void
17
+ def initialize: (?filename: String?, ?minify: bool, ?error_recovery: bool, ?targets: browsers?, ?css_modules: css_modules?, ?scope: String?) -> void
18
+
19
+ # : (String, ?filename: String?, ?minify: bool, ?error_recovery: bool, ?targets: browsers?, ?css_modules: css_modules?, ?scope: String?) -> LightningCSS::Result
20
+ def transform: (String, ?filename: String?, ?minify: bool, ?error_recovery: bool, ?targets: browsers?, ?css_modules: css_modules?, ?scope: String?) -> LightningCSS::Result
21
+
22
+ alias call transform
23
+
24
+ # : (String, ?filename: String?, ?minify: bool, ?error_recovery: bool, ?targets: browsers?, ?css_modules: css_modules?, ?scope: String?) -> LightningCSS::Result
25
+ def bundle: (String, ?filename: String?, ?minify: bool, ?error_recovery: bool, ?targets: browsers?, ?css_modules: css_modules?, ?scope: String?) -> LightningCSS::Result
26
+
27
+ # : (String, ?filename: String?, ?minify: bool, ?error_recovery: bool, ?targets: browsers?) -> LightningCSS::Result
28
+ def transform_style_attribute: (String, ?filename: String?, ?minify: bool, ?error_recovery: bool, ?targets: browsers?) -> LightningCSS::Result
29
+
30
+ # : (String, ?filename: String?, ?error_recovery: bool, ?targets: browsers?, ?css_modules: css_modules?, ?scope: String?) -> String
31
+ def minify: (String, ?filename: String?, ?error_recovery: bool, ?targets: browsers?, ?css_modules: css_modules?, ?scope: String?) -> String
32
+
33
+ # : (?filename: String?, ?minify: bool, ?error_recovery: bool, ?targets: browsers?, ?css_modules: css_modules?, ?scope: String?) -> LightningCSS::Transformer
34
+ def with: (?filename: String?, ?minify: bool, ?error_recovery: bool, ?targets: browsers?, ?css_modules: css_modules?, ?scope: String?) -> LightningCSS::Transformer
35
+
36
+ # : () -> String
37
+ def inspect: () -> String
38
+ end
39
+ end
@@ -0,0 +1,26 @@
1
+ # Note: This file is hand written, `rbs-inline` does not generate this file.
2
+
3
+ module LightningCSS
4
+ type browsers = {
5
+ ?android: Integer,
6
+ ?chrome: Integer,
7
+ ?edge: Integer,
8
+ ?firefox: Integer,
9
+ ?ie: Integer,
10
+ ?ios: Integer,
11
+ ?ios_saf: Integer,
12
+ ?opera: Integer,
13
+ ?safari: Integer,
14
+ ?samsung: Integer
15
+ }
16
+
17
+ type css_modules = bool | {
18
+ ?pattern: String,
19
+ ?dashed_idents: bool,
20
+ ?animation: bool,
21
+ ?grid: bool,
22
+ ?container: bool,
23
+ ?custom_idents: bool,
24
+ ?pure: bool
25
+ }
26
+ end
@@ -0,0 +1,5 @@
1
+ # Generated from lib/lightningcss/version.rb with RBS::Inline
2
+
3
+ module LightningCSS
4
+ VERSION: ::String
5
+ end
@@ -0,0 +1,31 @@
1
+ # Generated from lib/lightningcss.rb with RBS::Inline
2
+
3
+ # Ruby bindings for Lightning CSS.
4
+ #
5
+ # LightningCSS.transform(".a { color: red }", minify: true).code
6
+ # #=> ".a{color:red}"
7
+ #
8
+ # Every option is passed through to Lightning CSS as written, except `scope`, which narrows each
9
+ # rule by a selector fragment so a stylesheet only applies where that fragment matches:
10
+ #
11
+ # LightningCSS.transform(".title { color: red }", scope: "[data-scope-abc]").code
12
+ # #=> ".title[data-scope-abc]{color:red}"
13
+ #
14
+ # `LightningCSS::Options` is what the options are read by, and `LightningCSS::Transformer` holds a
15
+ # set of them to reuse across many stylesheets.
16
+ module LightningCSS
17
+ # : (String, ?filename: String?, ?minify: bool, ?error_recovery: bool, ?targets: browsers?, ?css_modules: css_modules?, ?scope: String?) -> LightningCSS::Result
18
+ def self.transform: (String, ?filename: String?, ?minify: bool, ?error_recovery: bool, ?targets: browsers?, ?css_modules: css_modules?, ?scope: String?) -> LightningCSS::Result
19
+
20
+ # : (String, ?filename: String?, ?minify: bool, ?error_recovery: bool, ?targets: browsers?, ?css_modules: css_modules?, ?scope: String?) -> LightningCSS::Result
21
+ def self.bundle: (String, ?filename: String?, ?minify: bool, ?error_recovery: bool, ?targets: browsers?, ?css_modules: css_modules?, ?scope: String?) -> LightningCSS::Result
22
+
23
+ # : (String, ?filename: String?, ?minify: bool, ?error_recovery: bool, ?targets: browsers?) -> LightningCSS::Result
24
+ def self.transform_style_attribute: (String, ?filename: String?, ?minify: bool, ?error_recovery: bool, ?targets: browsers?) -> LightningCSS::Result
25
+
26
+ # : (String, ?filename: String?, ?error_recovery: bool, ?targets: browsers?, ?css_modules: css_modules?, ?scope: String?) -> String
27
+ def self.minify: (String, ?filename: String?, ?error_recovery: bool, ?targets: browsers?, ?css_modules: css_modules?, ?scope: String?) -> String
28
+
29
+ # : () -> String
30
+ def self.lightningcss_version: () -> String
31
+ end
metadata CHANGED
@@ -1,27 +1,62 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: lightningcss
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 0.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Marco Roth
8
- bindir: exe
8
+ bindir: bin
9
9
  cert_chain: []
10
10
  date: 1980-01-02 00:00:00.000000000 Z
11
11
  dependencies: []
12
- description: LightningCSS for Ruby
12
+ description: Ruby bindings for Lightning CSS, an extremely fast CSS parser, transformer,
13
+ bundler, and minifier.
13
14
  email:
14
15
  - marco.roth@intergga.ch
15
16
  executables: []
16
- extensions: []
17
+ extensions:
18
+ - ext/lightningcss/extconf.rb
17
19
  extra_rdoc_files: []
18
- files: []
19
- homepage: https://github.com/marcoroth/lightningcss
20
- licenses: []
20
+ files:
21
+ - LICENSE.txt
22
+ - README.md
23
+ - ext/lightningcss/extconf.rb
24
+ - ext/lightningcss/include/lightningcss.h
25
+ - ext/lightningcss/lightningcss.c
26
+ - lib/lightningcss.rb
27
+ - lib/lightningcss/backend.rb
28
+ - lib/lightningcss/errors.rb
29
+ - lib/lightningcss/options.rb
30
+ - lib/lightningcss/result.rb
31
+ - lib/lightningcss/transformer.rb
32
+ - lib/lightningcss/version.rb
33
+ - licenses/README.md
34
+ - licenses/lightningcss-MPL-2.0.txt
35
+ - lightningcss.gemspec
36
+ - rust/Cargo.lock
37
+ - rust/Cargo.toml
38
+ - rust/build.rs
39
+ - rust/cbindgen.toml
40
+ - rust/rustfmt.toml
41
+ - rust/src/lib.rs
42
+ - rust/src/options.rs
43
+ - rust/src/scope.rs
44
+ - sig/lightningcss.rbs
45
+ - sig/lightningcss/backend.rbs
46
+ - sig/lightningcss/errors.rbs
47
+ - sig/lightningcss/options.rbs
48
+ - sig/lightningcss/result.rbs
49
+ - sig/lightningcss/transformer.rbs
50
+ - sig/lightningcss/types.rbs
51
+ - sig/lightningcss/version.rbs
52
+ homepage: https://github.com/marcoroth/lightningcss-ruby
53
+ licenses:
54
+ - MIT
55
+ - MPL-2.0
21
56
  metadata:
22
- homepage_uri: https://github.com/marcoroth/lightningcss
23
- source_code_uri: https://github.com/marcoroth/lightningcss
24
- changelog_uri: https://github.com/marcoroth/lightningcss/rleases
57
+ homepage_uri: https://github.com/marcoroth/lightningcss-ruby
58
+ source_code_uri: https://github.com/marcoroth/lightningcss-ruby
59
+ changelog_uri: https://github.com/marcoroth/lightningcss-ruby/releases
25
60
  rubygems_mfa_required: 'true'
26
61
  rdoc_options: []
27
62
  require_paths:
@@ -39,5 +74,5 @@ required_rubygems_version: !ruby/object:Gem::Requirement
39
74
  requirements: []
40
75
  rubygems_version: 4.0.16
41
76
  specification_version: 4
42
- summary: LightningCSS for Ruby
77
+ summary: An extremely fast CSS parser, transformer, bundler, and minifier.
43
78
  test_files: []