Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 0 additions & 25 deletions build/get-package-json.js

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"type": "none",
"comment": "Remove redundant package json scripts, normalize export paths",
"packageName": "@microsoft/fast-build",
"email": "7559015+janechu@users.noreply.github.com",
"dependentChangeType": "none"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"type": "none",
"comment": "Remove redundant package json scripts, normalize export paths",
"packageName": "@microsoft/fast-router",
"email": "7559015+janechu@users.noreply.github.com",
"dependentChangeType": "none"
}
25 changes: 0 additions & 25 deletions packages/fast-build/get-package-json.js

This file was deleted.

5 changes: 5 additions & 0 deletions packages/fast-build/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,11 @@
"bugs": {
"url": "https://github.com/microsoft/fast/issues/new/choose"
},
"exports": {
"./bin/fast.js": "./bin/fast.js",
"./wasm/microsoft_fast_build.js": "./wasm/microsoft_fast_build.js",
"./package.json": "./package.json"
},
"bin": {
"fast": "./bin/fast.js"
},
Expand Down
9 changes: 7 additions & 2 deletions packages/fast-router/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,13 @@
"bugs": {
"url": "https://github.com/Microsoft/fast/issues/new/choose"
},
"main": "dist/esm/index.js",
"types": "dist/dts/index.d.ts",
"exports": {
".": {
"default": "./dist/esm/index.js",
"types": "./dist/dts/index.d.ts"
},
"./package.json": "./package.json"
},
"type": "module",
"unpkg": "dist/fast-router.min.js",
"scripts": {
Expand Down
15 changes: 5 additions & 10 deletions sites/website/scripts/generate-docs.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@ const path = require("node:path");
const { createInterface } = require("node:readline");
const { execFile } = require("node:child_process");
const fs = require("fs-extra");
const { getPackageJsonDir } = require("@microsoft/fast-build/get-package-json.js");

// sites/website
const packagesRoot = path.resolve(__dirname, "../../../packages");
const projectRoot = path.resolve(__dirname, "../");
const apiDocumenterPath = require.resolve("@microsoft/api-documenter/lib/start");
const tempAPIDir = path.resolve(projectRoot, "tmp");
Expand Down Expand Up @@ -72,18 +72,16 @@ function runApiDocumenter(inputDir, outputDir) {
async function copyAPI() {
for (const pkg of packages) {
await safeCopy(
path.resolve(
getPackageJsonDir(`@microsoft/${pkg.main}`),
`./dist/${pkg.main}.api.json`,
),
path.resolve(packagesRoot, pkg.main, `./dist/${pkg.main}.api.json`),
`${tempAPIDir}/${pkg.main}.api.json`,
);

if (Array.isArray(pkg.exports)) {
for (const pkgExport of pkg.exports) {
await safeCopy(
path.resolve(
getPackageJsonDir(`@microsoft/${pkg.main}`),
packagesRoot,
pkg.main,
`./dist/${pkgExport}/${pkgExport}.api.json`,
),
`${tempAPIDir}/${pkg.main}/${pkgExport}/${pkgExport}.api.json`,
Expand Down Expand Up @@ -271,10 +269,7 @@ async function buildAPIMarkdown() {
}

async function buildSizesPage() {
const sizesSource = path.resolve(
getPackageJsonDir("@microsoft/fast-element"),
"SIZES.md",
);
const sizesSource = path.resolve(packagesRoot, "fast-element", "SIZES.md");

if (!fs.existsSync(sizesSource)) {
console.warn("SIZES.md not found, skipping export sizes page.");
Expand Down
Loading