Replace to shakapacker from webpacker
This commit is contained in:
parent
0aacf00f5b
commit
64ee565b33
80 changed files with 1737 additions and 3956 deletions
|
@ -1,11 +1,11 @@
|
|||
import './public-path';
|
||||
import loadPolyfills from '../mastodon/load_polyfills';
|
||||
import { start } from '../mastodon/common';
|
||||
import 'mastodon/public-path';
|
||||
import loadPolyfills from 'mastodon/load_polyfills';
|
||||
import { start } from 'mastodon/common';
|
||||
|
||||
start();
|
||||
|
||||
function loaded() {
|
||||
const TimelineContainer = require('../mastodon/containers/timeline_container').default;
|
||||
const TimelineContainer = require('mastodon/containers/timeline_container').default;
|
||||
const React = require('react');
|
||||
const ReactDOM = require('react-dom');
|
||||
const mountNode = document.getElementById('mastodon-timeline');
|
||||
|
@ -17,7 +17,7 @@ function loaded() {
|
|||
}
|
||||
|
||||
function main() {
|
||||
const ready = require('../mastodon/ready').default;
|
||||
const ready = require('mastodon/ready').default;
|
||||
ready(loaded);
|
||||
}
|
||||
|
|
@ -1,6 +1,6 @@
|
|||
import './public-path';
|
||||
import 'mastodon/public-path';
|
||||
import { delegate } from '@rails/ujs';
|
||||
import ready from '../mastodon/ready';
|
||||
import ready from 'mastodon/ready';
|
||||
|
||||
const batchCheckboxClassName = '.batch-checkbox input[type="checkbox"]';
|
||||
|
||||
|
@ -170,8 +170,8 @@ ready(() => {
|
|||
const componentName = element.getAttribute('data-admin-component');
|
||||
const { locale, ...componentProps } = JSON.parse(element.getAttribute('data-props'));
|
||||
|
||||
import('../mastodon/containers/admin_component').then(({ default: AdminComponent }) => {
|
||||
return import('../mastodon/components/admin/' + componentName).then(({ default: Component }) => {
|
||||
import('mastodon/containers/admin_component').then(({ default: AdminComponent }) => {
|
||||
return import('mastodon/components/admin/' + componentName).then(({ default: Component }) => {
|
||||
ReactDOM.render((
|
||||
<AdminComponent locale={locale}>
|
||||
<Component {...componentProps} />
|
11
app/javascript/application.js
Normal file
11
app/javascript/application.js
Normal file
|
@ -0,0 +1,11 @@
|
|||
import 'mastodon/public-path';
|
||||
import loadPolyfills from 'mastodon/load_polyfills';
|
||||
import { start } from 'mastodon/common';
|
||||
|
||||
start();
|
||||
|
||||
loadPolyfills().then(() => {
|
||||
require('mastodon/main').default();
|
||||
}).catch(e => {
|
||||
console.error(e);
|
||||
});
|
|
@ -1,5 +1,5 @@
|
|||
import './public-path';
|
||||
import ready from '../mastodon/ready';
|
||||
import 'mastodon/public-path';
|
||||
import ready from 'mastodon/ready';
|
||||
|
||||
ready(() => {
|
||||
const image = document.querySelector('img');
|
3
app/javascript/mailer.js
Normal file
3
app/javascript/mailer.js
Normal file
|
@ -0,0 +1,3 @@
|
|||
require('./styles/mailer.scss');
|
||||
|
||||
require.context('./icons');
|
|
@ -1,4 +1,4 @@
|
|||
import Rails from '@rails/ujs';
|
||||
import * as Rails from '@rails/ujs';
|
||||
|
||||
export function start() {
|
||||
require('font-awesome/css/font-awesome.css');
|
||||
|
|
|
@ -39,6 +39,7 @@ function main() {
|
|||
console.error(err);
|
||||
});
|
||||
}
|
||||
|
||||
perf.stop('main()');
|
||||
});
|
||||
}
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
import IntlMessageFormat from 'intl-messageformat';
|
||||
import locales from './web_push_locales';
|
||||
import { unescape } from 'lodash';
|
||||
import locales from './web_push_locales';
|
||||
|
||||
const MAX_NOTIFICATIONS = 5;
|
||||
const GROUP_TAG = 'tag';
|
||||
|
|
|
@ -1,11 +0,0 @@
|
|||
import './public-path';
|
||||
import loadPolyfills from '../mastodon/load_polyfills';
|
||||
import { start } from '../mastodon/common';
|
||||
|
||||
start();
|
||||
|
||||
loadPolyfills().then(() => {
|
||||
require('../mastodon/main').default();
|
||||
}).catch(e => {
|
||||
console.error(e);
|
||||
});
|
|
@ -1,3 +0,0 @@
|
|||
require('../styles/mailer.scss');
|
||||
|
||||
require.context('../icons');
|
|
@ -1,10 +1,10 @@
|
|||
import './public-path';
|
||||
import escapeTextContentForBrowser from 'escape-html';
|
||||
import loadPolyfills from '../mastodon/load_polyfills';
|
||||
import ready from '../mastodon/ready';
|
||||
import { start } from '../mastodon/common';
|
||||
import loadKeyboardExtensions from '../mastodon/load_keyboard_extensions';
|
||||
import 'mastodon/public-path';
|
||||
import 'cocoon-js-vanilla';
|
||||
import escapeTextContentForBrowser from 'escape-html';
|
||||
import loadPolyfills from 'mastodon/load_polyfills';
|
||||
import ready from 'mastodon/ready';
|
||||
import { start } from 'mastodon/common';
|
||||
import loadKeyboardExtensions from 'mastodon/load_keyboard_extensions';
|
||||
|
||||
start();
|
||||
|
||||
|
@ -26,10 +26,10 @@ window.addEventListener('message', e => {
|
|||
|
||||
function main() {
|
||||
const IntlMessageFormat = require('intl-messageformat').default;
|
||||
const { timeAgoString } = require('../mastodon/components/relative_timestamp');
|
||||
const { timeAgoString } = require('mastodon/components/relative_timestamp');
|
||||
const { delegate } = require('@rails/ujs');
|
||||
const emojify = require('../mastodon/features/emoji/emoji').default;
|
||||
const { getLocale } = require('../mastodon/locales');
|
||||
const emojify = require('mastodon/features/emoji/emoji').default;
|
||||
const { getLocale } = require('mastodon/locales');
|
||||
const { messages } = getLocale();
|
||||
const React = require('react');
|
||||
const ReactDOM = require('react-dom');
|
||||
|
@ -90,7 +90,7 @@ function main() {
|
|||
const reactComponents = document.querySelectorAll('[data-component]');
|
||||
|
||||
if (reactComponents.length > 0) {
|
||||
import(/* webpackChunkName: "containers/media_container" */ '../mastodon/containers/media_container')
|
||||
import(/* webpackChunkName: "containers/media_container" */ 'mastodon/containers/media_container')
|
||||
.then(({ default: MediaContainer }) => {
|
||||
[].forEach.call(reactComponents, (component) => {
|
||||
[].forEach.call(component.children, (child) => {
|
|
@ -1,11 +1,11 @@
|
|||
import './public-path';
|
||||
import loadPolyfills from '../mastodon/load_polyfills';
|
||||
import { start } from '../mastodon/common';
|
||||
import 'mastodon/public-path';
|
||||
import loadPolyfills from 'mastodon/load_polyfills';
|
||||
import { start } from 'mastodon/common';
|
||||
|
||||
start();
|
||||
|
||||
function loaded() {
|
||||
const ComposeContainer = require('../mastodon/containers/compose_container').default;
|
||||
const ComposeContainer = require('mastodon/containers/compose_container').default;
|
||||
const React = require('react');
|
||||
const ReactDOM = require('react-dom');
|
||||
const mountNode = document.getElementById('mastodon-compose');
|
||||
|
@ -17,7 +17,7 @@ function loaded() {
|
|||
}
|
||||
|
||||
function main() {
|
||||
const ready = require('../mastodon/ready').default;
|
||||
const ready = require('mastodon/ready').default;
|
||||
ready(loaded);
|
||||
}
|
||||
|
|
@ -164,7 +164,7 @@ $small-breakpoint: 960px;
|
|||
td {
|
||||
padding: 8px;
|
||||
align-self: start;
|
||||
align-items: start;
|
||||
align-items: flex-start;
|
||||
word-break: break-all;
|
||||
|
||||
&.nowrap {
|
||||
|
|
|
@ -1758,7 +1758,7 @@ a.account__display-name {
|
|||
width: 100%;
|
||||
height: 100%;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
align-items: flex-center;
|
||||
justify-content: center;
|
||||
flex-direction: column;
|
||||
scrollbar-width: none; /* Firefox */
|
||||
|
@ -2619,7 +2619,7 @@ a.account__display-name {
|
|||
|
||||
.column-actions {
|
||||
display: flex;
|
||||
align-items: start;
|
||||
align-items: flex-start;
|
||||
justify-content: center;
|
||||
padding: 40px;
|
||||
padding-top: 40px;
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
import axios from 'axios';
|
||||
import * as WebAuthnJSON from '@github/webauthn-json';
|
||||
import ready from '../mastodon/ready';
|
||||
import 'regenerator-runtime/runtime';
|
||||
import * as WebAuthnJSON from '@github/webauthn-json';
|
||||
import axios from 'axios';
|
||||
import ready from 'mastodon/ready';
|
||||
|
||||
function getCSRFToken() {
|
||||
var CSRFSelector = document.querySelector('meta[name="csrf-token"]');
|
Loading…
Add table
Add a link
Reference in a new issue