diff --git a/gulpfile.js b/gulpfile.js index 7f2a181..36f022a 100644 --- a/gulpfile.js +++ b/gulpfile.js @@ -10,11 +10,11 @@ const FOLDER_BUILD = './build' function injectMetadata() { return src( [ - FOLDER_BUILD + '/' + PACKAGE.name + '/front/events-loader.js', - FOLDER_BUILD + '/' + PACKAGE.name + '/front/block-events-loader.js', - FOLDER_BUILD + '/' + PACKAGE.name + '/' + PACKAGE.name + '.php', - FOLDER_BUILD + '/' + PACKAGE.name + '/includes/constants.php', - FOLDER_BUILD + '/' + PACKAGE.name + '/readme.txt', + FOLDER_BUILD + '/front/block-events-loader.js', + FOLDER_BUILD + '/front/events-loader.js', + FOLDER_BUILD + '/' + PACKAGE.name + '.php', + FOLDER_BUILD + '/includes/constants.php', + FOLDER_BUILD + '/readme.txt', ], { base: './' } ) diff --git a/source/connector-mobilizon/changelog.txt b/source/changelog.txt similarity index 100% rename from source/connector-mobilizon/changelog.txt rename to source/changelog.txt diff --git a/source/connector-mobilizon/connector-mobilizon.php b/source/connector-mobilizon.php similarity index 100% rename from source/connector-mobilizon/connector-mobilizon.php rename to source/connector-mobilizon.php diff --git a/source/connector-mobilizon/front/block-events-loader.js b/source/front/block-events-loader.js similarity index 100% rename from source/connector-mobilizon/front/block-events-loader.js rename to source/front/block-events-loader.js diff --git a/source/connector-mobilizon/front/blocks/events-list/edit.js b/source/front/blocks/events-list/edit.js similarity index 100% rename from source/connector-mobilizon/front/blocks/events-list/edit.js rename to source/front/blocks/events-list/edit.js diff --git a/source/connector-mobilizon/front/blocks/events-list/index.js b/source/front/blocks/events-list/index.js similarity index 68% rename from source/connector-mobilizon/front/blocks/events-list/index.js rename to source/front/blocks/events-list/index.js index e5f634a..ab483c6 100644 --- a/source/connector-mobilizon/front/blocks/events-list/index.js +++ b/source/front/blocks/events-list/index.js @@ -8,20 +8,23 @@ const NAME = '' registerBlockType(NAME + '/events-list', { title: __('Events List', ''), - description: __('A list of the upcoming events of the connected Mobilizon instance.', ''), + description: __( + 'A list of the upcoming events of the connected Mobilizon instance.', + '' + ), icon: 'list-view', category: 'widgets', attributes: { eventsCount: { type: 'number', - default: 3 + default: 3, }, groupName: { - type: 'string' - } + type: 'string', + }, }, supports: { - html: false + html: false, }, edit, save, diff --git a/source/connector-mobilizon/front/blocks/events-list/save.js b/source/front/blocks/events-list/save.js similarity index 100% rename from source/connector-mobilizon/front/blocks/events-list/save.js rename to source/front/blocks/events-list/save.js diff --git a/source/connector-mobilizon/front/date-time-wrapper-test.js b/source/front/date-time-wrapper-test.js similarity index 100% rename from source/connector-mobilizon/front/date-time-wrapper-test.js rename to source/front/date-time-wrapper-test.js diff --git a/source/connector-mobilizon/front/date-time-wrapper.js b/source/front/date-time-wrapper.js similarity index 100% rename from source/connector-mobilizon/front/date-time-wrapper.js rename to source/front/date-time-wrapper.js diff --git a/source/connector-mobilizon/front/events-displayer-test.js b/source/front/events-displayer-test.js similarity index 100% rename from source/connector-mobilizon/front/events-displayer-test.js rename to source/front/events-displayer-test.js diff --git a/source/connector-mobilizon/front/events-displayer.js b/source/front/events-displayer.js similarity index 100% rename from source/connector-mobilizon/front/events-displayer.js rename to source/front/events-displayer.js diff --git a/source/connector-mobilizon/front/events-loader.js b/source/front/events-loader.js similarity index 100% rename from source/connector-mobilizon/front/events-loader.js rename to source/front/events-loader.js diff --git a/source/connector-mobilizon/front/formatter-test.js b/source/front/formatter-test.js similarity index 100% rename from source/connector-mobilizon/front/formatter-test.js rename to source/front/formatter-test.js diff --git a/source/connector-mobilizon/front/formatter.js b/source/front/formatter.js similarity index 100% rename from source/connector-mobilizon/front/formatter.js rename to source/front/formatter.js diff --git a/source/connector-mobilizon/front/graphql-wrapper.js b/source/front/graphql-wrapper.js similarity index 100% rename from source/connector-mobilizon/front/graphql-wrapper.js rename to source/front/graphql-wrapper.js diff --git a/source/connector-mobilizon/front/html-creator-test.js b/source/front/html-creator-test.js similarity index 100% rename from source/connector-mobilizon/front/html-creator-test.js rename to source/front/html-creator-test.js diff --git a/source/connector-mobilizon/front/html-creator.js b/source/front/html-creator.js similarity index 100% rename from source/connector-mobilizon/front/html-creator.js rename to source/front/html-creator.js diff --git a/source/connector-mobilizon/front/object-hash-wrapper-test.js b/source/front/object-hash-wrapper-test.js similarity index 100% rename from source/connector-mobilizon/front/object-hash-wrapper-test.js rename to source/front/object-hash-wrapper-test.js diff --git a/source/connector-mobilizon/front/object-hash-wrapper.js b/source/front/object-hash-wrapper.js similarity index 100% rename from source/connector-mobilizon/front/object-hash-wrapper.js rename to source/front/object-hash-wrapper.js diff --git a/source/connector-mobilizon/front/session-cache-test.js b/source/front/session-cache-test.js similarity index 100% rename from source/connector-mobilizon/front/session-cache-test.js rename to source/front/session-cache-test.js diff --git a/source/connector-mobilizon/front/session-cache.js b/source/front/session-cache.js similarity index 100% rename from source/connector-mobilizon/front/session-cache.js rename to source/front/session-cache.js diff --git a/source/connector-mobilizon/includes/constants.php b/source/includes/constants.php similarity index 100% rename from source/connector-mobilizon/includes/constants.php rename to source/includes/constants.php diff --git a/source/connector-mobilizon/includes/events-list-shortcut.php b/source/includes/events-list-shortcut.php similarity index 100% rename from source/connector-mobilizon/includes/events-list-shortcut.php rename to source/includes/events-list-shortcut.php diff --git a/source/connector-mobilizon/includes/events-list-widget.php b/source/includes/events-list-widget.php similarity index 100% rename from source/connector-mobilizon/includes/events-list-widget.php rename to source/includes/events-list-widget.php diff --git a/source/connector-mobilizon/includes/settings.php b/source/includes/settings.php similarity index 100% rename from source/connector-mobilizon/includes/settings.php rename to source/includes/settings.php diff --git a/source/connector-mobilizon/readme.txt b/source/readme.txt similarity index 100% rename from source/connector-mobilizon/readme.txt rename to source/readme.txt diff --git a/source/connector-mobilizon/uninstall.php b/source/uninstall.php similarity index 100% rename from source/connector-mobilizon/uninstall.php rename to source/uninstall.php diff --git a/source/connector-mobilizon/view/events-list-widget/form.php b/source/view/events-list-widget/form.php similarity index 100% rename from source/connector-mobilizon/view/events-list-widget/form.php rename to source/view/events-list-widget/form.php diff --git a/source/connector-mobilizon/view/events-list.php b/source/view/events-list.php similarity index 100% rename from source/connector-mobilizon/view/events-list.php rename to source/view/events-list.php diff --git a/source/connector-mobilizon/view/settings/is-short-offset-name-shown-field.php b/source/view/settings/is-short-offset-name-shown-field.php similarity index 100% rename from source/connector-mobilizon/view/settings/is-short-offset-name-shown-field.php rename to source/view/settings/is-short-offset-name-shown-field.php diff --git a/source/connector-mobilizon/view/settings/page.php b/source/view/settings/page.php similarity index 100% rename from source/connector-mobilizon/view/settings/page.php rename to source/view/settings/page.php diff --git a/source/connector-mobilizon/view/settings/url-field.php b/source/view/settings/url-field.php similarity index 100% rename from source/connector-mobilizon/view/settings/url-field.php rename to source/view/settings/url-field.php diff --git a/webpack.config.js b/webpack.config.js index 4331769..34ba134 100644 --- a/webpack.config.js +++ b/webpack.config.js @@ -3,20 +3,16 @@ const path = require('path') const CopyPlugin = require('copy-webpack-plugin') -const PACKAGE = require('./package.json') - const FOLDER_SOURCE = './source' module.exports = { entry: { - 'block-events-loader': - FOLDER_SOURCE + '/' + PACKAGE.name + '/front/block-events-loader.js', - 'events-loader': - FOLDER_SOURCE + '/' + PACKAGE.name + '/front/events-loader.js', + 'block-events-loader': FOLDER_SOURCE + '/front/block-events-loader.js', + 'events-loader': FOLDER_SOURCE + '/front/events-loader.js', }, output: { filename: '[name].js', - path: path.resolve(__dirname, 'build/' + PACKAGE.name + '/front'), + path: path.resolve(__dirname, 'build/front'), }, module: { rules: [ @@ -33,12 +29,12 @@ module.exports = { new CopyPlugin({ patterns: [ { - context: FOLDER_SOURCE + '/' + PACKAGE.name, + context: FOLDER_SOURCE, from: '**/*.php', to: '../', }, { - context: FOLDER_SOURCE + '/' + PACKAGE.name, + context: FOLDER_SOURCE, from: '**/*.txt', to: '../', },