Add aliases for common module locations
This commit is contained in:
parent
fcd7217126
commit
89127aa313
|
@ -1,6 +1,6 @@
|
||||||
import start from '../retrospring/common';
|
import start from 'retrospring/common';
|
||||||
import initAnswerbox from '../retrospring/features/answerbox/index';
|
import initAnswerbox from 'retrospring/features/answerbox/index';
|
||||||
import initInbox from '../retrospring/features/inbox/index';
|
import initInbox from 'retrospring/features/inbox/index';
|
||||||
|
|
||||||
start();
|
start();
|
||||||
document.addEventListener('turbolinks:load', initAnswerbox);
|
document.addEventListener('turbolinks:load', initAnswerbox);
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
import registerEvents from "retrospring/utilities/registerEvents";
|
import registerEvents from 'utilities/registerEvents';
|
||||||
import {createShareEvent} from "./share";
|
import { createShareEvent } from './share';
|
||||||
|
|
||||||
export default (): void => {
|
export default (): void => {
|
||||||
if ('share' in navigator) {
|
if ('share' in navigator) {
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
import noop from 'retrospring/utilities/noop';
|
import noop from 'utilities/noop';
|
||||||
|
|
||||||
export function createShareEvent(answerbox: HTMLElement): () => void {
|
export function createShareEvent(answerbox: HTMLElement): () => void {
|
||||||
return function (): void {
|
return function (): void {
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
import registerEvents from "retrospring/utilities/registerEvents";
|
import registerEvents from 'utilities/registerEvents';
|
||||||
import {reportEventHandler} from "./report";
|
import { reportEventHandler } from './report';
|
||||||
|
|
||||||
export default (): void => {
|
export default (): void => {
|
||||||
const entries: NodeList = document.querySelectorAll('.inbox-entry:not(.js-initialized)');
|
const entries: NodeList = document.querySelectorAll('.inbox-entry:not(.js-initialized)');
|
||||||
|
|
|
@ -1,5 +1,16 @@
|
||||||
|
const path = require('path')
|
||||||
const { environment } = require('@rails/webpacker')
|
const { environment } = require('@rails/webpacker')
|
||||||
const coffee = require('./loaders/coffee')
|
const coffee = require('./loaders/coffee')
|
||||||
|
|
||||||
environment.loaders.prepend('coffee', coffee)
|
environment.loaders.prepend('coffee', coffee)
|
||||||
|
|
||||||
|
environment.config.merge({
|
||||||
|
resolve: {
|
||||||
|
alias: {
|
||||||
|
retrospring: path.resolve(__dirname, '..', '..', 'app/javascript/retrospring'),
|
||||||
|
utilities: path.resolve(__dirname, '..', '..', 'app/javascript/retrospring/utilities')
|
||||||
|
}
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
module.exports = environment
|
module.exports = environment
|
||||||
|
|
|
@ -8,7 +8,9 @@
|
||||||
"moduleResolution": "node",
|
"moduleResolution": "node",
|
||||||
"baseUrl": ".",
|
"baseUrl": ".",
|
||||||
"paths": {
|
"paths": {
|
||||||
"*": ["node_modules/*", "app/javascript/*"]
|
"*": ["node_modules/*", "app/javascript/*"],
|
||||||
|
"retrospring/*": ["app/javascript/retrospring/*"],
|
||||||
|
"utilities/*": ["app/javascript/retrospring/utilities/*"]
|
||||||
},
|
},
|
||||||
"sourceMap": true,
|
"sourceMap": true,
|
||||||
"target": "es5",
|
"target": "es5",
|
||||||
|
|
Loading…
Reference in New Issue