diff --git a/editors/demo/config-overrides.js b/editors/demo/config-overrides.js new file mode 100644 index 0000000000000000000000000000000000000000..e2cf94482e8e7bc53cdb65bef9c758bbf04a1a3e --- /dev/null +++ b/editors/demo/config-overrides.js @@ -0,0 +1,47 @@ +module.exports = function override(config, env) { + config.module = { + rules: [ + { + oneOf: [ + { + test: /\.js$/, + loader: "babel-loader", + exclude: /node_modules/, + options: { + presets: [ + [require("@babel/preset-env"), { modules: false }], + require("@babel/preset-react") + ], + plugins: [ + ["@babel/plugin-proposal-decorators", { legacy: true }], + "babel-plugin-parameter-decorator", + ["@babel/plugin-proposal-class-properties", { loose: true }] + ] + } + }, + { + test: /\.css$/, + use: ["style-loader", "css-loader"] + }, + { + test: /\.svg$/, + use: "svg-inline-loader" + }, + { + test: /\.(woff(2)?|ttf|eot|svg)(\?v=\d+\.\d+\.\d+)?$/, + use: [ + { + loader: "file-loader", + options: { + name: "[name].[ext]", + outputPath: "fonts/" + } + } + ] + } + ] + } + ] + }; + return config; +}; diff --git a/editors/demo/jsconfig.json b/editors/demo/jsconfig.json new file mode 100644 index 0000000000000000000000000000000000000000..504cd646e14906b4db8e943f9bfb10ab80162cee --- /dev/null +++ b/editors/demo/jsconfig.json @@ -0,0 +1,5 @@ +{ + "compilerOptions": { + "experimentalDecorators": true + } +} diff --git a/editors/demo/package.json b/editors/demo/package.json new file mode 100644 index 0000000000000000000000000000000000000000..35efa65d5579a5fa36ce80c075bcd66148ae9fb0 --- /dev/null +++ b/editors/demo/package.json @@ -0,0 +1,41 @@ +{ + "name": "editoria", + "version": "0.0.40", + "private": true, + "dependencies": { + "@guardian/prosemirror-invisibles": "^1.2.0", + "@pubsweet/ui-toolkit": "^2.3.1", + "fontsource-merriweather": "^3.0.9", + "prosemirror-tables": "^1.1.1", + "react": "^16.13.1", + "react-dom": "^16.13.1", + "react-panelgroup": "^1.0.10", + "styled-components": "^4.2.0", + "typeface-fira-sans-condensed": "^0.0.54", + "typeface-inter": "^1.1.13", + "typeface-vollkorn": "^0.0.54", + "wax-prosemirror-components": "^0.0.40", + "wax-prosemirror-core": "^0.0.40", + "wax-prosemirror-plugins": "^0.0.40", + "wax-prosemirror-services": "^0.0.40" + }, + "scripts": { + "start": "react-app-rewired start", + "test": "react-app-rewired test --env=jsdom", + "eject": "react-scripts eject" + }, + "eslintConfig": { + "extends": "react-app" + }, + "browserslist": [ + ">0.2%", + "not dead", + "not ie <= 11", + "not op_mini all" + ], + "devDependencies": { + "babel-eslint": "10.0.3", + "react-app-rewired": "^2.1.1", + "react-scripts": "3.4" + } +} diff --git a/editors/demo/public/favicon.ico b/editors/demo/public/favicon.ico new file mode 100644 index 0000000000000000000000000000000000000000..a11777cc471a4344702741ab1c8a588998b1311a Binary files /dev/null and b/editors/demo/public/favicon.ico differ diff --git a/editors/demo/public/index.html b/editors/demo/public/index.html new file mode 100644 index 0000000000000000000000000000000000000000..dd1ccfd4cd30a29aaa08b295d99be29cdeb29cf9 --- /dev/null +++ b/editors/demo/public/index.html @@ -0,0 +1,38 @@ +<!DOCTYPE html> +<html lang="en"> + <head> + <meta charset="utf-8" /> + <link rel="shortcut icon" href="%PUBLIC_URL%/favicon.ico" /> + <meta name="viewport" content="width=device-width, initial-scale=1" /> + <meta name="theme-color" content="#000000" /> + <!-- + manifest.json provides metadata used when your web app is installed on a + user's mobile device or desktop. See https://developers.google.com/web/fundamentals/web-app-manifest/ + --> + <link rel="manifest" href="%PUBLIC_URL%/manifest.json" /> + <!-- + Notice the use of %PUBLIC_URL% in the tags above. + It will be replaced with the URL of the `public` folder during the build. + Only files inside the `public` folder can be referenced from the HTML. + + Unlike "/favicon.ico" or "favicon.ico", "%PUBLIC_URL%/favicon.ico" will + work correctly both with client-side routing and a non-root public URL. + Learn how to configure a non-root public URL by running `npm run build`. + --> + <title>React App</title> + </head> + <body> + <noscript>You need to enable JavaScript to run this app.</noscript> + <div id="root"></div> + <!-- + This HTML file is a template. + If you open it directly in the browser, you will see an empty page. + + You can add webfonts, meta tags, or analytics to this file. + The build step will place the bundled scripts into the <body> tag. + + To begin the development, run `npm start` or `yarn start`. + To create a production bundle, use `npm run build` or `yarn build`. + --> + </body> +</html> diff --git a/editors/demo/public/manifest.json b/editors/demo/public/manifest.json new file mode 100644 index 0000000000000000000000000000000000000000..1f2f141fafdeb1d31d85b008ec5132840c5e6362 --- /dev/null +++ b/editors/demo/public/manifest.json @@ -0,0 +1,15 @@ +{ + "short_name": "React App", + "name": "Create React App Sample", + "icons": [ + { + "src": "favicon.ico", + "sizes": "64x64 32x32 24x24 16x16", + "type": "image/x-icon" + } + ], + "start_url": ".", + "display": "standalone", + "theme_color": "#000000", + "background_color": "#ffffff" +} diff --git a/editors/demo/src/HHMI/config/config.js b/editors/demo/src/HHMI/config/config.js new file mode 100644 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 diff --git a/editors/demo/src/HHMI/config/index.js b/editors/demo/src/HHMI/config/index.js new file mode 100644 index 0000000000000000000000000000000000000000..28307f54868afa5e0822f8156b8b1439bfd3cdd4 --- /dev/null +++ b/editors/demo/src/HHMI/config/index.js @@ -0,0 +1 @@ +export { default as config } from './config';