Skip to content

Commit

Permalink
Updates dependencies.
Browse files Browse the repository at this point in the history
Rollup 3
  • Loading branch information
kalvn committed Apr 2, 2023
1 parent 41097de commit d110252
Show file tree
Hide file tree
Showing 10 changed files with 8,797 additions and 5,453 deletions.
1 change: 1 addition & 0 deletions material/includes.html
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@
<meta property="article:tag" content="{$value}" />
{/loop}
{/if}
<link type="text/css" rel="stylesheet" href="{$asset_path}/dist/lib.css?v={$version_hash}#" />
<link type="text/css" rel="stylesheet" href="{$asset_path}/dist/bundle.css?v={$version_hash}#" />
{if="$conf->get('config.MATERIAL_COLOR')"}
{$themeColor=$conf->get('config.MATERIAL_COLOR')}
Expand Down
14,155 changes: 8,745 additions & 5,410 deletions package-lock.json

Large diffs are not rendered by default.

38 changes: 19 additions & 19 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,11 @@
"version": "0.12.1",
"description": "Shaarli Material is a theme for [Shaarli](https://github.com/shaarli/Shaarli), the personal, minimalist, super-fast, database free, bookmarking service.",
"main": "src/js/main.js",
"type": "module",
"dependencies": {
"@babel/runtime": "^7.12.5",
"@babel/runtime-corejs3": "^7.12.5",
"autosize": "^4.0.2",
"autosize": "^6.0.1",
"awesomplete": "^1.1.5",
"blazy": ">=1.3.0",
"bootstrap": "^3.4.1",
Expand All @@ -21,29 +22,27 @@
"@babel/core": "^7.12.10",
"@babel/plugin-transform-runtime": "^7.12.10",
"@babel/preset-env": "^7.12.11",
"@fullhuman/postcss-purgecss": "^2.3.0",
"@rollup/plugin-babel": "^5.2.2",
"@rollup/plugin-commonjs": "^17.0.0",
"@rollup/plugin-eslint": "^8.0.1",
"@rollup/plugin-node-resolve": "^11.1.0",
"autoprefixer": "^9.8.6",
"@rollup/plugin-babel": "^6.0.3",
"@rollup/plugin-commonjs": "^24.0.1",
"@rollup/plugin-eslint": "^9.0.3",
"@rollup/plugin-node-resolve": "^15.0.1",
"@rollup/plugin-terser": "^0.4.0",
"babel-eslint": "^10.1.0",
"cross-env": "^7.0.3",
"eslint": "^7.18.0",
"eslint-config-semistandard": "^15.0.1",
"eslint-config-standard": "^16.0.2",
"csso": "^5.0.5",
"eslint": "^8.36.0",
"eslint-config-semistandard": "^17.0.0",
"eslint-config-standard": "^17.0.0",
"eslint-plugin-import": "^2.22.1",
"eslint-plugin-node": "^11.1.0",
"eslint-plugin-promise": "^4.2.1",
"eslint-plugin-promise": "^6.1.1",
"eslint-plugin-standard": "^5.0.0",
"postcss": "^8.2.4",
"postcss-clean": "^1.1.0",
"purgecss": "^3.1.3",
"rollup": "^2.36.2",
"rollup-plugin-babel": "^4.4.0",
"rollup": "^3.20.2",
"rollup-plugin-copy": "^3.3.0",
"rollup-plugin-postcss": "^4.0.0",
"rollup-plugin-terser": "^7.0.2",
"rollup-plugin-css-only": "^4.3.0",
"rollup-plugin-sass": "^1.12.19",
"sass": "^1.32.4"
},
"scripts": {
Expand All @@ -67,7 +66,9 @@
},
"rules": {
"node/no-callback-literal": "off",
"node/handle-callback-err": "off"
"n/no-callback-literal": "off",
"node/handle-callback-err": "off",
"n/handle-callback-err": "off"
},
"globals": {
"shaarli": true
Expand All @@ -85,7 +86,6 @@
"author": "kalvn",
"license": "MIT",
"browserslist": [
"last 5 versions",
"ie >= 9"
"last 5 versions"
]
}
37 changes: 21 additions & 16 deletions rollup.config.js
Original file line number Diff line number Diff line change
@@ -1,15 +1,17 @@
import path from 'path';
import fs from 'fs';

import resolve from '@rollup/plugin-node-resolve';
import babel from '@rollup/plugin-babel';
import commonjs from '@rollup/plugin-commonjs';
import postcss from 'rollup-plugin-postcss';
import postcss from 'postcss';
import clean from 'postcss-clean';
import autoprefixer from 'autoprefixer';
import copy from 'rollup-plugin-copy';
// import purgecss from '@fullhuman/postcss-purgecss';
import eslint from '@rollup/plugin-eslint';
import { terser } from "rollup-plugin-terser"; // minify JS
import terser from '@rollup/plugin-terser';
import sass from 'rollup-plugin-sass';
import css from 'rollup-plugin-css-only';
import { minify } from 'csso';

const config = {
input: 'src/js/main.js',
Expand All @@ -18,27 +20,30 @@ const config = {
format: 'iife'
},
plugins: [
resolve(),
resolve({
browser: true
}),
commonjs(),
css({
output: function (styles) {
fs.writeFileSync(path.join('material', 'dist', 'lib.css'), minify(styles).css);
}
}),
sass({
output: true,
processor: css => postcss([clean])
.process(css, { from: undefined })
.then(result => result.css)
}),
eslint({
exclude: [
'node_modules/**',
'src/scss/**'
]
}),
process.env.NODE_ENV === 'production' ? terser() : null,
postcss({
extract: path.resolve('material/dist/bundle.css'),
plugins: [
// purgecss({
// content: ['material/*.html']
// }),
autoprefixer(),
clean()
]
}),
babel({
babelHelpers: 'bundled',
babelHelpers: 'bundled'
}),
copy({
targets: [
Expand Down
4 changes: 2 additions & 2 deletions src/js/components/batch-edit.js
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ const batchEdit = {
} else {
$element.addClass('is-selected');
model.selectedLinks[id] = {
id: id,
id,
title: escapeHtml($element.find('.link-title').text())
};

Expand Down Expand Up @@ -193,7 +193,7 @@ const batchEdit = {
const select = function () {
$link.addClass('is-selected');
model.selectedLinks[id] = {
id: id,
id,
title: escapeHtml($link.find('.link-title').text())
};

Expand Down
2 changes: 1 addition & 1 deletion src/js/components/search.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ const search = {
$('#button-filter').on('click', function () {
const val = $('#searchform_value').val().trim();
$('#tagfilter_value').val(val);
$('#hidden-tag-form').submit();
$('#hidden-tag-form').trigger('submit');

return false;
});
Expand Down
4 changes: 2 additions & 2 deletions src/js/components/tag.js
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ const tag = {
data: {
deletetag: 1,
fromtag: tag,
token: token
token
},
success: function () {
const $toBeRemoved = el.closest('.list-item-flex');
Expand Down Expand Up @@ -82,7 +82,7 @@ const tag = {
data: {
fromtag: tag,
totag: newTag,
token: token,
token,
renametag: 'Rename tag'
},
success: function () {
Expand Down
3 changes: 2 additions & 1 deletion src/js/lib.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@ import $ from 'jquery';
import Blazy from 'blazy';
import Awesomplete from 'awesomplete';
import Sortable from 'sortablejs';
import QRCode from '../../node_modules/qrcode/build/qrcode';
// import QRCode from '../../node_modules/qrcode/build/qrcode';
import QRCode from 'qrcode';
import autosize from 'autosize';

import overlay from './components/overlay';
Expand Down
2 changes: 1 addition & 1 deletion src/scss/components/_global.scss
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

html{
background: $color-gray-150;
font-size: 100%;
font-size: $font-size;
-webkit-tap-highlight-color: rgba(0,0,0,0);
}

Expand Down
4 changes: 3 additions & 1 deletion src/scss/components/_notification.scss
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
@use "sass:math";

.notifications {
position: fixed;
display: flex;
Expand Down Expand Up @@ -35,7 +37,7 @@
position: absolute;
top: 0;
right: 0;
padding: ($space-t / 2) $space-t;
padding: math.div($space-t, 2) $space-t;
color: $color-gray-600;

&:hover,
Expand Down

0 comments on commit d110252

Please sign in to comment.