-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #5 from dmurdoch/move_js_to_src
Move the uncompressed source to src/mathjax.
- Loading branch information
Showing
62 changed files
with
25 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,3 +5,4 @@ | |
^docs$ | ||
^.*\.Rproj$ | ||
^\.Rproj\.user$ | ||
^inst/doc/mathjax |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
mathjax |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,25 @@ | ||
message(getwd()) | ||
|
||
mjdir <- "../inst/doc/mathjax" | ||
|
||
jsfiles <- list.files(mjdir, pattern = "[.]js$", recursive = TRUE) | ||
|
||
srcdir <- "../src" | ||
destdir <- "../inst/doc" | ||
jsfiles <- list.files(srcdir, pattern = "[.]js$", | ||
recursive = TRUE) | ||
fontfiles <- list.files(srcdir, pattern = "[.]woff$", | ||
recursive = TRUE) | ||
minify <- requireNamespace("js", quietly = TRUE) | ||
|
||
if (minify) { | ||
for (f in jsfiles) { | ||
dir <- file.path(mjdir, dirname(f)) | ||
mini <- js::uglify_files(file.path(mjdir, f), unused = FALSE) | ||
writeLines(mini, file.path(dir, basename(f))) | ||
} | ||
for (f in jsfiles) { | ||
dir <- file.path(destdir, dirname(f)) | ||
if (!dir.exists(dir)) | ||
dir.create(dir, recursive = TRUE) | ||
if (minify) { | ||
mini <- js::uglify_files(file.path(srcdir, f), unused = FALSE) | ||
writeLines(mini, file.path(dir, basename(f))) | ||
} else | ||
file.copy(file.path(srcdir, f), | ||
file.path(destdir, f)) | ||
} | ||
for (f in fontfiles) { | ||
dir <- file.path(destdir, dirname(f)) | ||
if (!dir.exists(dir)) | ||
dir.create(dir, recursive = TRUE) | ||
file.copy(file.path(srcdir, f), | ||
file.path(destdir, f)) | ||
} |
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.