temml 0.31.0
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 +7 -0
- data/COPYING.txt +121 -0
- data/README.md +123 -0
- data/lib/temml/engine.rb +24 -0
- data/lib/temml/version.rb +8 -0
- data/lib/temml.rb +90 -0
- data/license/KaTeX/LICENSE +21 -0
- data/license/Temml/LICENSE +21 -0
- data/license/katex-ruby/LICENSE.txt +21 -0
- data/vendor/temml/fonts/Temml.woff2 +0 -0
- data/vendor/temml/javascripts/temml.js +1 -0
- data/vendor/temml/sprockets/stylesheets/Temml-Asana.css.erb +361 -0
- data/vendor/temml/sprockets/stylesheets/Temml-Latin-Modern.css.erb +379 -0
- data/vendor/temml/sprockets/stylesheets/Temml-Libertinus.css.erb +376 -0
- data/vendor/temml/sprockets/stylesheets/Temml-Local.css.erb +372 -0
- data/vendor/temml/sprockets/stylesheets/Temml-NotoSans.css.erb +376 -0
- data/vendor/temml/sprockets/stylesheets/Temml-STIX2.css.erb +367 -0
- data/vendor/temml/sprockets/stylesheets/_Temml-Asana.scss +361 -0
- data/vendor/temml/sprockets/stylesheets/_Temml-Latin-Modern.scss +379 -0
- data/vendor/temml/sprockets/stylesheets/_Temml-Libertinus.scss +376 -0
- data/vendor/temml/sprockets/stylesheets/_Temml-Local.scss +372 -0
- data/vendor/temml/sprockets/stylesheets/_Temml-NotoSans.scss +376 -0
- data/vendor/temml/sprockets/stylesheets/_Temml-STIX2.scss +367 -0
- data/vendor/temml/stylesheets/Temml-Asana.css +361 -0
- data/vendor/temml/stylesheets/Temml-Latin-Modern.css +379 -0
- data/vendor/temml/stylesheets/Temml-Libertinus.css +376 -0
- data/vendor/temml/stylesheets/Temml-Local.css +372 -0
- data/vendor/temml/stylesheets/Temml-NotoSans.css +376 -0
- data/vendor/temml/stylesheets/Temml-STIX2.css +367 -0
- metadata +84 -0
checksums.yaml
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
---
|
|
2
|
+
SHA256:
|
|
3
|
+
metadata.gz: aa0fa7ff4509d37528fafb96fdca5e25741fc25ca440c85715be8ba72312f919
|
|
4
|
+
data.tar.gz: d0d17ac0475376720146dbce3fd664555da06c325373cf6ba9e253a48a21bbf2
|
|
5
|
+
SHA512:
|
|
6
|
+
metadata.gz: 51c1b4edeacf54b8b101856b552db20baaae066254adebb975101615e2709cbff4875a27736fcb13fd2feaeb92109cdd7c96e026ae020e716d89fd0ae2513cb6
|
|
7
|
+
data.tar.gz: d4ea1405771cc52249a1605cb164f8b7347a6e5369383c74dd95101972042ae5b68161ac7b079a524923076ea8e4229ee42b65271398ed05e2372bf1dd6aa8a1
|
data/COPYING.txt
ADDED
|
@@ -0,0 +1,121 @@
|
|
|
1
|
+
Creative Commons Legal Code
|
|
2
|
+
|
|
3
|
+
CC0 1.0 Universal
|
|
4
|
+
|
|
5
|
+
CREATIVE COMMONS CORPORATION IS NOT A LAW FIRM AND DOES NOT PROVIDE
|
|
6
|
+
LEGAL SERVICES. DISTRIBUTION OF THIS DOCUMENT DOES NOT CREATE AN
|
|
7
|
+
ATTORNEY-CLIENT RELATIONSHIP. CREATIVE COMMONS PROVIDES THIS
|
|
8
|
+
INFORMATION ON AN "AS-IS" BASIS. CREATIVE COMMONS MAKES NO WARRANTIES
|
|
9
|
+
REGARDING THE USE OF THIS DOCUMENT OR THE INFORMATION OR WORKS
|
|
10
|
+
PROVIDED HEREUNDER, AND DISCLAIMS LIABILITY FOR DAMAGES RESULTING FROM
|
|
11
|
+
THE USE OF THIS DOCUMENT OR THE INFORMATION OR WORKS PROVIDED
|
|
12
|
+
HEREUNDER.
|
|
13
|
+
|
|
14
|
+
Statement of Purpose
|
|
15
|
+
|
|
16
|
+
The laws of most jurisdictions throughout the world automatically confer
|
|
17
|
+
exclusive Copyright and Related Rights (defined below) upon the creator
|
|
18
|
+
and subsequent owner(s) (each and all, an "owner") of an original work of
|
|
19
|
+
authorship and/or a database (each, a "Work").
|
|
20
|
+
|
|
21
|
+
Certain owners wish to permanently relinquish those rights to a Work for
|
|
22
|
+
the purpose of contributing to a commons of creative, cultural and
|
|
23
|
+
scientific works ("Commons") that the public can reliably and without fear
|
|
24
|
+
of later claims of infringement build upon, modify, incorporate in other
|
|
25
|
+
works, reuse and redistribute as freely as possible in any form whatsoever
|
|
26
|
+
and for any purposes, including without limitation commercial purposes.
|
|
27
|
+
These owners may contribute to the Commons to promote the ideal of a free
|
|
28
|
+
culture and the further production of creative, cultural and scientific
|
|
29
|
+
works, or to gain reputation or greater distribution for their Work in
|
|
30
|
+
part through the use and efforts of others.
|
|
31
|
+
|
|
32
|
+
For these and/or other purposes and motivations, and without any
|
|
33
|
+
expectation of additional consideration or compensation, the person
|
|
34
|
+
associating CC0 with a Work (the "Affirmer"), to the extent that he or she
|
|
35
|
+
is an owner of Copyright and Related Rights in the Work, voluntarily
|
|
36
|
+
elects to apply CC0 to the Work and publicly distribute the Work under its
|
|
37
|
+
terms, with knowledge of his or her Copyright and Related Rights in the
|
|
38
|
+
Work and the meaning and intended legal effect of CC0 on those rights.
|
|
39
|
+
|
|
40
|
+
1. Copyright and Related Rights. A Work made available under CC0 may be
|
|
41
|
+
protected by copyright and related or neighboring rights ("Copyright and
|
|
42
|
+
Related Rights"). Copyright and Related Rights include, but are not
|
|
43
|
+
limited to, the following:
|
|
44
|
+
|
|
45
|
+
i. the right to reproduce, adapt, distribute, perform, display,
|
|
46
|
+
communicate, and translate a Work;
|
|
47
|
+
ii. moral rights retained by the original author(s) and/or performer(s);
|
|
48
|
+
iii. publicity and privacy rights pertaining to a person's image or
|
|
49
|
+
likeness depicted in a Work;
|
|
50
|
+
iv. rights protecting against unfair competition in regards to a Work,
|
|
51
|
+
subject to the limitations in paragraph 4(a), below;
|
|
52
|
+
v. rights protecting the extraction, dissemination, use and reuse of data
|
|
53
|
+
in a Work;
|
|
54
|
+
vi. database rights (such as those arising under Directive 96/9/EC of the
|
|
55
|
+
European Parliament and of the Council of 11 March 1996 on the legal
|
|
56
|
+
protection of databases, and under any national implementation
|
|
57
|
+
thereof, including any amended or successor version of such
|
|
58
|
+
directive); and
|
|
59
|
+
vii. other similar, equivalent or corresponding rights throughout the
|
|
60
|
+
world based on applicable law or treaty, and any national
|
|
61
|
+
implementations thereof.
|
|
62
|
+
|
|
63
|
+
2. Waiver. To the greatest extent permitted by, but not in contravention
|
|
64
|
+
of, applicable law, Affirmer hereby overtly, fully, permanently,
|
|
65
|
+
irrevocably and unconditionally waives, abandons, and surrenders all of
|
|
66
|
+
Affirmer's Copyright and Related Rights and associated claims and causes
|
|
67
|
+
of action, whether now known or unknown (including existing as well as
|
|
68
|
+
future claims and causes of action), in the Work (i) in all territories
|
|
69
|
+
worldwide, (ii) for the maximum duration provided by applicable law or
|
|
70
|
+
treaty (including future time extensions), (iii) in any current or future
|
|
71
|
+
medium and for any number of copies, and (iv) for any purpose whatsoever,
|
|
72
|
+
including without limitation commercial, advertising or promotional
|
|
73
|
+
purposes (the "Waiver"). Affirmer makes the Waiver for the benefit of each
|
|
74
|
+
member of the public at large and to the detriment of Affirmer's heirs and
|
|
75
|
+
successors, fully intending that such Waiver shall not be subject to
|
|
76
|
+
revocation, rescission, cancellation, termination, or any other legal or
|
|
77
|
+
equitable action to disrupt the quiet enjoyment of the Work by the public
|
|
78
|
+
as contemplated by Affirmer's express Statement of Purpose.
|
|
79
|
+
|
|
80
|
+
3. Public License Fallback. Should any part of the Waiver for any reason
|
|
81
|
+
be judged legally invalid or ineffective under applicable law, then the
|
|
82
|
+
Waiver shall be preserved to the maximum extent permitted taking into
|
|
83
|
+
account Affirmer's express Statement of Purpose. In addition, to the
|
|
84
|
+
extent the Waiver is so judged Affirmer hereby grants to each affected
|
|
85
|
+
person a royalty-free, non transferable, non sublicensable, non exclusive,
|
|
86
|
+
irrevocable and unconditional license to exercise Affirmer's Copyright and
|
|
87
|
+
Related Rights in the Work (i) in all territories worldwide, (ii) for the
|
|
88
|
+
maximum duration provided by applicable law or treaty (including future
|
|
89
|
+
time extensions), (iii) in any current or future medium and for any number
|
|
90
|
+
of copies, and (iv) for any purpose whatsoever, including without
|
|
91
|
+
limitation commercial, advertising or promotional purposes (the
|
|
92
|
+
"License"). The License shall be deemed effective as of the date CC0 was
|
|
93
|
+
applied by Affirmer to the Work. Should any part of the License for any
|
|
94
|
+
reason be judged legally invalid or ineffective under applicable law, such
|
|
95
|
+
partial invalidity or ineffectiveness shall not invalidate the remainder
|
|
96
|
+
of the License, and in such case Affirmer hereby affirms that he or she
|
|
97
|
+
will not (i) exercise any of his or her remaining Copyright and Related
|
|
98
|
+
Rights in the Work or (ii) assert any associated claims and causes of
|
|
99
|
+
action with respect to the Work, in either case contrary to Affirmer's
|
|
100
|
+
express Statement of Purpose.
|
|
101
|
+
|
|
102
|
+
4. Limitations and Disclaimers.
|
|
103
|
+
|
|
104
|
+
a. No trademark or patent rights held by Affirmer are waived, abandoned,
|
|
105
|
+
surrendered, licensed or otherwise affected by this document.
|
|
106
|
+
b. Affirmer offers the Work as-is and makes no representations or
|
|
107
|
+
warranties of any kind concerning the Work, express, implied,
|
|
108
|
+
statutory or otherwise, including without limitation warranties of
|
|
109
|
+
title, merchantability, fitness for a particular purpose, non
|
|
110
|
+
infringement, or the absence of latent or other defects, accuracy, or
|
|
111
|
+
the present or absence of errors, whether or not discoverable, all to
|
|
112
|
+
the greatest extent permissible under applicable law.
|
|
113
|
+
c. Affirmer disclaims responsibility for clearing rights of other persons
|
|
114
|
+
that may apply to the Work or any use thereof, including without
|
|
115
|
+
limitation any person's Copyright and Related Rights in the Work.
|
|
116
|
+
Further, Affirmer disclaims responsibility for obtaining any necessary
|
|
117
|
+
consents, permissions or other rights required for any use of the
|
|
118
|
+
Work.
|
|
119
|
+
d. Affirmer understands and acknowledges that Creative Commons is not a
|
|
120
|
+
party to this document and has no duty or obligation with respect to
|
|
121
|
+
this CC0 or use of the Work.
|
data/README.md
ADDED
|
@@ -0,0 +1,123 @@
|
|
|
1
|
+
# Temml for Ruby
|
|
2
|
+
|
|
3
|
+
[](https://github.com/sudotac/temml-ruby/actions/workflows/lint-and-test.yml)
|
|
4
|
+
|
|
5
|
+
temml-ruby is a fork of [katex-ruby], focusing on the support of [Temml] instead of [KaTeX].
|
|
6
|
+
|
|
7
|
+
This rubygem enables you to render TeX math to MathML Core using [Temml].
|
|
8
|
+
It uses [ExecJS] under the hood.
|
|
9
|
+
|
|
10
|
+
## Installation
|
|
11
|
+
|
|
12
|
+
Add this line to your application's Gemfile:
|
|
13
|
+
|
|
14
|
+
```ruby
|
|
15
|
+
gem 'temml', '~> 0.31.0'
|
|
16
|
+
```
|
|
17
|
+
|
|
18
|
+
And then execute:
|
|
19
|
+
|
|
20
|
+
$ bundle
|
|
21
|
+
|
|
22
|
+
Or install it yourself as:
|
|
23
|
+
|
|
24
|
+
$ gem install temml
|
|
25
|
+
|
|
26
|
+
## Usage
|
|
27
|
+
|
|
28
|
+
Render some math:
|
|
29
|
+
|
|
30
|
+
```ruby
|
|
31
|
+
Temml.render('c = \\pm\\sqrt{a^2 + b^2}')
|
|
32
|
+
=> "<math><mrow><mi>c</mi><mo>=</mo></mrow><mrow><mo>±</mo></mrow><mrow><msqrt><mrow><msup><mi>a</mi><mn>2</mn></msup><mo>+</mo><msup><mi>b</mi><mn>2</mn></msup></mrow></msqrt></mrow></math>"
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
If you're on Rails, the result is marked as `html_safe`.
|
|
36
|
+
|
|
37
|
+
Any error in the markup is raised by default. To avoid this and render error
|
|
38
|
+
text instead, pass `throwOnError: false`:
|
|
39
|
+
|
|
40
|
+
```ruby
|
|
41
|
+
Temml.render('\\', throwOnError: false)
|
|
42
|
+
=> "<span class=\"temml-error\" style=\"color:#b22222;white-space:pre-line;\">\\\n\nParseError: Unexpected character: '\\' at position 1: \n\\̲</span>"
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
Note that this will catch even `ParseError`s (unlike native Temml).
|
|
46
|
+
|
|
47
|
+
### Assets
|
|
48
|
+
|
|
49
|
+
For this rendered math to look nice, you will also need to include Temml CSS
|
|
50
|
+
and web fonts into the webpage.
|
|
51
|
+
|
|
52
|
+
I recommend you use the CSS bundled with this gem, to ensure version
|
|
53
|
+
compatibility.
|
|
54
|
+
|
|
55
|
+
You also need to include the appropriate web fonts for the CSS
|
|
56
|
+
you have chosen to use.
|
|
57
|
+
Please refer to [Temml's documentation](https://temml.org/docs/en/administration.html#fonts)
|
|
58
|
+
for details.
|
|
59
|
+
|
|
60
|
+
#### Automatic registrations
|
|
61
|
+
|
|
62
|
+
If you use Rails, Sprockets without Rails, or Hanami, the assets are registered
|
|
63
|
+
automatically.
|
|
64
|
+
|
|
65
|
+
For example, if you want to use Latin Modern font,
|
|
66
|
+
`//= require Temml-Latin-Modern` if you use CSS or `@import "_Temml-Latin-Modern"` if you use Sass.
|
|
67
|
+
|
|
68
|
+
You can also `//= require temml` in your JS to access the Temml renderer in the
|
|
69
|
+
browser.
|
|
70
|
+
|
|
71
|
+
#### Manual registration
|
|
72
|
+
|
|
73
|
+
The assets are located in the `vendor/assets` directory of the gem. The root
|
|
74
|
+
path to the root directory of the gem is available via `Temml.gem_path`, e.g.:
|
|
75
|
+
|
|
76
|
+
```ruby
|
|
77
|
+
File.join(Temml.gem_path, 'vendor', 'assets')
|
|
78
|
+
```
|
|
79
|
+
|
|
80
|
+
### Temml version
|
|
81
|
+
|
|
82
|
+
The version of Temml bundled with this gem is available via:
|
|
83
|
+
|
|
84
|
+
```ruby
|
|
85
|
+
Temml::TEMML_VERSION
|
|
86
|
+
```
|
|
87
|
+
|
|
88
|
+
### Caching
|
|
89
|
+
|
|
90
|
+
If you cache the output of `Temml.render`, make sure to use the Temml
|
|
91
|
+
version in the cache key, as the output may change between versions.
|
|
92
|
+
|
|
93
|
+
## Development
|
|
94
|
+
|
|
95
|
+
After checking out the repo, run `bin/setup` to install dependencies.
|
|
96
|
+
Then, run `rake spec` to run the tests. You can also run `bin/console` for an
|
|
97
|
+
interactive prompt that will allow you to experiment.
|
|
98
|
+
|
|
99
|
+
To install this gem onto your local machine, run `bundle exec rake install`.
|
|
100
|
+
|
|
101
|
+
## Contributing
|
|
102
|
+
|
|
103
|
+
Bug reports and pull requests are welcome on GitHub at
|
|
104
|
+
https://github.com/sudotac/temml-ruby.
|
|
105
|
+
|
|
106
|
+
This project is intended to be a safe, welcoming space for collaboration,
|
|
107
|
+
and contributors are expected to adhere to the
|
|
108
|
+
[Contributor Covenant](http://contributor-covenant.org) code of conduct.
|
|
109
|
+
|
|
110
|
+
|
|
111
|
+
## License
|
|
112
|
+
|
|
113
|
+
This gem is almost based on [katex-ruby] and my additional contribution is tiny and trivial,
|
|
114
|
+
so I will make this gem available under the terms of [CC0 1.0 Universal](https://creativecommons.org/publicdomain/zero/1.0/).
|
|
115
|
+
|
|
116
|
+
Note that you must follow the licenses of [katex-ruby], [Temml] and [KaTeX],
|
|
117
|
+
which are distributed under the terms of the [MIT License](http://opensource.org/licenses/MIT).
|
|
118
|
+
See the license files in the [license](license) directory.
|
|
119
|
+
|
|
120
|
+
[katex-ruby]: https://github.com/glebm/katex-ruby
|
|
121
|
+
[KaTeX]: https://github.com/Khan/KaTeX
|
|
122
|
+
[Temml]: https://github.com/ronkok/Temml
|
|
123
|
+
[ExecJS]: https://github.com/rails/execjs
|
data/lib/temml/engine.rb
ADDED
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
# SPDX-License-Identifier: CC0-1.0 AND MIT
|
|
4
|
+
|
|
5
|
+
module Temml
|
|
6
|
+
# Registers Temml fonts, stylesheets, and javascripts with Rails.
|
|
7
|
+
class Engine < ::Rails::Engine
|
|
8
|
+
initializer 'temml.assets' do |app|
|
|
9
|
+
# We deliberately do not place the assets in vendor/assets but in
|
|
10
|
+
# vendor/temml instead, as vendor/assets is added to asset paths
|
|
11
|
+
# by default but we have to avoid including the non-sprockets stylesheet.
|
|
12
|
+
%w[fonts javascripts images].each do |sub|
|
|
13
|
+
path = root.join('vendor', 'temml', sub).to_s
|
|
14
|
+
app.config.assets.paths << path if File.directory?(path)
|
|
15
|
+
end
|
|
16
|
+
# Use sprockets versions of temml CSS that use asset-path for
|
|
17
|
+
# referencing fonts.
|
|
18
|
+
# One file is a Sass partial and the other one is .css.erb.
|
|
19
|
+
app.config.assets.paths << root.join(
|
|
20
|
+
'vendor', 'temml', 'sprockets', 'stylesheets'
|
|
21
|
+
).to_s
|
|
22
|
+
end
|
|
23
|
+
end
|
|
24
|
+
end
|
data/lib/temml.rb
ADDED
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
# SPDX-License-Identifier: CC0-1.0 AND MIT
|
|
4
|
+
|
|
5
|
+
require 'temml/version'
|
|
6
|
+
require 'execjs'
|
|
7
|
+
require 'erb'
|
|
8
|
+
|
|
9
|
+
# Provides a Ruby wrapper for Temml server-side rendering.
|
|
10
|
+
module Temml
|
|
11
|
+
@load_context_mutex = Mutex.new
|
|
12
|
+
@temml_context = nil
|
|
13
|
+
@execjs_runtime = -> { ExecJS.runtime }
|
|
14
|
+
|
|
15
|
+
class << self
|
|
16
|
+
# rubocop:disable Naming/MethodParameterName, Naming/VariableName
|
|
17
|
+
|
|
18
|
+
# Renders the given math expression to MathML via temml.renderToString.
|
|
19
|
+
#
|
|
20
|
+
# Additional options must be passed as anonymous keyword arguments.
|
|
21
|
+
# See https://temml.org/docs/en/administration.html#options
|
|
22
|
+
#
|
|
23
|
+
# @param math [String] The math (Latex) expression
|
|
24
|
+
# @param throwOnError [Boolean] Whether to raise on error. If false,
|
|
25
|
+
# renders the error message instead (even in case of ParseError, unlike
|
|
26
|
+
# the native temml).
|
|
27
|
+
# @return [String] MathML. If strings respond to html_safe, the result will
|
|
28
|
+
# be HTML-safe.
|
|
29
|
+
# @note This method is thread-safe as long as your ExecJS runtime is
|
|
30
|
+
# thread-safe. MiniRacer is the recommended runtime.
|
|
31
|
+
def render(math, throwOnError: true, **)
|
|
32
|
+
maybe_html_safe temml_context.call(
|
|
33
|
+
'temml.renderToString',
|
|
34
|
+
math,
|
|
35
|
+
throwOnError:,
|
|
36
|
+
**
|
|
37
|
+
)
|
|
38
|
+
rescue ExecJS::ProgramError => e
|
|
39
|
+
raise e if throwOnError
|
|
40
|
+
end
|
|
41
|
+
# rubocop:enable Naming/MethodParameterName, Naming/VariableName
|
|
42
|
+
|
|
43
|
+
# The ExecJS runtime factory, default: `-> { ExecJS.runtime }`.
|
|
44
|
+
# Set this before calling any other methods to use a different runtime.
|
|
45
|
+
#
|
|
46
|
+
# This proc is guaranteed to be called at most once.
|
|
47
|
+
attr_accessor :execjs_runtime
|
|
48
|
+
|
|
49
|
+
def temml_context
|
|
50
|
+
@load_context_mutex.synchronize do
|
|
51
|
+
@temml_context ||= @execjs_runtime.call.compile File.read temml_js_path
|
|
52
|
+
end
|
|
53
|
+
end
|
|
54
|
+
|
|
55
|
+
def temml_js_path
|
|
56
|
+
File.expand_path File.join('vendor', 'temml', 'javascripts', 'temml.js'),
|
|
57
|
+
gem_path
|
|
58
|
+
end
|
|
59
|
+
|
|
60
|
+
def gem_path
|
|
61
|
+
@gem_path ||=
|
|
62
|
+
File.expand_path(File.join(File.dirname(__FILE__), '..'))
|
|
63
|
+
end
|
|
64
|
+
|
|
65
|
+
private
|
|
66
|
+
|
|
67
|
+
def maybe_html_safe(html)
|
|
68
|
+
if html.respond_to?(:html_safe)
|
|
69
|
+
html.html_safe
|
|
70
|
+
else
|
|
71
|
+
html
|
|
72
|
+
end
|
|
73
|
+
end
|
|
74
|
+
end
|
|
75
|
+
end
|
|
76
|
+
|
|
77
|
+
if defined?(Rails)
|
|
78
|
+
require 'temml/engine'
|
|
79
|
+
else
|
|
80
|
+
assets_path = File.join(Temml.gem_path, 'vendor', 'temml')
|
|
81
|
+
if defined?(Sprockets)
|
|
82
|
+
%w[fonts javascripts images].each do |subdirectory|
|
|
83
|
+
path = File.join(assets_path, subdirectory)
|
|
84
|
+
Sprockets.append_path(path) if File.directory?(path)
|
|
85
|
+
end
|
|
86
|
+
Sprockets.append_path(File.join(assets_path, 'sprockets', 'stylesheets'))
|
|
87
|
+
elsif defined?(Hanami)
|
|
88
|
+
Hanami::Assets.sources << assets_path
|
|
89
|
+
end
|
|
90
|
+
end
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
The MIT License (MIT)
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2013-2020 Khan Academy and other contributors
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
The MIT License (MIT)
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2020 Ron Kok
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
The MIT License (MIT)
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2017 Gleb Mazovetskiy
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in
|
|
13
|
+
all copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
21
|
+
THE SOFTWARE.
|
|
Binary file
|