mirror of
https://gerrit.wikimedia.org/r/mediawiki/skins/Vector.git
synced 2024-11-13 17:57:06 +00:00
6907c81a15
Fixes the missing images in the Logo story. The current method of downloading the images into docs/ui/assets and treating them as static assets (with the start-storybook -s option) could be problematic if that directory is deleted or "cleaned" before the storybook build. Instead, the images are now downloaded into ./storybook/resolve-imports and imported explicitly in the code in Logo.stories.data.js. * ./storybook/resolve-less-imports renamed to resolve-imports * .gitignore is updated to reflect that * Webpack config is updated with the `resolve-imports` path * static option (-s) is removed from npm start script * Images are explicitly imported in Logo.stories.data.js * Type definitions are added for .svg and .png files Change-Id: I242d229242c86a5784d6d4611d0b9c7049712dac
42 lines
1.5 KiB
JSON
42 lines
1.5 KiB
JSON
{
|
|
"private": true,
|
|
"scripts": {
|
|
"start": "dev-scripts/setup-storybook.sh && start-storybook --quiet -p 6006",
|
|
"test": "npm -s run lint && tsc && npm -s run doc",
|
|
"test:size": "node ./tests/resource-loader-bundlesize.js",
|
|
"lint": "npm -s run lint:js && npm -s run lint:styles && npm -s run lint:i18n",
|
|
"lint:fix:js": "npm -s run lint:js -- --fix",
|
|
"lint:fix:styles": "npm -s run lint:styles -- --fix",
|
|
"lint:js": "eslint --cache --max-warnings 0 .",
|
|
"lint:styles": "stylelint \"**/*.{less,css}\"",
|
|
"lint:i18n": "banana-checker --requireLowerCase=0 i18n/",
|
|
"selenium-test": "npm -s run test:size",
|
|
"doc": "jsdoc -c jsdoc.json && npm run build-storybook",
|
|
"build-storybook": "dev-scripts/setup-storybook.sh && build-storybook --quiet --loglevel warn -o docs/ui",
|
|
"svgmin": "svgo --config=.svgo.yml -q -r -f resources/",
|
|
"pre-commit": "[ \"${PRE_COMMIT:-1}\" -eq 0 ] || npm -s t"
|
|
},
|
|
"pre-commit": "pre-commit",
|
|
"devDependencies": {
|
|
"@babel/core": "7.7.7",
|
|
"@storybook/html": "5.2.8",
|
|
"@types/jquery": "3.3.33",
|
|
"@types/mustache": "4.0.1",
|
|
"@types/node-fetch": "2.5.7",
|
|
"babel-loader": "8.0.6",
|
|
"bundlesize": "0.18.0",
|
|
"eslint-config-wikimedia": "0.17.0",
|
|
"grunt-banana-checker": "0.9.0",
|
|
"jsdoc": "3.6.3",
|
|
"jsdoc-wmf-theme": "0.0.3",
|
|
"less": "3.8.1",
|
|
"less-loader": "4.1.0",
|
|
"mustache": "3.0.1",
|
|
"node-fetch": "2.6.1",
|
|
"pre-commit": "1.2.2",
|
|
"stylelint-config-wikimedia": "0.10.1",
|
|
"svgo": "1.3.2",
|
|
"typescript": "3.8.3"
|
|
}
|
|
}
|