Commit 962f69eb authored by Robert Knight's avatar Robert Knight

Reformat `*.js` files in project root with Prettier

These files were not formatted previously due to the Prettier glob not matching
`*.mjs`.
parent 19d19fd7
......@@ -5,14 +5,14 @@ import {
runTests,
watchJS,
} from '@hypothesis/frontend-build';
import changed from 'gulp-changed';
import gulp from 'gulp';
import changed from 'gulp-changed';
import { serveDev } from './dev-server/serve-dev.js';
import { servePackage } from './dev-server/serve-package.js';
import tailwindConfig from './tailwind.config.js';
import annotatorTailwindConfig from './tailwind-annotator.config.js';
import sidebarTailwindConfig from './tailwind-sidebar.config.js';
import tailwindConfig from './tailwind.config.js';
gulp.task('build-js', () => buildJS('./rollup.config.js'));
gulp.task('watch-js', () => watchJS('./rollup.config.js'));
......@@ -20,7 +20,7 @@ gulp.task('watch-js', () => watchJS('./rollup.config.js'));
gulp.task('build-annotator-tailwind-css', () =>
buildCSS(['./src/styles/annotator/annotator.scss'], {
tailwindConfig: annotatorTailwindConfig,
})
}),
);
gulp.task('build-sidebar-tailwind-css', () =>
......@@ -32,8 +32,8 @@ gulp.task('build-sidebar-tailwind-css', () =>
// be managed with its own tailwind config?
'./src/styles/ui-playground/ui-playground.scss',
],
{ tailwindConfig: sidebarTailwindConfig }
)
{ tailwindConfig: sidebarTailwindConfig },
),
);
gulp.task('build-standalone-css', () =>
......@@ -47,8 +47,8 @@ gulp.task('build-standalone-css', () =>
// Vendor
'./node_modules/katex/dist/katex.min.css',
],
{ tailwindConfig }
)
{ tailwindConfig },
),
);
gulp.task(
......@@ -56,8 +56,8 @@ gulp.task(
gulp.parallel(
'build-annotator-tailwind-css',
'build-sidebar-tailwind-css',
'build-standalone-css'
)
'build-standalone-css',
),
);
gulp.task(
......@@ -70,9 +70,9 @@ gulp.task(
'src/**/*.tsx',
'dev-server/ui-playground/**/*.tsx',
],
gulp.task('build-css')
gulp.task('build-css'),
);
})
}),
);
const fontFiles = ['node_modules/katex/dist/fonts/*.woff2'];
......@@ -88,7 +88,7 @@ gulp.task(
'watch-fonts',
gulp.series('build-fonts', function watchFonts() {
gulp.watch(fontFiles, gulp.task('build-fonts'));
})
}),
);
// Files to reference in `build/manifest.json`, used by `build/boot.js`.
......@@ -111,7 +111,7 @@ gulp.task('watch-boot-script', () => {
'src/boot/**/*.{js,ts,tsx}',
],
{ delay: 500 },
gulp.task('build-boot-script')
gulp.task('build-boot-script'),
);
});
......@@ -129,8 +129,8 @@ gulp.task(
'build',
gulp.series(
gulp.parallel('build-js', 'build-css', 'build-fonts'),
'build-boot-script'
)
'build-boot-script',
),
);
gulp.task(
......@@ -141,8 +141,8 @@ gulp.task(
'watch-boot-script',
'watch-css',
'watch-fonts',
'watch-js'
)
'watch-js',
),
);
// Unit and integration testing tasks.
......@@ -157,6 +157,6 @@ gulp.task(
karmaConfig: 'src/karma.config.cjs',
rollupConfig: 'rollup-tests.config.js',
testsPattern: 'src/**/*-test.js',
})
)
}),
),
);
import { readFileSync } from 'fs';
import { babel } from '@rollup/plugin-babel';
import { nodeResolve } from '@rollup/plugin-node-resolve';
import json from '@rollup/plugin-json';
import { nodeResolve } from '@rollup/plugin-node-resolve';
import replace from '@rollup/plugin-replace';
import terser from '@rollup/plugin-terser';
import { readFileSync } from 'fs';
const isProd = process.env.NODE_ENV === 'production';
const prodPlugins = [];
......@@ -65,7 +64,7 @@ export default {
// produces a prod bundle of the same size and dev bundle that has less cruft in it.
babelHelpers: 'inline',
exclude: 'node_modules/**',
extensions: ['.js', '.ts', '.tsx']
extensions: ['.js', '.ts', '.tsx'],
}),
json(),
nodeResolve({ extensions: ['.js', '.ts', '.tsx'] }),
......
import { readFileSync } from 'fs';
import { babel } from '@rollup/plugin-babel';
import commonjs from '@rollup/plugin-commonjs';
import json from '@rollup/plugin-json';
import { nodeResolve } from '@rollup/plugin-node-resolve';
import replace from '@rollup/plugin-replace';
import { string } from 'rollup-plugin-string';
import virtual from '@rollup/plugin-virtual';
import { readFileSync } from 'fs';
import { string } from 'rollup-plugin-string';
export default {
input: 'build/scripts/test-inputs.js', // Input file generated by gulp task
......
import { readFileSync } from 'fs';
import { babel } from '@rollup/plugin-babel';
import commonjs from '@rollup/plugin-commonjs';
import { nodeResolve } from '@rollup/plugin-node-resolve';
import replace from '@rollup/plugin-replace';
import terser from '@rollup/plugin-terser';
import virtual from '@rollup/plugin-virtual';
import { readFileSync } from 'fs';
import { string } from 'rollup-plugin-string';
const isProd = process.env.NODE_ENV === 'production';
......@@ -27,14 +26,14 @@ if (isProd) {
// See https://github.com/hypothesis/client/issues/4045.
max_line_len: 1024,
},
})
}),
);
// Eliminate debug-only imports.
prodPlugins.push(
virtual({
'preact/debug': '',
})
}),
);
}
......
......@@ -23,7 +23,8 @@ export default {
'fade-out': 'fade-out 0.3s forwards',
'pulse-fade-out': 'pulse-fade-out 5s ease-in-out forwards',
'slide-in-from-right': 'slide-in-from-right 0.3s forwards ease-in-out',
'updates-notification-slide-in': 'updates-notification-slide-in 0.3s ease-in'
'updates-notification-slide-in':
'updates-notification-slide-in 0.3s ease-in',
},
boxShadow: {
// A more prominent shadow than the one used by tailwind, intended for
......
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