Modification of https://github.com/artf/grapesjs-component-countdown.git
Simple promoclock component for GrapesJS Editor
- Plugin name:
gjs-component-promoclock - Components:
promoclock - Blocks:
promoclock
blocksWhich blocks to add, default:['promoclock'](all)defaultStyleAdd default style to blocks, default: truedurationpromoClock durationcookieCookie name 'promoClockCookie'expiresCookie validity in days shall be greater than promoClock duration '100'endTextText to show when the promoclock is ended, default: 'EXPIRED'dateInputTypeDate input type, eg, 'date', 'datetime-local', default: 'date'promoclockClsPfxPromoclock class prefix, default: 'promoclock'labelPromoclockPromoclock label, default 'Promoclock'labelPromoclockCategoryPromoclock category label, default 'Extra'labelDaysDays label text used in component, default 'days'labelHoursHours label text used in component, default 'hours'labelMinutesMinutes label text used in component, default 'minutes'labelSecondsSeconds label text used in component, default 'seconds'
npm i grapesjs-component-promoclockoryarn add grapesjs-component-promoclock
<link href="path/to/grapes.min.css" rel="stylesheet"/>
<script src="path/to/grapes.min.js"></script>
<script src="path/to/grapesjs-component-promoclock.min.js"></script>
<div id="gjs"></div>
<script type="text/javascript">
var editor = grapesjs.init({
container : '#gjs',
plugins: ['gjs-component-promoclock'],
pluginsOpts: {
'gjs-component-promoclock': {/* ...options */}
}
});
</script>Clone the repository
$ git clone https://github.com/artf/grapesjs-component-promoclock.git
$ cd grapesjs-component-promoclockInstall it
$ npm iStart the dev server
$ npm startBuild before the commit. This will also increase the patch level version of the package
$ npm run buildBSD 3-Clause