Docs: Add file doc @output annotations.
These annotations make it clear to the reader of a JavaScript source where the build process outputs to. These annotations can later be integrated in a webpack configuration. This way there is one source of truth. The `build` folder is omitted from the paths, because a single JS file shouldn't not be responsible of knowing where outputs in general will end up at. A file only knows its output location relative to the project. Props adamsilverstein, herregroen, omarreiss, pento. Fixes #44361. Built from https://develop.svn.wordpress.org/trunk@43347 git-svn-id: http://core.svn.wordpress.org/trunk@43175 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
@@ -1,3 +1,7 @@
|
||||
/**
|
||||
* @output wp-includes/js/admin-bar.js
|
||||
*/
|
||||
|
||||
/* jshint loopfunc: true */
|
||||
// use jQuery and hoverIntent if loaded
|
||||
if ( typeof(jQuery) != 'undefined' ) {
|
||||
|
||||
@@ -9,6 +9,7 @@
|
||||
* - Allows specifying only an endpoint namespace/path instead of a full URL.
|
||||
*
|
||||
* @since 4.9.0
|
||||
* @output wp-includes/js/api-request.js
|
||||
*/
|
||||
|
||||
( function( $ ) {
|
||||
|
||||
@@ -1,3 +1,7 @@
|
||||
/**
|
||||
* @output wp-includes/js/autosave.js
|
||||
*/
|
||||
|
||||
/* global tinymce, wpCookies, autosaveL10n, switchEditors */
|
||||
// Back-compat
|
||||
window.autosave = function() {
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
* Handles the addition of the comment form.
|
||||
*
|
||||
* @since 2.7.0
|
||||
* @output wp-includes/js/comment-reply.js
|
||||
*
|
||||
* @namespace addComment
|
||||
*
|
||||
|
||||
@@ -1,3 +1,7 @@
|
||||
/**
|
||||
* @output wp-includes/js/customize-base.js
|
||||
*/
|
||||
|
||||
/** @namespace wp */
|
||||
window.wp = window.wp || {};
|
||||
|
||||
|
||||
@@ -1,4 +1,9 @@
|
||||
/**
|
||||
* @output wp-includes/js/customize-loader.js
|
||||
*/
|
||||
|
||||
/* global _wpCustomizeLoaderSettings */
|
||||
|
||||
/**
|
||||
* Expose a public API that allows the customizer to be
|
||||
* loaded on any page.
|
||||
|
||||
@@ -1,3 +1,7 @@
|
||||
/**
|
||||
* @output wp-includes/js/customize-models.js
|
||||
*/
|
||||
|
||||
/* global _wpCustomizeHeader */
|
||||
(function( $, wp ) {
|
||||
var api = wp.customize;
|
||||
|
||||
@@ -1,3 +1,7 @@
|
||||
/**
|
||||
* @output wp-includes/js/customize-preview-nav-menus.js
|
||||
*/
|
||||
|
||||
/* global _wpCustomizePreviewNavMenusExports */
|
||||
|
||||
/** @namespace wp.customize.navMenusPreview */
|
||||
|
||||
@@ -1,3 +1,7 @@
|
||||
/**
|
||||
* @output wp-includes/js/customize-preview-widgets.js
|
||||
*/
|
||||
|
||||
/* global _wpWidgetCustomizerPreviewSettings */
|
||||
|
||||
/**
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
/*
|
||||
* Script run inside a Customizer preview frame.
|
||||
*
|
||||
* @output wp-includes/js/customize-preview.js
|
||||
*/
|
||||
(function( exports, $ ){
|
||||
var api = wp.customize,
|
||||
|
||||
@@ -1,3 +1,7 @@
|
||||
/**
|
||||
* @output wp-includes/js/customize-selective-refresh.js
|
||||
*/
|
||||
|
||||
/* global jQuery, JSON, _customizePartialRefreshExports, console */
|
||||
|
||||
/** @namespace wp.customize.selectiveRefresh */
|
||||
|
||||
@@ -1,3 +1,7 @@
|
||||
/**
|
||||
* @output wp-includes/js/customize-views.js
|
||||
*/
|
||||
|
||||
(function( $, wp, _ ) {
|
||||
|
||||
if ( ! wp || ! wp.customize ) { return; }
|
||||
|
||||
@@ -24,6 +24,7 @@
|
||||
* - heartbeat-nonces-expired
|
||||
*
|
||||
* @since 3.6.0
|
||||
* @output wp-includes/js/heartbeat.js
|
||||
*/
|
||||
|
||||
( function( $, window, undefined ) {
|
||||
|
||||
@@ -1,3 +1,7 @@
|
||||
/**
|
||||
* @output wp-includes/js/mce-view.js
|
||||
*/
|
||||
|
||||
/* global tinymce */
|
||||
|
||||
/*
|
||||
|
||||
@@ -74,6 +74,10 @@ module.exports = __webpack_require__(1);
|
||||
/* 1 */
|
||||
/***/ (function(module, exports, __webpack_require__) {
|
||||
|
||||
/**
|
||||
* @output wp-includes/js/media-audiovideo.js
|
||||
*/
|
||||
|
||||
var media = wp.media,
|
||||
baseSettings = window._wpmejsSettings || {},
|
||||
l10n = window._wpMediaViewsL10n || {};
|
||||
|
||||
@@ -1,3 +1,7 @@
|
||||
/**
|
||||
* @output wp-includes/js/media-editor.js
|
||||
*/
|
||||
|
||||
/* global getUserSetting, tinymce, QTags */
|
||||
|
||||
// WordPress, TinyMCE, and Media
|
||||
|
||||
@@ -85,6 +85,10 @@ module.exports = __webpack_require__(12);
|
||||
/* 12 */
|
||||
/***/ (function(module, exports, __webpack_require__) {
|
||||
|
||||
/**
|
||||
* @output wp-includes/js/media-grid.js
|
||||
*/
|
||||
|
||||
var media = wp.media;
|
||||
|
||||
media.controller.EditAttachmentMetadata = __webpack_require__( 13 );
|
||||
|
||||
@@ -76,6 +76,10 @@ module.exports = __webpack_require__(23);
|
||||
/***/ 23:
|
||||
/***/ (function(module, exports, __webpack_require__) {
|
||||
|
||||
/**
|
||||
* @output wp-includes/js/media-models.js
|
||||
*/
|
||||
|
||||
var $ = jQuery,
|
||||
Attachment, Attachments, l10n, media;
|
||||
|
||||
|
||||
@@ -74,6 +74,10 @@ module.exports = __webpack_require__(30);
|
||||
/* 30 */
|
||||
/***/ (function(module, exports, __webpack_require__) {
|
||||
|
||||
/**
|
||||
* @output wp-includes/js/media-views.js
|
||||
*/
|
||||
|
||||
var media = wp.media,
|
||||
$ = jQuery,
|
||||
l10n;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/* global adminpage, wpActiveEditor, quicktagsL10n, wpLink, prompt */
|
||||
|
||||
/*
|
||||
* Quicktags
|
||||
*
|
||||
@@ -16,12 +16,16 @@
|
||||
*
|
||||
* quicktags_id string The ID of the textarea that will be the editor canvas
|
||||
* buttons string Comma separated list of the default buttons names that will be shown in that instance.
|
||||
*
|
||||
* @output wp-includes/js/quicktags.js
|
||||
*/
|
||||
|
||||
// new edit toolbar used with permission
|
||||
// by Alex King
|
||||
// http://www.alexking.org/
|
||||
|
||||
/* global adminpage, wpActiveEditor, quicktagsL10n, wpLink, prompt */
|
||||
|
||||
var QTags, edCanvas,
|
||||
edButtons = [];
|
||||
|
||||
|
||||
@@ -1,4 +1,8 @@
|
||||
// Utility functions for parsing and handling shortcodes in JavaScript.
|
||||
/**
|
||||
* Utility functions for parsing and handling shortcodes in JavaScript.
|
||||
*
|
||||
* @output wp-includes/js/shortcode.js
|
||||
*/
|
||||
|
||||
/**
|
||||
* Ensure the global `wp` object exists.
|
||||
|
||||
@@ -1,6 +1,11 @@
|
||||
/**
|
||||
* Cookie functions.
|
||||
*
|
||||
* @output wp-includes/js/utils.js
|
||||
*/
|
||||
|
||||
/* global userSettings */
|
||||
/* exported getUserSetting, setUserSetting, deleteUserSetting */
|
||||
// utility functions
|
||||
|
||||
var wpCookies = {
|
||||
// The following functions are from Cookie.js class in TinyMCE 3, Moxiecode, used under LGPL.
|
||||
@@ -195,4 +200,3 @@ function getAllUserSettings() {
|
||||
|
||||
return wpCookies.getHash( 'wp-settings-' + userSettings.uid ) || {};
|
||||
}
|
||||
|
||||
|
||||
@@ -1,3 +1,7 @@
|
||||
/**
|
||||
* @output wp-includes/js/wp-a11y.js
|
||||
*/
|
||||
|
||||
/** @namespace wp */
|
||||
window.wp = window.wp || {};
|
||||
|
||||
|
||||
@@ -1,3 +1,7 @@
|
||||
/**
|
||||
* @output wp-includes/js/wp-ajax-response.js
|
||||
*/
|
||||
|
||||
var wpAjax = jQuery.extend( {
|
||||
unserialize: function( s ) {
|
||||
var r = {}, q, pp, i, p;
|
||||
|
||||
@@ -1,3 +1,7 @@
|
||||
/**
|
||||
* @output wp-includes/js/wp-api.js
|
||||
*/
|
||||
|
||||
(function( window, undefined ) {
|
||||
|
||||
'use strict';
|
||||
|
||||
@@ -1,5 +1,10 @@
|
||||
/**
|
||||
* Interim login dialog.
|
||||
*
|
||||
* @output wp-includes/js/wp-auth-check.js
|
||||
*/
|
||||
|
||||
/* global adminpage */
|
||||
// Interim login dialog
|
||||
(function($){
|
||||
var wrap, next;
|
||||
|
||||
|
||||
@@ -1,3 +1,7 @@
|
||||
/**
|
||||
* @output wp-includes/js/wp-backbone.js
|
||||
*/
|
||||
|
||||
/** @namespace wp */
|
||||
window.wp = window.wp || {};
|
||||
|
||||
|
||||
@@ -1,3 +1,7 @@
|
||||
/**
|
||||
* @output wp-includes/js/wp-custom-header.js
|
||||
*/
|
||||
|
||||
/* global YT */
|
||||
(function( window, settings ) {
|
||||
|
||||
|
||||
@@ -1,3 +1,6 @@
|
||||
/**
|
||||
* @output wp-includes/js/wp-embed-template.js
|
||||
*/
|
||||
(function ( window, document ) {
|
||||
'use strict';
|
||||
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
* WordPress inline HTML embed
|
||||
*
|
||||
* @since 4.4.0
|
||||
* @output wp-includes/js/wp-embed.js
|
||||
*
|
||||
* This file cannot have ampersands in it. This is to ensure
|
||||
* it can be embedded in older versions of WordPress.
|
||||
|
||||
@@ -1,3 +1,7 @@
|
||||
/**
|
||||
* @output wp-includes/js/wp-emoji-loader.js
|
||||
*/
|
||||
|
||||
( function( window, document, settings ) {
|
||||
var src, ready, ii, tests;
|
||||
|
||||
|
||||
@@ -1,3 +1,6 @@
|
||||
/**
|
||||
* @output wp-includes/js/wp-emoji.js
|
||||
*/
|
||||
|
||||
( function( window, settings ) {
|
||||
function wpEmoji() {
|
||||
|
||||
@@ -1,3 +1,7 @@
|
||||
/**
|
||||
* @output wp-includes/js/wp-list-revisions.js
|
||||
*/
|
||||
|
||||
(function(w) {
|
||||
var init = function() {
|
||||
var pr = document.getElementById('post-revisions'),
|
||||
|
||||
@@ -1,3 +1,7 @@
|
||||
/**
|
||||
* @output wp-includes/js/wp-lists.js
|
||||
*/
|
||||
|
||||
/* global ajaxurl, wpAjax */
|
||||
|
||||
/**
|
||||
|
||||
@@ -1,3 +1,7 @@
|
||||
/**
|
||||
* @output wp-includes/js/wp-pointer.js
|
||||
*/
|
||||
|
||||
/* global wpPointerL10n */
|
||||
|
||||
/**
|
||||
|
||||
@@ -1,3 +1,7 @@
|
||||
/**
|
||||
* @output wp-includes/js/wp-sanitize.js
|
||||
*/
|
||||
|
||||
( function () {
|
||||
|
||||
window.wp = window.wp || {};
|
||||
|
||||
@@ -1,3 +1,7 @@
|
||||
/**
|
||||
* @output wp-includes/js/wp-util.js
|
||||
*/
|
||||
|
||||
/* global _wpUtilSettings */
|
||||
|
||||
/** @namespace wp */
|
||||
|
||||
@@ -1,3 +1,7 @@
|
||||
/**
|
||||
* @output wp-includes/js/wpdialog.js
|
||||
*/
|
||||
|
||||
/*
|
||||
* Wrap the jQuery UI Dialog open function remove focus from tinyMCE.
|
||||
*/
|
||||
|
||||
@@ -1,3 +1,7 @@
|
||||
/**
|
||||
* @output wp-includes/js/wplink.js
|
||||
*/
|
||||
|
||||
var wpLink;
|
||||
|
||||
( function( $, wpLinkL10n, wp ) {
|
||||
|
||||
@@ -1,4 +1,9 @@
|
||||
/**
|
||||
* @output wp-includes/js/zxcvbn-async.js
|
||||
*/
|
||||
|
||||
/* global _zxcvbnSettings */
|
||||
|
||||
/**
|
||||
* Loads zxcvbn asynchronously by inserting an async script tag before the first
|
||||
* script tag on the page.
|
||||
|
||||
Reference in New Issue
Block a user