New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

amazeui-doc-util

Package Overview
Dependencies
Maintainers
1
Versions
15
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

amazeui-doc-util - npm Package Compare versions

Comparing version 0.3.0 to 0.4.0

11

gulpfile.js

@@ -5,2 +5,3 @@ 'use strict';

var gulp = require('gulp');
var webpack = require('webpack-stream');
var $ = require('gulp-load-plugins')();

@@ -44,2 +45,7 @@ var markJSON = require('markit-json');

return gulp.src(paths.js)
.pipe(webpack({
output: {
filename: 'app.js',
},
}))
.pipe($.uglify())

@@ -56,3 +62,6 @@ .pipe($.rename(function(file) {

.pipe(markJSON(docUtil.markedOptions))
.pipe(docUtil.applyTemplate())
.pipe(docUtil.applyTemplate(null, {
pluginTitle: 'Amaze UI Plugin',
pluginDesc: 'Just another Amaze UI plugin.'
}))
.pipe($.rename({extname: '.html'}))

@@ -59,0 +68,0 @@ .pipe(gulp.dest('./dist'));

34

package.json
{
"name": "amazeui-doc-util",
"version": "0.3.0",
"version": "0.4.0",
"description": "Amaze UI Markdown docs parsing util.",

@@ -25,22 +25,24 @@ "main": "index.js",

"dependencies": {
"handlebars": "^3.0.3",
"highlight.js": "^8.4.0",
"marked": "^0.3.2",
"object.assign": "^3.0.0",
"through2": "^0.6.3",
"handlebars": "^4.0.5",
"highlight.js": "^8.9.1",
"marked": "^0.3.5",
"object.assign": "^4.0.3",
"through2": "^2.0.0",
"unidecode": "^0.1.7"
},
"devDependencies": {
"amazeui": "^2.1.0",
"gulp": "^3.8.10",
"gulp-autoprefixer": "^2.1.0",
"gulp-csso": "^0.2.9",
"gulp-header": "^1.2.2",
"gulp-less": "^2.0.1",
"gulp-load-plugins": "^0.8.0",
"amazeui": "^2.5.0",
"clipboard": "^1.5.5",
"gulp": "^3.9.0",
"gulp-autoprefixer": "^3.1.0",
"gulp-csso": "^1.0.1",
"gulp-header": "^1.7.1",
"gulp-less": "^3.0.5",
"gulp-load-plugins": "^1.1.0",
"gulp-qndn": "0.0.3",
"gulp-rename": "^1.2.0",
"gulp-uglify": "^1.0.2",
"markit-json": "^0.2.1"
"gulp-rename": "^1.2.2",
"gulp-uglify": "^1.5.1",
"markit-json": "^0.2.1",
"webpack-stream": "^2.2.0"
}
}
(function() {
var $ = this.jQuery;
var Clipboard = require('clipboard');
var $ = window.jQuery;

@@ -10,3 +11,4 @@ if (!$ || !$.AMUI) {

var $testCode = $('<!--[if lte IE 9]><span id="old-ie-tester"></span><![endif]-->');
var isOldIE = $(document.body).append($testCode).find('#old-ie-tester').length;
var isOldIE = $(document.body).append($testCode)
.find('#old-ie-tester').length;
$testCode.remove();

@@ -26,3 +28,3 @@ return !!isOldIE;

AMPlugin.prototype.toolbar = function() {
var _this = this;
var _this = this;
var $w = $(window);

@@ -70,5 +72,56 @@ var $toolbar = $('#amp-toolbar');

function initClipboard() {
var copyBtn = '<div class="doc-actions"><div class="doc-act-inner">' +
'<span class="doc-act-clip am-icon-copy"> Copy</span></div></div>';
$('.doc-code').each(function() {
var $code = $(this);
var $prev = $code.prev();
if ($prev.hasClass('doc-example')) {
$prev.before(copyBtn);
} else {
$code.before(copyBtn);
}
});
// https://zenorocha.github.io/clipboard.js/
var clipboard = new Clipboard('.doc-act-clip', {
text: function(trigger) {
var $next = $(trigger).parent().parent().next();
var $reqCode = $next.is('.doc-code') ? $next : $next.next('.doc-code');
return $reqCode.text();
}
});
var timer;
clipboard.on('success', function(e) {
var $trigger = $(e.trigger);
var oldText = ' Copy';
var success = 'success';
$trigger.addClass(success).text(' Copied');
timer && clearTimeout(timer);
timer = setTimeout(function() {
$trigger.removeClass(success).text(oldText);
}, 3000);
console.info('Copied text to clipboard: ' + e.text);
e.clearSelection();
});
clipboard.on('error', function(e) {
$(e.trigger).text(' Error!').addClass('error');
console.error('Action:', e.action);
console.error('Trigger:', e.trigger);
});
}
$(function() {
new AMPlugin();
initClipboard();
});
}).call(this);
}).call(window);

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc