Skip to content

Commit

Permalink
fix linting
Browse files Browse the repository at this point in the history
  • Loading branch information
becky-gilbert committed Feb 2, 2024
1 parent 02481fe commit 092ef2b
Showing 1 changed file with 19 additions and 16 deletions.
35 changes: 19 additions & 16 deletions packages/lookit-initjspsych/rollup.config.dev.mjs
Original file line number Diff line number Diff line change
@@ -1,26 +1,29 @@
import { makeRollupConfig } from "@jspsych/config/rollup";
import serve from 'rollup-plugin-serve';
import serve from "rollup-plugin-serve";

let rollupConfig = makeRollupConfig("lookitInitJsPsych");

const host = 'localhost';
const host = "localhost";
const port = 10001; // this needs to change for each package
const content_dir = 'dist/';
const content_dir = "dist/";

rollupConfig.plugins = [
// options: https://github.com/thgh/rollup-plugin-serve/tree/master?tab=readme-ov-file#options
serve({
contentBase: content_dir,
historyApiFallback: true,
host: host,
port: port,
onListening: function (server) {
const address = server.address();
const host = (address.address === '::' || address.address === '::1') ? 'localhost' : address.address;
const protocol = this.https ? 'https' : 'http';
console.log(`Server listening at ${protocol}://${host}:${address.port}/`);
}
})
// options: https://github.com/thgh/rollup-plugin-serve/tree/master?tab=readme-ov-file#options
serve({
contentBase: content_dir,
historyApiFallback: true,
host: host,
port: port,
onListening: function (server) {
const address = server.address();
const host =
address.address === "::" || address.address === "::1"
? "localhost"
: address.address;
const protocol = this.https ? "https" : "http";
console.log(`Server listening at ${protocol}://${host}:${address.port}/`);
},
}),
];

export default rollupConfig;

0 comments on commit 092ef2b

Please sign in to comment.