Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor: replace NodeJS with NodeJS_18_jll #1069

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@ jobs:
version: '1'
- run: julia -e '
using Pkg;
Pkg.add(Pkg.PackageSpec(name="NodeJS"));
using NodeJS;
Pkg.add(Pkg.PackageSpec(name="NodeJS_18_jll"));
using NodeJS_18_jll;
run(`$(npm_cmd()) install lunr`);
run(`$(npm_cmd()) install cheerio`);
Pkg.add(Pkg.PackageSpec(name="Franklin", rev="master"));
Expand Down
11 changes: 5 additions & 6 deletions Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,31 +14,30 @@ Literate = "98b081ad-f1c9-55d3-8b20-4c87d4299306"
LiveServer = "16fef848-5104-11e9-1b77-fb7a48bbb589"
Logging = "56ddb016-857b-54e1-b83d-db4d58db5568"
Markdown = "d6f4376e-aef5-505a-96c1-9c027394607a"
NodeJS = "2bd173c7-0d6d-553b-b6af-13a54713934c"
NodeJS_18_jll = "c1e1d063-8311-5f52-a749-c7b05e91ae37"
OrderedCollections = "bac558e1-5e72-5ebc-8fee-abe8a469f55d"
Pkg = "44cfe95a-1eb2-52ea-b672-e2afdf69b78f"
REPL = "3fa0cd96-eef1-5676-8a61-b3b8758bbffb"
Random = "9a3f8284-a2c9-5f02-9a11-845980a1fd5c"
TOML = "fa267f1f-6049-4f14-aa54-33bafae1ed76"

[compat]
Dates = "<0.0.1, 1"
DelimitedFiles = "1"
DocStringExtensions = "0.8, 0.9"
ExprTools = "0.1"
FranklinTemplates = "0.10"
HTTP = "0.8, 0.9, 1.0"
Literate = "2.9"
LiveServer = "0.4, 0.5, 0.6, 0.7, 0.8, 0.9, 1.0"
NodeJS = "0.6, 1, 2"
OrderedCollections = "1"
TOML = "1.0"
julia = "1.3"
Dates = "<0.0.1, 1"
Logging = "<0.0.1, 1"
Markdown = "<0.0.1, 1"
OrderedCollections = "1"
Pkg = "<0.0.1, 1"
REPL = "<0.0.1, 1"
Random = "<0.0.1, 1"
TOML = "1.0"
julia = "1.3"

[extras]
DataFrames = "a93c6f00-e57d-5684-b7b6-d8193f3e46c0"
Expand Down
6 changes: 3 additions & 3 deletions docs/extras/literate.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,17 +47,17 @@ Start by installing `gh-pages` with `npm`:
$> npm install gh-pages
```

Using the package [NodeJS.jl](https://github.com/davidanthoff/NodeJS.jl) it is then easy to use `gh-pages` to push the generated notebooks to a folder on the `gh-pages` branch:
Using the package [NodeJS_18_jll](https://github.com/JuliaBinaryWrappers/NodeJS_18_jll.jl) it is then easy to use `gh-pages` to push the generated notebooks to a folder on the `gh-pages` branch:

```julia
using NodeJS
using NodeJS_18_jll

JS_GHP = """
var ghpages = require('gh-pages');
ghpages.publish('generated/', function(err) {});
"""

run(`$(nodejs_cmd()) -e $JS_GHP`)
run(`$(node()) -e $JS_GHP`)
```

Now these generated files are available on that branch without polluting your `master` branch.
Expand Down
8 changes: 4 additions & 4 deletions docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,14 +59,14 @@ This requires a couple of dependencies:
* [`python3`](https://www.python.org/downloads/) for the minification of the site,
* [`node.js`](https://nodejs.org/en/) for the pre-rendering of KaTeX and code highlighting.
@@
You will then need to install `highlight.js`, which you should do from Julia using the [NodeJS.jl](https://github.com/davidanthoff/NodeJS.jl) package:
You will then need to install `highlight.js`, which you should do from Julia using the [NodeJS_18_jll](https://github.com/JuliaBinaryWrappers/NodeJS_18_jll.jl) package:

```julia-repl
julia> using NodeJS
julia> run(`sudo $(npm_cmd()) install highlight.js`)
julia> using NodeJS_18_jll
julia> run(`sudo $(node()) $npm install highlight.js`)
```

**Note**: a key advantage of using `NodeJS` for this instead of using `npm` yourself is that it puts the libraries in the "right place" for Julia to find them.
**Note**: a key advantage of using `NodeJS_18_jll` for this instead of using `npm` yourself is that it puts the libraries in the "right place" for Julia to find them.

Assuming you have `python3`, Franklin will try to install the python package [`css_html_js_minify`](https://github.com/juancarlospaco/css-html-js-minify) if via `pip3`.

Expand Down
2 changes: 1 addition & 1 deletion src/Franklin.jl
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ using TOML
import Logging
import LiveServer
import Base.push!
import NodeJS
import NodeJS_18_jll
import Literate
import HTTP
import Random
Expand Down
2 changes: 1 addition & 1 deletion src/build.jl
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ function NODE()
if "NODE" ∈ keys(ENV)
ENV["NODE"]
else
NodeJS.nodejs_cmd()
NodeJS_18_jll.node()
end
end

Expand Down
Loading