Skip to content

Commit

Permalink
bump to framework7 8.3.2 + start rework JS
Browse files Browse the repository at this point in the history
  • Loading branch information
DivadNojnarg committed Mar 7, 2024
1 parent 130a335 commit b8d07de
Show file tree
Hide file tree
Showing 48 changed files with 2,390 additions and 40 deletions.
6 changes: 6 additions & 0 deletions .Rbuildignore
Original file line number Diff line number Diff line change
Expand Up @@ -14,3 +14,9 @@
^tools$
^index\.Rmd$
^CRAN-SUBMISSION$
^node_modules$
^package\.json$
^package-lock\.json$
^styles$
^esbuild\.dev\.json$
^esbuild\.prod\.json$
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,4 @@ inst/examples/chat_widget
docs
inst/examples/chat_widget
inst/tests/**
node_modules
12 changes: 6 additions & 6 deletions R/framework7-dependencies.R
Original file line number Diff line number Diff line change
Expand Up @@ -5,16 +5,16 @@
#' @param tag Element to attach the dependencies.
#'
#' @importFrom htmltools tagList htmlDependency
#' @keywords internal
#' @export
add_framework7_deps <- function(tag) {
framework7_deps <- htmlDependency(
name = "framework7",
version = "5.7.14",
src = c(file = "framework7-5.7.14"),
script = "js/framework7.bundle.min.js",
stylesheet = "css/framework7.bundle.min.css",
version = "8.3.2",
src = c(file = "framework7-8.3.2"),
script = "js/framework7-bundle.min.js",
stylesheet = "css/framework7-bundle.min.css",
package = "shinyMobile",
)
tagList(tag, framework7_deps)
}

10 changes: 5 additions & 5 deletions R/shinyMobile-dependencies.R
Original file line number Diff line number Diff line change
Expand Up @@ -6,16 +6,16 @@
#'
#' @importFrom utils packageVersion
#' @importFrom htmltools tagList htmlDependency
#' @keywords internal
#' @export
add_shinyMobile_deps <- function(tag) {
shinyMobile_deps <- htmlDependency(
name = "shinyMobile",
version = packageVersion("shinyMobile"),
version = "1.0.1",
src = c(file = "shinyMobile-1.0.1"),
script = "js/shinyMobile.min.js",
stylesheet = "css/shinyMobile.css",
script = "dist/shinyMobile.min.js",
stylesheet = "dist/shinyMobile.min.css",
package = "shinyMobile",
)
tagList(tag, shinyMobile_deps)
}

25 changes: 25 additions & 0 deletions esbuild.prod.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
import esbuild from "esbuild";
import {sassPlugin} from 'esbuild-sass-plugin';
import postcss from 'postcss';
import autoprefixer from 'autoprefixer';

esbuild
.build({
entryPoints: ['./srcjs/main.js'],
outdir: "inst/shinyMobile-1.0.1/dist",
entryNames: "shinyMobile.min",
bundle: true,
format: "esm",
minify: true, // prod
sourcemap: "external", // prod
plugins: [
sassPlugin({
async transform(source) {
const { css } = await postcss([autoprefixer]).process(source);
return css;
},
}),
]
})
.then(() => console.log("⚡ Build complete! ⚡"))
.catch(() => process.exit(1));
1 change: 1 addition & 0 deletions inst/.gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
.DS_Store
node_modules
13 changes: 0 additions & 13 deletions inst/framework7-5.7.14/css/framework7.bundle.min.css

This file was deleted.

14 changes: 0 additions & 14 deletions inst/framework7-5.7.14/js/framework7.bundle.min.js

This file was deleted.

19 changes: 19 additions & 0 deletions inst/framework7-8.3.2/css/framework7-bundle.min.css

Large diffs are not rendered by default.

14 changes: 14 additions & 0 deletions inst/framework7-8.3.2/js/framework7-bundle.min.js

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions inst/shinyMobile-1.0.1/dist/shinyMobile.min.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 7 additions & 0 deletions inst/shinyMobile-1.0.1/dist/shinyMobile.min.css.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

106 changes: 106 additions & 0 deletions inst/shinyMobile-1.0.1/dist/shinyMobile.min.js

Large diffs are not rendered by default.

7 changes: 7 additions & 0 deletions inst/shinyMobile-1.0.1/dist/shinyMobile.min.js.map

Large diffs are not rendered by default.

Loading

0 comments on commit b8d07de

Please sign in to comment.