Skip to content

Commit 69f6cba

Browse files
authored
chore(ci): Allows for publishing to npm (#34)
1 parent 1370e1f commit 69f6cba

File tree

11 files changed

+86
-14803
lines changed

11 files changed

+86
-14803
lines changed

.changeset/README.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
# Changesets
2+
3+
Hello and welcome! This folder has been automatically generated by `@changesets/cli`, a build tool that works
4+
with multi-package repos, or single-package repos to help you version and publish your code. You can
5+
find the full documentation for it [in our repository](https://github.com/changesets/changesets)
6+
7+
We have a quick list of common questions to get you started engaging with this project in
8+
[our documentation](https://github.com/changesets/changesets/blob/master/docs/common-questions.md)

.changeset/config.json

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
{
2+
"$schema": "https://unpkg.com/@changesets/[email protected]/schema.json",
3+
"changelog": "@changesets/cli/changelog",
4+
"commit": false,
5+
"linked": [
6+
["@module-federation/dashboard", "@module-federation/dashboard-plugin"]
7+
],
8+
"access": "public",
9+
"baseBranch": "master",
10+
"updateInternalDependencies": "patch"
11+
}
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"@module-federation/dashboard-plugin": patch
3+
---
4+
5+
Allows for publishing to npm

.github/workflows/release.yml

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
name: Release
2+
3+
on:
4+
push:
5+
branches: [master]
6+
7+
jobs:
8+
release:
9+
name: Release
10+
runs-on: ubuntu-latest
11+
env:
12+
CI: true
13+
steps:
14+
- uses: actions/checkout@master
15+
with:
16+
fetch-depth: 0
17+
18+
- name: Setup environment
19+
id: setups
20+
run: |-
21+
echo "::set-output name=yarn_cache::$(yarn cache dir)"
22+
echo "::set-output name=node_version::$(cat .nvmrc)"
23+
24+
- name: Setup Node ${{ steps.setups.outputs.node_version }}
25+
uses: actions/setup-node@master
26+
with:
27+
node-version: ${{ steps.setups.outputs.node_version }}
28+
29+
- name: Yarn cache
30+
uses: actions/cache@v1
31+
with:
32+
path: ${{ steps.setups.outputs.yarn_cache }}
33+
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}-node-${{ steps.setups.outputs.node_version }}
34+
35+
- run: yarn --frozen-lockfile
36+
37+
- name: Create Release or Publish
38+
uses: changesets/action@master
39+
with:
40+
publish: yarn release
41+
env:
42+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
43+
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ npm-debug.log*
55
yarn-debug.log*
66
yarn-error.log*
77
lerna-debug.log*
8+
*.lock
89

910
# Diagnostic reports (https://nodejs.org/api/report.html)
1011
report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json

.nvmrc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
v14.4.0

dashboard-fe/package.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,7 @@
55
"scripts": {
66
"dev": "next dev -p 3000",
77
"build": "next build",
8-
"start": "next start",
9-
"postinstall": "next build"
8+
"start": "next start"
109
},
1110
"bin": {
1211
"mfdash": "./bin/mfdash.js"

dashboard-plugin/.npmignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
tests/

dashboard-plugin/package.json

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,23 @@
11
{
2-
"private": true,
32
"name": "@module-federation/dashboard-plugin",
4-
"version": "1.0.0",
3+
"version": "0.1.0",
54
"main": "FederationDashboardPlugin.js",
65
"license": "MIT",
76
"scripts": {
8-
"build": "echo noop",
9-
"deploy": "echo noop",
10-
"dev": "echo noop",
11-
"setup": "echo noop",
127
"test": "jest --watch"
138
},
149
"dependencies": {
1510
"@module-federation/automatic-vendor-federation": "^1.0.1",
1611
"flatted": "^2.0.2",
17-
"node-fetch": "^2.6.0",
12+
"node-fetch": "^2.6.0"
13+
},
14+
"peerDependencies": {
1815
"webpack": "^5.0.0-beta.16",
1916
"webpack-sources": "^1.4.3"
2017
},
2118
"devDependencies": {
22-
"jest": "26.0.1"
19+
"jest": "26.0.1",
20+
"webpack": "^5.0.0-beta.16",
21+
"webpack-sources": "^1.4.3"
2322
}
2423
}

package.json

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,17 +14,22 @@
1414
]
1515
},
1616
"devDependencies": {
17+
"@changesets/cli": "^2.8.0",
18+
"concurrently": "5.2.0",
1719
"husky": "4.2.5",
1820
"lerna": "3.20.2",
1921
"prettier": "2.0.4",
20-
"pretty-quick": "2.0.1",
21-
"concurrently": "5.2.0"
22+
"pretty-quick": "2.0.1"
2223
},
2324
"scripts": {
2425
"submodules": "git pull --recurse-submodules",
25-
"build": "yarn --force",
26+
"release": "changeset publish",
2627
"prettier": "prettier --write \"**/*.{js,json,md,ts,tsx}\"",
2728
"wipe": "find . -name \"node_modules\" -exec rm -rf '{}' +\nfind . -name \"yarn.lock\" -exec rm -rf '{}' +",
2829
"prettier:check": "prettier --list-different \"**/*.{js,json,md,ts,tsx}\""
30+
},
31+
"volta": {
32+
"node": "14.4.0",
33+
"yarn": "1.22.4"
2934
}
3035
}

0 commit comments

Comments
 (0)