-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #515 from NBISweden/feature/builder
Migrate from snowpack to webpack
- Loading branch information
Showing
21 changed files
with
11,832 additions
and
17,105 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,3 +7,5 @@ | |
/backend/vendor/ | ||
/frontend/node_modules/ | ||
ops-redmine/ | ||
frontend/public/assets | ||
frontend/public/js |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,29 +1,39 @@ | ||
{ | ||
"name": "urdr", | ||
"version": "0.1.0", | ||
"description": "urdr time logging system", | ||
"version": "1.0.0", | ||
"description": "urdr time logging interface", | ||
"author": "NBIS", | ||
"license": "GPL-3.0", | ||
"scripts": { | ||
"start": "snowpack dev", | ||
"build": "snowpack build", | ||
"test": "echo \"Error: no test specified\" && exit 1" | ||
"start": "npx webpack serve", | ||
"build": "webpack -c webpack.config.prod.js --mode=production --node-env=production", | ||
"test": "echo \"Error: no test specified\" && exit 1", | ||
"build:dev": "webpack --mode=development", | ||
"build:prod": "webpack -c webpack.config.prod.js --mode=production --node-env=production", | ||
"watch": "webpack --watch", | ||
"serve": "webpack serve" | ||
}, | ||
"devDependencies": { | ||
"@types/react": "^17.0.45", | ||
"snowpack": "3.8.6", | ||
"typescript": "^4.7.4" | ||
"css-loader": "^6.7.1", | ||
"html-webpack-plugin": "^5.5.0", | ||
"styles-loader": "^4.0.1", | ||
"ts-loader": "^8.0.3", | ||
"typescript": "^4.7.4", | ||
"webpack": "^5.73.0", | ||
"webpack-cli": "^4.10.0", | ||
"webpack-dev-server": "^4.9.3" | ||
}, | ||
"dependencies": { | ||
"@snowpack/plugin-webpack": "3.0.0", | ||
"buffer": "^6.0.3", | ||
"date-fns": "^2.28.0", | ||
"handlebars-loader": "^1.7.2", | ||
"react": "^17.0.2", | ||
"react-dom": "^17.0.2", | ||
"react-router-dom": "^6.3.0", | ||
"react-beautiful-dnd": "^13.1.0", | ||
"react-datepicker": "^4.8.0", | ||
"react-spinners": "^0.13.2", | ||
"react-loading-overlay-ts": "^2.0.0" | ||
"react-dom": "^17.0.2", | ||
"react-loading-overlay-ts": "^2.0.0", | ||
"react-router-dom": "^6.3.0", | ||
"react-spinners": "^0.13.2" | ||
} | ||
} |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,7 @@ | ||
import * as React from "react"; | ||
import * as ReactDOM from "react-dom"; | ||
import { App } from "./App"; | ||
import "./bootstrap.min.css"; | ||
import "./index.css"; | ||
import { App } from "./App"; | ||
|
||
ReactDOM.render(<App />, document.querySelector("#root")); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
{ | ||
"compilerOptions": { | ||
"allowSyntheticDefaultImports": true, | ||
"noImplicitAny": true, | ||
"module": "es6", | ||
"target": "es6", | ||
"allowJs": true, | ||
"jsx": "react", | ||
"moduleResolution": "node" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,67 @@ | ||
const path = require('path') | ||
const webpack = require('webpack') | ||
const HtmlWebpackPlugin = require('html-webpack-plugin') | ||
|
||
module.exports = { | ||
mode: 'development', | ||
entry: { | ||
index: './src/index.tsx' | ||
}, | ||
module: { | ||
rules: [ | ||
{ | ||
test: /\.(ts|tsx)$/i, | ||
loader: 'ts-loader', | ||
exclude: ['/node_modules/'], | ||
options: { | ||
transpileOnly: true | ||
} | ||
}, | ||
{ | ||
test: /\.(woff|woff2|png|svg|html)$/i, | ||
type: 'asset' | ||
}, | ||
{ | ||
test: /\.(css)$/i, | ||
use: ['style-loader', 'css-loader'] | ||
}, | ||
{ | ||
test: /\.hbs$/, loader: 'handlebars-loader' | ||
} | ||
] | ||
}, | ||
resolve: { | ||
extensions: ['.tsx', '.ts', '.jsx', '.js', '...'] | ||
}, | ||
devtool: 'inline-source-map', | ||
devServer: { | ||
open: true, | ||
host: '0.0.0.0', | ||
port: 4242, | ||
compress: true, | ||
allowedHosts: 'all', | ||
historyApiFallback: true, | ||
static: './public', | ||
client: { | ||
webSocketURL: 'ws://localhost:4567/ws' | ||
} | ||
}, | ||
plugins: [ | ||
new webpack.DefinePlugin({ | ||
'process.env.PUBLIC_API_URL': JSON.stringify(process.env.PUBLIC_API_URL), | ||
'process.env.PUBLIC_REDMINE_URL': JSON.stringify( | ||
process.env.PUBLIC_REDMINE_URL | ||
) | ||
}), | ||
new HtmlWebpackPlugin({ | ||
title: 'Urdr time logging', | ||
filename: 'index.html', | ||
publicPath: '/', | ||
template: './src/template.hbs' | ||
}) | ||
], | ||
output: { | ||
filename: './js/index.js', | ||
path: path.resolve(__dirname, './public') | ||
} | ||
} |
Oops, something went wrong.