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
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ dist.stats.json
bower_components
node_modules
temp
tmp
lib
lib-amd
lib-commonjs
Expand Down
37 changes: 37 additions & 0 deletions .verdaccio/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
# path to a directory with all packages
storage: ../tmp/local-registry/storage

# a list of other known repositories we can talk to
uplinks:
npmjs:
url: https://registry.npmjs.org/
maxage: 60m

packages:
# scoped packages
'@*/*':
access: $all
publish: $all
unpublish: $all

# if package is not available locally, proxy requests to npm registry
proxy: npmjs

'**':
# give all users (including non-authenticated users) full access
# because it is a local registry
access: $all
publish: $all
unpublish: $all

# if package is not available locally, proxy requests to npm registry
proxy: npmjs

# log settings
log:
type: stdout
format: pretty
level: warn

publish:
allow_offline: true # set offline to true to allow publish offline
3 changes: 3 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -379,5 +379,8 @@
"swc-loader": "^0.2.3",
"prettier": "2.8.8",
"puppeteer": "19.6.0"
},
"nx": {
"includedScripts": []
}
}
18 changes: 18 additions & 0 deletions project.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
{
"name": "@fluentui/fluentui-repo",
"$schema": "node_modules/nx/schemas/project-schema.json",
"targets": {
"prepare-local-registry": {
"command": "node ./tools/workspace-plugin/scripts/install-verdaccio"
},
"local-registry": {
"executor": "@nx/js:verdaccio",
"options": {
"port": 4873,
"config": ".verdaccio/config.yml",
"storage": "tmp/local-registry/storage"
},
"dependsOn": ["prepare-local-registry"]
}
}
}
21 changes: 21 additions & 0 deletions tools/workspace-plugin/scripts/install-verdaccio.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
// @ts-check
const { output, workspaceRoot, getPackageManagerCommand } = require('@nx/devkit');
const { execSync } = require('child_process');

main();

function main() {
output.logSingleLine('Preparing verdaccio...');

try {
require.resolve('verdaccio');
output.logSingleLine('Verdaccio already installed...✅');
} catch {
output.logSingleLine('Installing verdaccio...');
const pm = getPackageManagerCommand();
const cmd = `${pm} add -DW verdaccio@5 --ignore-scripts`;
execSync(cmd, { stdio: 'inherit', cwd: workspaceRoot });
}

output.logSingleLine('Verdaccio ready to start');
}