Skip to content

Commit

Permalink
Revert "[#49] Refactor js extension to jsx"
Browse files Browse the repository at this point in the history
This reverts commit b6d949c.
  • Loading branch information
palagdan committed Aug 29, 2024
1 parent b6d949c commit 631f71e
Show file tree
Hide file tree
Showing 37 changed files with 73 additions and 75 deletions.
5 changes: 1 addition & 4 deletions build-utils/webpack.common.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,15 +14,12 @@ const config = {
module: {
rules: [
{
test: /\.(js|jsx)$/,
test: /\.(js)$/,
exclude: /node_modules/,
use: ["babel-loader"],
},
],
},
resolve: {
extensions: [".js", ".jsx"],
},
optimization: {
splitChunks: {
cacheGroups: {
Expand Down
2 changes: 1 addition & 1 deletion build-utils/webpack.dev.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ const port = process.env.PORT || 3000;
const config = {
mode: "development",
entry: {
app: `${commonPaths.appEntry}/index.jsx`,
app: `${commonPaths.appEntry}/index.js`,
},
output: {
filename: "[name].[hash].js",
Expand Down
2 changes: 1 addition & 1 deletion build-utils/webpack.prod.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ const MiniCssExtractPlugin = require("mini-css-extract-plugin");
const config = {
mode: "production",
entry: {
app: [`${commonPaths.appEntry}/index.jsx`],
app: [`${commonPaths.appEntry}/index.js`],
},
output: {
filename: "static/[name].[hash].js",
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "react-starter-boilerplate-hmr",
"version": "1.0.0",
"description": "SPipes editor UI",
"main": "index.jsx",
"main": "index.js",
"author": "Petr Jordan",
"license": "MIT",
"scripts": {
Expand Down
14 changes: 7 additions & 7 deletions src/components/App.jsx → src/components/App.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,22 +2,22 @@ import React, { Component } from "react";
import { Switch, BrowserRouter as Router, Route } from "react-router-dom";
import importedComponent from "react-imported-component";

import Home from "./Home.jsx";
import Loading from "./Loading.jsx";
import Home from "./Home";
import Loading from "./Loading";

const Scripts = importedComponent(() => import(/* webpackChunkName:'Scripts' */ "./Scripts.jsx"), {
const Scripts = importedComponent(() => import(/* webpackChunkName:'Scripts' */ "./Scripts"), {
LoadingComponent: Loading,
});
const Executions = importedComponent(() => import(/* webpackChunkName:'Executions' */ "./Executions.jsx"), {
const Executions = importedComponent(() => import(/* webpackChunkName:'Executions' */ "./Executions"), {
LoadingComponent: Loading,
});
const AsyncDynamicPAge = importedComponent(() => import(/* webpackChunkName:'DynamicPage' */ "./DynamicPage.jsx"), {
const AsyncDynamicPAge = importedComponent(() => import(/* webpackChunkName:'DynamicPage' */ "./DynamicPage"), {
LoadingComponent: Loading,
});
const AsyncDagre = importedComponent(() => import(/* webpackChunkName:'Dagre' */ "./dagre/Dagre.jsx"), {
const AsyncDagre = importedComponent(() => import(/* webpackChunkName:'Dagre' */ "./dagre/Dagre.js"), {
LoadingComponent: Loading,
});
const AsyncNoMatch = importedComponent(() => import(/* webpackChunkName:'NoMatch' */ "./NoMatch.jsx"), {
const AsyncNoMatch = importedComponent(() => import(/* webpackChunkName:'NoMatch' */ "./NoMatch"), {
LoadingComponent: Loading,
});

Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import React from "react";
import { Header } from "semantic-ui-react";

import Layout from "./Layout.jsx";
import Layout from "./Layout";

const DynamicPage = () => {
return (
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import React, { Fragment } from "react";

import Layout from "./Layout.jsx";
import Layout from "./Layout";
import {
ABSOLUTE_PATH,
DISPLAY_NAME,
Expand All @@ -9,7 +9,7 @@ import {
Rest,
START_DATE_UNIX,
TRANSFORMATION,
} from "./rest/Rest.jsx";
} from "./rest/Rest";
import { Col, Container, Row, Table } from "react-bootstrap";
import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";
import { faMugHot, faTrash, faRunning, faPlayCircle, faEdit, faQuestion } from "@fortawesome/free-solid-svg-icons";
Expand Down
File renamed without changes.
4 changes: 2 additions & 2 deletions src/components/Home.jsx → src/components/Home.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import React from "react";
import { Grid } from "semantic-ui-react";

import Layout from "./Layout.jsx";
import ScriptsTree from "./treebeard/ScriptsTree.jsx";
import Layout from "./Layout";
import ScriptsTree from "./treebeard/ScriptsTree";
import { Link } from "react-router-dom";

class Home extends React.Component {
Expand Down
2 changes: 1 addition & 1 deletion src/components/Layout.jsx → src/components/Layout.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import React from "react";
import { Container, Icon } from "semantic-ui-react";

import { Nav, Navbar } from "react-bootstrap";
import NavbarMenu from "./NavbarMenu.jsx";
import NavbarMenu from "./NavbarMenu";

const Layout = ({ children }) => {
return (
Expand Down
4 changes: 2 additions & 2 deletions src/components/Loading.jsx → src/components/Loading.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import React from "react";
import Spinner from "./spinner/Spinner.jsx";
import { DelayRender } from "./DelayRender.jsx";
import Spinner from "./spinner/Spinner";
import { DelayRender } from "./DelayRender";

const Loading = DelayRender(Spinner, 0);

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import React from "react";
import { Dropdown } from "semantic-ui-react";
import { Rest } from "./rest/Rest.jsx";
import { ICONS_MAP } from "./dagre/DagreIcons.jsx";
import { Rest } from "./rest/Rest";
import { ICONS_MAP } from "./dagre/DagreIcons";

class ModuleTypesSelection extends React.Component {
constructor(props) {
Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion src/components/NoMatch.jsx → src/components/NoMatch.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import React from "react";
import { Icon } from "semantic-ui-react";

import Layout from "./Layout.jsx";
import Layout from "./Layout";

const NoMatch = () => {
return (
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import React from "react";
import { Dropdown } from "semantic-ui-react";
import { FUNCTION, FUNCTION_NAME, Rest } from "./rest/Rest.jsx";
import { ICONS_MAP } from "./dagre/DagreIcons.jsx";
import { FUNCTION, FUNCTION_NAME, Rest } from "./rest/Rest";
import { ICONS_MAP } from "./dagre/DagreIcons";

class ScriptFunctionSelection extends React.Component {
constructor(props) {
Expand Down
4 changes: 2 additions & 2 deletions src/components/Scripts.jsx → src/components/Scripts.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import React from "react";
import { Grid } from "semantic-ui-react";

import Layout from "./Layout.jsx";
import ScriptsTree from "./treebeard/ScriptsTree.jsx";
import Layout from "./Layout";
import ScriptsTree from "./treebeard/ScriptsTree";
import { Link } from "react-router-dom";

class Scripts extends React.Component {
Expand Down
28 changes: 14 additions & 14 deletions src/components/dagre/Dagre.jsx → src/components/dagre/Dagre.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,25 +13,25 @@ import {
MODULE_VARIABLES,
Rest,
SCRIPT_PATH,
} from "../rest/Rest.jsx";
import NavbarMenu from "../NavbarMenu.jsx";
import SFormsModal from "../sform/SFormsModal.jsx";
import ModuleTypesSelection from "../ModuleTypesSelection.jsx";
import ScriptInputOutputModal from "../sform/ScriptInputOutputModal.jsx";
} from "../rest/Rest";
import NavbarMenu from "../NavbarMenu";
import SFormsModal from "../sform/SFormsModal";
import ModuleTypesSelection from "../ModuleTypesSelection";
import ScriptInputOutputModal from "../sform/ScriptInputOutputModal";
import { Dropdown } from "semantic-ui-react";
import { ICONS_MAP } from "./DagreIcons.jsx";
import ScriptFunctionSelection from "../ScriptFunctionSelection.jsx";
import { ICONS_MAP } from "./DagreIcons";
import ScriptFunctionSelection from "../ScriptFunctionSelection";
import { Button } from "react-bootstrap";
import ValidationReportModal from "../modal/ValidationReportModal.jsx";
import ValidationReportModal from "../modal/ValidationReportModal";
import { w3cwebsocket as W3CWebSocket } from "websocket";
import MoveModuleModal from "../modal/MoveModuleModal.jsx";
import ScriptOntologyModal from "../modal/ScriptOntologyModal.jsx";
import ScriptExecutionModal from "../modal/ScriptExecutionModal.jsx";
import MoveModuleModal from "../modal/MoveModuleModal";
import ScriptOntologyModal from "../modal/ScriptOntologyModal";
import ScriptExecutionModal from "../modal/ScriptExecutionModal";
import "@triply/yasgui/build/yasgui.min.css";
import SFormsFunctionModal from "../sform/SFormsFunctionModal.jsx";
import SFormsFunctionModal from "../sform/SFormsFunctionModal";
import "@kbss-cvut/s-forms/css";
import Loading from "../Loading.jsx";
import ErrorModal from "../modal/ErrorModal.jsx";
import Loading from "../Loading";
import ErrorModal from "../modal/ErrorModal";
const TYPE = "http://onto.fel.cvut.cz/ontologies/s-pipes-view/has-module-type";
const LABEL = "http://www.w3.org/2000/01/rdf-schema#label";
const X = "http://onto.fel.cvut.cz/ontologies/s-pipes-view/has-x-coordinate";
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import React from "react";

import { Button, Form, Modal } from "react-bootstrap";
import { Rest } from "../rest/Rest.jsx";
import { Rest } from "../rest/Rest";

class ErrorModal extends React.Component {
constructor(props) {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import React from "react";

import { Button, Form, Modal } from "react-bootstrap";
import { Rest } from "../rest/Rest.jsx";
import { Rest } from "../rest/Rest";

class FunctionExecutionModal extends React.Component {
constructor(props) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,12 @@ import {
SCRIPT_PATH,
START_DATE_UNIX,
TRANSFORMATION,
} from "../rest/Rest.jsx";
} from "../rest/Rest";
import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";
import { faEdit, faMugHot, faPlayCircle, faTrash } from "@fortawesome/free-solid-svg-icons";
import Moment from "react-moment";
import { Link } from "react-router-dom";
import Layout from "../Layout.jsx";
import Layout from "../Layout";

class MoveModuleModal extends React.Component {
constructor(props) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,12 @@ import {
SCRIPT_PATH,
START_DATE_UNIX,
TRANSFORMATION,
} from "../rest/Rest.jsx";
} from "../rest/Rest";
import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";
import { faEdit, faMugHot, faPlayCircle, faTrash } from "@fortawesome/free-solid-svg-icons";
import Moment from "react-moment";
import { Link } from "react-router-dom";
import Layout from "../Layout.jsx";
import Layout from "../Layout";

class ScriptActionsModuleModal extends React.Component {
constructor(props) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import {
MODULE_VARIABLES,
MODULE_VARIABLE_NAME,
MODULE_VARIABLE_VALUE,
} from "../rest/Rest.jsx";
} from "../rest/Rest";
import { faDownload, faMugHot } from "@fortawesome/free-solid-svg-icons";
import Moment from "react-moment";
import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,12 @@ import {
SCRIPT_PATH,
START_DATE_UNIX,
TRANSFORMATION,
} from "../rest/Rest.jsx";
} from "../rest/Rest";
import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";
import { faEdit, faMugHot, faPlayCircle, faPlusCircle, faTrash } from "@fortawesome/free-solid-svg-icons";
import Moment from "react-moment";
import { Link } from "react-router-dom";
import Layout from "../Layout.jsx";
import Layout from "../Layout";

class ScriptOntologyModal extends React.Component {
constructor(props) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import {
RULE_COMMENT,
START_DATE_UNIX,
TRANSFORMATION,
} from "../rest/Rest.jsx";
} from "../rest/Rest";
import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";
import { faEdit, faMugHot, faPlayCircle, faTrash } from "@fortawesome/free-solid-svg-icons";
import Moment from "react-moment";
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@ import React from "react";
import SForms from "@kbss-cvut/s-forms";

import { Button, Modal } from "react-bootstrap";
import { Rest } from "../rest/Rest.jsx";
import { Rest } from "../rest/Rest";
import "@triply/yasgui/build/yasgui.min.css";
import ErrorModal from "../modal/ErrorModal.jsx";
import ScriptActionsModuleModal from "../modal/ScriptActionsModuleModal.jsx";
import ErrorModal from "../modal/ErrorModal";
import ScriptActionsModuleModal from "../modal/ScriptActionsModuleModal";

class SFormsFunctionModal extends React.Component {
constructor(props) {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
import React from "react";
import SForms from "@kbss-cvut/s-forms";
import { Button, Modal } from "react-bootstrap";
import { Rest } from "../rest/Rest.jsx";
import Loading from "../Loading.jsx";
import { Rest } from "../rest/Rest";
import Loading from "../Loading";
import "@triply/yasgui/build/yasgui.min.css";
import ErrorModal from "../modal/ErrorModal.jsx";
import ErrorModal from "../modal/ErrorModal";

class SFormsModal extends React.Component {
constructor(props) {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import React from "react";

import { Alert, Button, Form, Modal } from "react-bootstrap";
import { Rest } from "../rest/Rest.jsx";
import { Rest } from "../rest/Rest";
import Yasgui from "@triply/yasgui";
import "@triply/yasgui/build/yasgui.min.css";
import JSONPretty from "react-json-pretty";
Expand Down
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
import React, { Fragment } from "react";
import { includes } from "lodash";

import styles from "./styles.jsx";
import Header from "./Header.jsx";
import styles from "./styles";
import Header from "./Header";
import { Treebeard, decorators } from "react-treebeard";
import { Rest } from "../rest/Rest.jsx";
import { Rest } from "../rest/Rest";
import { withRouter } from "react-router-dom";
import ScriptActionsModuleModal from "../modal/ScriptActionsModuleModal.jsx";
import Loading from "../Loading.jsx";
import ErrorModal from "../modal/ErrorModal.jsx";
import ScriptActionsModuleModal from "../modal/ScriptActionsModuleModal";
import Loading from "../Loading";
import ErrorModal from "../modal/ErrorModal";

class ScriptsTree extends React.Component {
constructor(props) {
Expand Down
File renamed without changes.
10 changes: 10 additions & 0 deletions src/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
import React from "react";
import ReactDOM from "react-dom";
import App from "./components/App";

import "./index.css";
import "bootstrap/dist/css/bootstrap.css";

const render = (Component) => ReactDOM.render(<Component />, document.getElementById("root"));

render(App);
9 changes: 0 additions & 9 deletions src/index.jsx

This file was deleted.

0 comments on commit 631f71e

Please sign in to comment.