Commit 294e394a authored by Xavier Watkins's avatar Xavier Watkins
Browse files

Tidy up

parent b0f268ee
https://ebi-uniprot.github.io/gifts-curation-tool/
# To install
`npm install`
# To run
`npm run dev-server`
`yarn`
# To run locally
`yarn run start`
{
"name": "gifts-curation-tool",
"version": "1.0.0",
"private": true,
"homepage": "http://ebi-uniprot.github.io/gifts-curation-tool",
"license": "MIT",
"scripts": {
"start": "webpack --config webpack.local.js --mode development && webpack-dev-server --config webpack.local.js --mode development --open",
"dev-build": "webpack --config webpack.dev.js --mode production",
"prod-build": "webpack --config webpack.prod.js --mode production",
"staging-build": "webpack --config webpack.staging.js --mode production",
"fallback-build": "webpack --config webpack.prod.js --READ_ONLY --mode production",
"jslint": "./node_modules/.bin/eslint -c .eslintrc.json --ext .js --ext .jsx src",
"test": "jest",
"update-snapshots": "jest --updateSnapshot",
"remove-obsolete-snapshots": "yarn test -u",
"profile": "webpack --config webpack.prod.js --profile --json > stats.json"
},
"jest": {
"moduleFileExtensions": [
"js",
"jsx"
],
"moduleDirectories": [
"node_modules"
],
"moduleNameMapper": {
"\\.(jpg|jpeg|png|gif|eot|otf|webp|svg|ttf|woff|woff2|mp4|webm|wav|mp3|m4a|aac|oga)$": "<rootDir>/__mocks__/fileMock.js",
"\\.(css|less|scss)$": "<rootDir>/__mocks__/styleMock.js"
},
"globals": {
"API_URL": "http://193.62.52.185:5000/gifts",
"AUTH_CALLBACK_URL": "http%3A%2F%2Flocalhost%3A39093%2Flogin"
},
"testURL": "http://localhost",
"transformIgnorePatterns": [
"node_modules/?!(lodash-es)"
],
"testEnvironment": "node"
},
"dependencies": {
"@babel/polyfill": "^7.0.0",
"ajv": "^6.5.0",
"axios": "^0.18.0",
"franklin-sites": "^0.0.71",
"jsonwebtoken": "^8.5.1",
"lodash": "^4.17.15",
"path": "^0.12.7",
"prop-types": "15.7.2",
"query-string": "^6.1.0",
"react": "^16.9.0",
"react-cookie": "^2.1.6",
"react-dom": "^16.9.0",
"react-markdown": "^3.3.4",
"react-paginate": "^5.2.3",
"react-router-dom": "^5.1.2",
"react-select": "^3.0.8",
"react-spinners": "^0.3.3",
"simplemde": "^1.11.2",
"uuid": "^3.3.2"
},
"devDependencies": {
"@babel/cli": "^7.1.2",
"@babel/core": "^7.1.2",
"@babel/plugin-proposal-class-properties": "^7.3.0",
"@babel/plugin-proposal-object-rest-spread": "^7.6.2",
"@babel/plugin-syntax-dynamic-import": "^7.8.3",
"@babel/plugin-transform-modules-commonjs": "^7.8.3",
"@babel/polyfill": "^7.0.0",
"@babel/preset-env": "^7.1.0",
"@babel/preset-react": "^7.0.0",
"@testing-library/react": "^9.1.4",
"babel-core": "^7.0.0-0",
"babel-eslint": "^10.0.1",
"babel-jest": "25.1.0",
"babel-loader": "^8.0.4",
"babel-plugin-dynamic-import-node": "^2.3.0",
"browser-sync": "^2.23.6",
"browser-sync-webpack-plugin": "^2.0.1",
"css-loader": "^6.3.0",
"eslint": "^5.16.0",
"eslint-config-airbnb": "17.1.0",
"eslint-plugin-import": "2.16.0",
"eslint-plugin-jest": "23.0.3",
"eslint-plugin-jsx-a11y": "6.2.1",
"eslint-plugin-react": "7.12.4",
"html-loader": "^2.1.2",
"html-webpack-plugin": "^5.3.2",
"jest": "25.1.0",
"npm-run-all": "^4.1.2",
"react-test-renderer": "^16.3.1",
"sass": "^1.42.1",
"sass-loader": "^12.1.0",
"style-loader": "^3.3.0",
"webpack": "^5.55.1",
"webpack-bundle-analyzer": "^4.4.2",
"webpack-cli": "^4.8.0",
"webpack-dev-server": "^4.3.0",
"webpack-merge": "^5.8.0"
}
}
const webpack = require("webpack");
var path = require("path");
module.exports = {
context: __dirname,
entry: {
app: ["@babel/polyfill", __dirname + "/src/ui/index.jsx"],
vendor: ["@babel/preset-react", "react-dom", "simplemde"],
},
resolve: {
extensions: [".jsx", ".js"],
alias: { react: require.resolve("react") },
},
module: {
rules: [
{
test: /\.(js|jsx)$/,
exclude: /node_modules/,
use: {
loader: "babel-loader",
},
},
{
test: /\.html$/,
use: [
{
loader: "html-loader",
options: {
minimize: true,
},
},
],
},
{
test: /\.(css|sass|scss)$/,
use: [
{
loader: "style-loader", // creates style nodes from JS strings
},
{
loader: "css-loader", // translates CSS into CommonJS
},
{
loader: "sass-loader", // compiles Sass to CSS
},
],
},
],
},
plugins: [
new webpack.DefinePlugin({
FRONTEND_VERSION: JSON.stringify(require("./package.json").version),
}),
],
node: {
fs: "empty",
},
target: "web",
};
// This is used to build all remote dev/prod/fallback instances.
const webpack = require("webpack");
const { merge } = require("webpack-merge");
const HtmlWebPackPlugin = require("html-webpack-plugin");
const common = require("./webpack.common.js");
module.exports = merge(common, {
mode: "production",
output: {
path: `${__dirname}/build`,
filename: "[name].[chunkhash].js",
publicPath: "/gifts",
},
// devtool: 'source-map',
optimization: {
splitChunks: {
chunks: "all",
},
},
plugins: [
new webpack.DefinePlugin({
BASE_URL: JSON.stringify("/gifts"),
API_URL: JSON.stringify("/gifts/api"),
AUTH_CALLBACK_URL: JSON.stringify("https://wwwdev.ebi.ac.uk/gifts/login"),
READ_ONLY: JSON.stringify(
process.argv.indexOf("--READ_ONLY") > -1 || false
),
}),
new HtmlWebPackPlugin({
template: `${__dirname}/public/index.html`,
filename: "index.html",
}),
new webpack.DefinePlugin({
"process.env.NODE_ENV": JSON.stringify("production"),
}),
],
});
// This is used to build all remote dev/prod/fallback instances.
const webpack = require("webpack");
const { merge } = require("webpack-merge");
const HtmlWebPackPlugin = require("html-webpack-plugin");
const common = require("./webpack.common.js");
module.exports = merge(common, {
mode: "production",
output: {
path: `${__dirname}/build`,
filename: "[name].[chunkhash].js",
publicPath: "/gifts",
},
// devtool: 'source-map',
optimization: {
splitChunks: {
chunks: "all",
},
},
plugins: [
new webpack.DefinePlugin({
BASE_URL: JSON.stringify("/gifts"),
API_URL: JSON.stringify("/gifts/api"),
AUTH_CALLBACK_URL: JSON.stringify("https://www.ebi.ac.uk/gifts/login"),
READ_ONLY: JSON.stringify(
process.argv.indexOf("--READ_ONLY") > -1 || false
),
}),
new HtmlWebPackPlugin({
template: `${__dirname}/public/index.html`,
filename: "index.html",
}),
new webpack.DefinePlugin({
"process.env.NODE_ENV": JSON.stringify("production"),
}),
],
});
// This is used to build all remote dev/prod/fallback instances.
const webpack = require("webpack");
const { merge } = require("webpack-merge");
const HtmlWebPackPlugin = require("html-webpack-plugin");
const common = require("./webpack.common.js");
module.exports = merge(common, {
mode: "production",
output: {
path: `${__dirname}/build`,
filename: "[name].[chunkhash].js",
publicPath: "/gifts",
},
// devtool: 'source-map',
optimization: {
splitChunks: {
chunks: "all",
},
},
plugins: [
new webpack.DefinePlugin({
BASE_URL: JSON.stringify("/gifts"),
API_URL: JSON.stringify("/gifts/api"),
AUTH_CALLBACK_URL: JSON.stringify(
"https://www-test.ebi.ac.uk/gifts/login"
),
READ_ONLY: JSON.stringify(
process.argv.indexOf("--READ_ONLY") > -1 || false
),
}),
new HtmlWebPackPlugin({
template: `${__dirname}/public/index.html`,
filename: "index.html",
}),
new webpack.DefinePlugin({
"process.env.NODE_ENV": JSON.stringify("production"),
}),
],
});
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment