@hypothesis/frontend-build
Advanced tools
Comparing version 1.2.0 to 2.0.0
@@ -5,3 +5,3 @@ import { createHash } from 'crypto'; | ||
import glob from 'glob'; | ||
import { globSync } from 'glob'; | ||
@@ -35,3 +35,3 @@ /** | ||
const manifestDir = path.dirname(manifestPath); | ||
const files = glob.sync(pattern); | ||
const files = globSync(pattern).sort(); | ||
@@ -38,0 +38,0 @@ /** @type {Record<string, string>} */ |
@@ -9,8 +9,4 @@ import { mkdir, writeFile } from 'fs/promises'; | ||
/** | ||
* @typedef {import('tailwindcss/tailwind-config').TailwindConfig} TailwindConfig | ||
* @typedef {import('tailwindcss').Config} TailwindConfig | ||
*/ | ||
const defaultTailwindConfig = /** @type {TailwindConfig} */ ({ | ||
darkMode: false, | ||
theme: {}, | ||
}); | ||
@@ -24,3 +20,3 @@ /** | ||
* minus the file extension. | ||
* @param {object} [options] | ||
* @param {object} options | ||
* @param {TailwindConfig} [options.tailwindConfig] | ||
@@ -30,6 +26,3 @@ * Optional tailwind config object | ||
*/ | ||
export async function buildCSS( | ||
inputs, | ||
{ tailwindConfig = defaultTailwindConfig } = {} | ||
) { | ||
export async function buildCSS(inputs, { tailwindConfig } = {}) { | ||
const outDir = 'build/styles'; | ||
@@ -39,3 +32,3 @@ const minify = process.env.NODE_ENV === 'production'; | ||
/** @type {typeof import('tailwindcss')} */ | ||
/** @type {import('postcss').PluginCreator<TailwindConfig>} */ | ||
let tailwindcss; | ||
@@ -61,3 +54,3 @@ try { | ||
const optionalPlugins = []; | ||
if (tailwindcss) { | ||
if (tailwindcss && tailwindConfig) { | ||
optionalPlugins.push(tailwindcss(tailwindConfig)); | ||
@@ -64,0 +57,0 @@ } |
@@ -5,3 +5,3 @@ import { mkdirSync, writeFileSync } from 'fs'; | ||
import { program } from 'commander'; | ||
import glob from 'glob'; | ||
import { globSync } from 'glob'; | ||
import log from 'fancy-log'; | ||
@@ -48,3 +48,5 @@ | ||
bootstrapFile, | ||
...glob.sync(testsPattern).filter(path => (grep ? path.match(grep) : true)), | ||
...globSync(testsPattern) | ||
.filter(path => (grep ? path.match(grep) : true)) | ||
.sort(), | ||
]; | ||
@@ -51,0 +53,0 @@ |
{ | ||
"name": "@hypothesis/frontend-build", | ||
"version": "1.2.0", | ||
"version": "2.0.0", | ||
"description": "Hypothesis frontend build scripts", | ||
@@ -16,8 +16,8 @@ "type": "module", | ||
"devDependencies": { | ||
"@types/fancy-log": "^1.3.1", | ||
"@types/glob": "^7.1.4", | ||
"@types/fancy-log": "^2.0.0", | ||
"@types/glob": "^8.0.0", | ||
"@types/karma": "^6.3.1", | ||
"@types/node": "^16.11.1", | ||
"@types/node": "^18.0.0", | ||
"@types/sass": "^1.16.1", | ||
"@types/tailwindcss": "^2.2.4", | ||
"@types/tailwindcss": "^3.0.2", | ||
"autoprefixer": "^10.3.7", | ||
@@ -28,11 +28,11 @@ "eslint": "^8.0.1", | ||
"prettier": "^2.4.1", | ||
"rollup": "^2.58.0", | ||
"rollup": "^3.2.2", | ||
"sass": "^1.43.2", | ||
"tailwindcss": "^2.2.19", | ||
"typescript": "^4.4.4" | ||
"tailwindcss": "^3.0.11", | ||
"typescript": "^5.0.2" | ||
}, | ||
"dependencies": { | ||
"commander": "^8.2.0", | ||
"fancy-log": "^1.3.3", | ||
"glob": "^7.2.0" | ||
"commander": "^10.0.0", | ||
"fancy-log": "^2.0.0", | ||
"glob": "^10.0.0" | ||
}, | ||
@@ -43,5 +43,5 @@ "peerDependencies": { | ||
"postcss": "^8.3.9", | ||
"rollup": "^2.58.0", | ||
"rollup": "^3.2.2", | ||
"sass": "^1.43.2", | ||
"tailwindcss": "^2.2.19" | ||
"tailwindcss": "^3.0.11" | ||
}, | ||
@@ -48,0 +48,0 @@ "peerDependenciesMeta": { |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
15582
296
+ Added@alloc/quick-lru@5.2.0(transitive)
+ Added@isaacs/cliui@8.0.2(transitive)
+ Added@jridgewell/gen-mapping@0.3.8(transitive)
+ Added@jridgewell/resolve-uri@3.1.2(transitive)
+ Added@jridgewell/set-array@1.2.1(transitive)
+ Added@jridgewell/sourcemap-codec@1.5.0(transitive)
+ Added@jridgewell/trace-mapping@0.3.25(transitive)
+ Added@pkgjs/parseargs@0.11.0(transitive)
+ Addedansi-regex@6.1.0(transitive)
+ Addedansi-styles@6.2.1(transitive)
+ Addedany-promise@1.3.0(transitive)
+ Addedbrace-expansion@2.0.1(transitive)
+ Addedcommander@10.0.14.1.1(transitive)
+ Addedcross-spawn@7.0.6(transitive)
+ Addedeastasianwidth@0.2.0(transitive)
+ Addedemoji-regex@9.2.2(transitive)
+ Addedfancy-log@2.0.0(transitive)
+ Addedforeground-child@3.3.0(transitive)
+ Addedglob@10.4.5(transitive)
+ Addedis-core-module@2.16.0(transitive)
+ Addedisexe@2.0.0(transitive)
+ Addedjackspeak@3.4.3(transitive)
+ Addedjiti@1.21.7(transitive)
+ Addedlilconfig@3.1.3(transitive)
+ Addedlru-cache@10.4.3(transitive)
+ Addedminimatch@9.0.5(transitive)
+ Addedminipass@7.1.2(transitive)
+ Addedmz@2.7.0(transitive)
+ Addedobject-hash@3.0.0(transitive)
+ Addedpackage-json-from-dist@1.0.1(transitive)
+ Addedpath-key@3.1.1(transitive)
+ Addedpath-scurry@1.11.1(transitive)
+ Addedpify@2.3.0(transitive)
+ Addedpirates@4.0.6(transitive)
+ Addedpostcss-import@15.1.0(transitive)
+ Addedpostcss-js@4.0.1(transitive)
+ Addedpostcss-load-config@4.0.2(transitive)
+ Addedpostcss-nested@6.2.0(transitive)
+ Addedread-cache@1.0.0(transitive)
+ Addedrollup@3.29.5(transitive)
+ Addedshebang-command@2.0.0(transitive)
+ Addedshebang-regex@3.0.0(transitive)
+ Addedsignal-exit@4.1.0(transitive)
+ Addedstring-width@5.1.2(transitive)
+ Addedstrip-ansi@7.1.0(transitive)
+ Addedsucrase@3.35.0(transitive)
+ Addedtailwindcss@3.4.17(transitive)
+ Addedthenify@3.3.1(transitive)
+ Addedthenify-all@1.6.0(transitive)
+ Addedts-interface-checker@0.1.13(transitive)
+ Addedwhich@2.0.2(transitive)
+ Addedwrap-ansi@8.1.0(transitive)
+ Addedyaml@2.6.1(transitive)
- Removed@babel/code-frame@7.26.2(transitive)
- Removed@babel/helper-validator-identifier@7.25.9(transitive)
- Removed@types/parse-json@4.0.2(transitive)
- Removedacorn@7.4.1(transitive)
- Removedacorn-node@1.8.2(transitive)
- Removedacorn-walk@7.2.0(transitive)
- Removedansi-gray@0.1.1(transitive)
- Removedansi-wrap@0.1.0(transitive)
- Removedcallsites@3.1.0(transitive)
- Removedchalk@4.1.2(transitive)
- Removedcolor@4.2.3(transitive)
- Removedcolor-string@1.9.1(transitive)
- Removedcommander@8.3.0(transitive)
- Removedcosmiconfig@7.1.0(transitive)
- Removedcss-color-names@0.0.4(transitive)
- Removedcss-unit-converter@1.1.2(transitive)
- Removeddefined@1.0.1(transitive)
- Removeddetective@5.2.1(transitive)
- Removederror-ex@1.3.2(transitive)
- Removedfancy-log@1.3.3(transitive)
- Removedfs-extra@10.1.0(transitive)
- Removedhas-flag@4.0.0(transitive)
- Removedhex-color-regex@1.1.0(transitive)
- Removedhsl-regex@1.0.0(transitive)
- Removedhsla-regex@1.0.0(transitive)
- Removedhtml-tags@3.3.1(transitive)
- Removedimport-fresh@3.3.0(transitive)
- Removedis-arrayish@0.2.10.3.2(transitive)
- Removedis-color-stop@1.1.0(transitive)
- Removedis-core-module@2.16.1(transitive)
- Removedjs-tokens@4.0.0(transitive)
- Removedjson-parse-even-better-errors@2.3.1(transitive)
- Removedjsonfile@6.1.0(transitive)
- Removedlilconfig@2.1.0(transitive)
- Removedlodash.topath@4.5.2(transitive)
- Removedmodern-normalize@1.1.0(transitive)
- Removednode-emoji@1.11.0(transitive)
- Removedobject-hash@2.2.0(transitive)
- Removedparent-module@1.0.1(transitive)
- Removedparse-json@5.2.0(transitive)
- Removedparse-node-version@1.0.1(transitive)
- Removedpath-type@4.0.0(transitive)
- Removedpostcss-js@3.0.3(transitive)
- Removedpostcss-load-config@3.1.4(transitive)
- Removedpostcss-nested@5.0.6(transitive)
- Removedpostcss-value-parser@3.3.1(transitive)
- Removedpretty-hrtime@1.0.3(transitive)
- Removedpurgecss@4.1.3(transitive)
- Removedquick-lru@5.1.1(transitive)
- Removedreduce-css-calc@2.1.8(transitive)
- Removedresolve-from@4.0.0(transitive)
- Removedrgb-regex@1.0.1(transitive)
- Removedrgba-regex@1.0.0(transitive)
- Removedrollup@2.79.2(transitive)
- Removedsimple-swizzle@0.2.2(transitive)
- Removedsupports-color@7.2.0(transitive)
- Removedtailwindcss@2.2.19(transitive)
- Removedtime-stamp@1.1.0(transitive)
- Removeduniversalify@2.0.1(transitive)
- Removedxtend@4.0.2(transitive)
- Removedyaml@1.10.2(transitive)
Updatedcommander@^10.0.0
Updatedfancy-log@^2.0.0
Updatedglob@^10.0.0