Commit 856d76ed authored by Zac Wood's avatar Zac Wood

Added SRCT favicon

parent b72642c3
......@@ -5,7 +5,7 @@ class ApiService {
this.apiRoot = apiRoot;
}
searchCourseSections = async (crn: string): Promise<string[]> =>
searchCourseSections = async (crn: string): Promise<any[]> =>
fetchJson(`${this.apiRoot}/course_sections?crn=${crn}`);
generateCalendar = async (crns: string[]): Promise<string> =>
postJson(`${this.apiRoot}/generate`, crns).then(response => response.text());
......
......@@ -6,4 +6,4 @@
import * as FileSaver from 'file-saver';
export const downloadFile = (text: string, fileName: string) =>
FileSaver.saveAs(new Blob([text], { type: 'text/plain;charset=utf-8' }), fileName);
FileSaver.saveAs(new Blob([text], { type: 'text/calendar;charset=utf-8' }), fileName);
const path = require("path");
const webpack = require("webpack");
const CleanWebpackPlugin = require("clean-webpack-plugin");
const HtmlWebpackPlugin = require("html-webpack-plugin");
const path = require('path');
const webpack = require('webpack');
const CleanWebpackPlugin = require('clean-webpack-plugin');
const HtmlWebpackPlugin = require('html-webpack-plugin');
const HtmlWebpackPluginConfig = new HtmlWebpackPlugin({
template: "./index.html",
filename: "index.html",
inject: "body",
template: './index.html',
filename: 'index.html',
inject: 'body',
favicon: 'favicon.ico',
});
module.exports = {
mode: "development",
devtool: "source-map",
mode: 'development',
devtool: 'source-map',
entry: "./src/index.tsx",
entry: './src/index.tsx',
output: {
filename: "[name].[hash].js",
path: path.resolve(__dirname, "dist"),
filename: '[name].[hash].js',
path: path.resolve(__dirname, 'dist'),
},
resolve: {
extensions: [".js", ".json", ".ts", ".tsx"],
extensions: ['.js', '.json', '.ts', '.tsx'],
},
module: {
rules: [
{
test: /\.tsx?$/,
loader: "awesome-typescript-loader",
loader: 'awesome-typescript-loader',
exclude: /node_modules/,
},
{
enforce: "pre",
enforce: 'pre',
test: /\.js$/,
loader: "source-map-loader",
loader: 'source-map-loader',
},
{
test: /\.css$/,
use: [
{
loader: "style-loader",
loader: 'style-loader',
},
{
loader: "css-loader",
loader: 'css-loader',
},
],
},
{
test: /\.woff(\?.+)?$/,
use: "url-loader?limit=10000&mimetype=application/font-woff",
use: 'url-loader?limit=10000&mimetype=application/font-woff',
},
{
test: /\.woff2(\?.+)?$/,
use: "url-loader?limit=10000&mimetype=application/font-woff",
use: 'url-loader?limit=10000&mimetype=application/font-woff',
},
{
test: /\.ttf(\?.+)?$/,
use: "file-loader",
use: 'file-loader',
},
{
test: /\.eot(\?.+)?$/,
use: "file-loader",
use: 'file-loader',
},
{
test: /\.svg(\?.+)?$/,
use: "file-loader",
use: 'file-loader',
},
{
test: /\.(js)$/,
exclude: /(node_modules)/,
loader: "babel-loader",
loader: 'babel-loader',
},
],
},
plugins: [new webpack.HotModuleReplacementPlugin(), new CleanWebpackPlugin(["dist"]), HtmlWebpackPluginConfig],
plugins: [new webpack.HotModuleReplacementPlugin(), new CleanWebpackPlugin(['dist']), HtmlWebpackPluginConfig],
devServer: {
contentBase: path.resolve(__dirname, "dist"),
contentBase: path.resolve(__dirname, 'dist'),
compress: true,
host: "0.0.0.0",
host: '0.0.0.0',
port: 8080,
hot: true,
publicPath: "/",
publicPath: '/',
historyApiFallback: true,
},
};
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