/
githubmirror
/
fullPage.js
Обзор
Документация
Войти
/
githubmirror
/
fullPage.js
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
master
rollup.config.js
241 строка
7 KB
Alvaro Trigo López
- Enhancement: new option cinematic to use the Cinematic extension
04 мар 2026, 17:30
04 мар 2026, 17:30
0cc43c4
Код
Авторство
О чём код?
import { terser } from "rollup-plugin-terser"; import resolve from "@rollup/plugin-node-resolve"; import babel from "@rollup/plugin-babel"; const licenseContent = `/*! * fullPage 4.0.41 * https://github.com/alvarotrigo/fullPage.js * * @license GPLv3 for open source use only * or Fullpage Commercial License for commercial use * http://alvarotrigo.com/fullPage/pricing/ * * Copyright (C) 2018 http://alvarotrigo.com/fullPage - A project by Alvaro Trigo */ `; const terserOptions = { compress: { passes: 2, drop_console: true, }, mangle: { properties: { // regex: /_$/, keep_quoted: true, reserved: [ 'fullpage', 'jQuery', '$', 'fn', // options 'menu', 'anchors', 'lockAnchors', 'navigation', 'navigationPosition', 'navigationTooltips', 'showActiveTooltip', 'slidesNavigation', 'slidesNavPosition', 'scrollBar', 'hybrid', 'licenseKey', 'credits', 'css3', 'scrollingSpeed', 'autoScrolling', 'fitToSection', 'fitToSectionDelay', 'easing', 'easingcss3', 'loopBottom', 'loopTop', 'loopHorizontal', 'continuousVertical', 'continuousHorizontal', 'scrollHorizontally', 'interlockedSlides', 'dragAndMove', 'offsetSections', 'resetSliders', 'fadingEffect', 'normalScrollElements', 'scrollOverflow', 'scrollOverflowReset', 'touchSensitivity', 'skipIntermediateItems', 'touchWrapper', 'bigSectionsDestination', 'adjustOnNavChange', 'keyboardScrolling', 'animateAnchor', 'recordHistory', 'allowCorrectDirection', 'scrollOverflowMacStyle', 'controlArrows', 'controlArrowsHTML', 'controlArrowColor', 'verticalCentered', 'sectionsColor', 'paddingTop', 'paddingBottom', 'fixedElements', 'responsive', 'responsiveWidth', 'responsiveHeight', 'responsiveSlides', 'effects', 'effectsOptions', 'cinematic', 'cinematicOptions', 'parallax', 'parallaxOptions', 'type', 'percentage', 'property', 'cards', 'cardsOptions', 'perspective', 'fadeContent', 'fadeBackground', 'sectionSelector', 'slideSelector', 'rtl', // Callbacks 'afterLoad', 'beforeLeave', 'onLeave', 'afterRender', 'afterResize', 'afterReBuild', 'afterSlideLoad', 'onSlideLeave', 'afterResponsive', 'onScrollOverflow', 'lazyLoading', 'lazyLoadThreshold', 'observer', 'scrollBeyondFullpage', // Public API 'version', 'setAutoScrolling', 'setRecordHistory', 'setScrollingSpeed', 'setFitToSection', 'setLockAnchors', 'setMouseWheelScrolling', 'setAllowScrolling', 'setKeyboardScrolling', 'moveSectionUp', 'moveSectionDown', 'silentMoveTo', 'moveTo', 'moveSlideRight', 'moveSlideLeft', 'reBuild', 'setResponsive', 'getFullpageData', 'destroy', 'getActiveSection', 'getActiveSlide', 'getScrollY', 'getScrollX', 'landscapeScroll', 'test', 'shared', 'internals', 'fullpage_api', 'fullpage_extensions', 'fp_easings', 'easeInOutCubic', //fp_utils scrollOverflow 'isScrolled', // Callbacks params 'anchor', 'index', 'item', 'isFirst', 'isLast', // directions 'up', 'down', 'left', 'right', 'all', 'k', 'm' ] } } }; // ([a-zA-Z0-9]+\.)+(\w+) // https://jsfiddle.net/kut3oh5j/ module.exports = [ { input: "src/js/app.js", external: [ 'fullpage', 'fullpage_api', 'window', 'document' ], globals: { 'document': 'document', 'window': 'window' }, output: [ { file: "dist/fullpage.js", name: "fullpage", format: "umd", banner: licenseContent, globals: { 'document': 'document', 'window': 'window' }, }, { file: "dist/fullpage.min.js", name: "fullpage", format: "umd", banner: licenseContent, plugins: [terser(terserOptions)], globals: { 'document': 'document', 'window': 'window' }, }, ], plugins: [ resolve(), babel({ presets: [ [ '@babel/preset-env', { targets: { "ie": "11" } } ] ], babelHelpers: "bundled", exclude: "node_modules/**" }) ] } ];