Skip to content

Commit afa3897

Browse files
authored
Merge pull request #569 from eemeli/workspacing
Add npm workspaces & tool-specific config files, drop make
2 parents a68c20e + c09e7aa commit afa3897

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

61 files changed

+20764
-23012
lines changed

.eslintrc.yaml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,14 @@ root: true
33
env:
44
es6: true
55

6+
parserOptions:
7+
ecmaVersion: 2018
8+
sourceType: module
9+
610
overrides:
711
- files: ["*/src/*.js"]
812
extends:
913
- ./eslint-base.yaml
10-
parserOptions:
11-
ecmaVersion: 9
12-
sourceType: module
1314

1415
- files: ["*/src/*.ts"]
1516
parser: "@typescript-eslint/parser"

.github/workflows/fluent-bundle.yml

Lines changed: 0 additions & 26 deletions
This file was deleted.

.github/workflows/fluent-dedent.yml

Lines changed: 0 additions & 26 deletions
This file was deleted.

.github/workflows/fluent-gecko.yml

Lines changed: 0 additions & 32 deletions
This file was deleted.

.github/workflows/fluent-langneg.yml

Lines changed: 0 additions & 26 deletions
This file was deleted.

.github/workflows/fluent-sequence.yml

Lines changed: 0 additions & 26 deletions
This file was deleted.

.github/workflows/fluent-syntax.yml

Lines changed: 0 additions & 26 deletions
This file was deleted.
Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,25 @@
1-
name: "@fluent/dom"
1+
name: legacy
22
on:
33
push:
44
branches: [master]
55
pull_request:
66
branches: [master]
7+
workflow_dispatch:
78
jobs:
89
dist:
910
runs-on: ubuntu-latest
1011
strategy:
1112
matrix:
12-
node: [12.x, 14.x, 16.x]
13+
node: [12.x, 14.x]
1314
steps:
1415
- uses: actions/checkout@v2
1516
- name: Use Node.js ${{matrix.node}}
1617
uses: actions/setup-node@v1
1718
with:
1819
node-version: ${{matrix.node}}
19-
- name: Install build tools
20-
run: npm ci
21-
- name: Install package dependencies
22-
working-directory: ./fluent-dom
23-
run: npm ci
24-
- name: make dist
25-
working-directory: ./fluent-dom
26-
run: make dist
20+
- run: npm install --global npm@7
21+
- run: npm ci
22+
- run: npm run build --workspaces
23+
- run: npm test
24+
- run: npm run lint
25+
- run: npm run docs --workspaces
Lines changed: 8 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,24 @@
1-
name: "@fluent/react"
1+
name: test
22
on:
33
push:
44
branches: [master]
55
pull_request:
66
branches: [master]
7+
workflow_dispatch:
78
jobs:
89
dist:
910
runs-on: ubuntu-latest
1011
strategy:
1112
matrix:
12-
node: [12.x, 14.x, 16.x]
13+
node: [16.x]
1314
steps:
1415
- uses: actions/checkout@v2
1516
- name: Use Node.js ${{matrix.node}}
1617
uses: actions/setup-node@v1
1718
with:
1819
node-version: ${{matrix.node}}
19-
- name: Install build tools
20-
run: npm ci
21-
- name: Install package dependencies
22-
working-directory: ./fluent-react
23-
run: npm ci
24-
- name: make dist
25-
working-directory: ./fluent-react
26-
run: make dist
20+
- run: npm ci
21+
- run: npm run build --workspaces
22+
- run: npm test
23+
- run: npm run lint
24+
- run: npm run docs --workspaces

.mocharc.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
ignore:
2+
- fluent-dom/**
3+
- fluent-react/**
4+
ui: tdd

README.md

Lines changed: 13 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -74,26 +74,25 @@ Hacking on `fluent.js` is easy! To quickly get started clone the repo:
7474
$ git clone https://github.com/projectfluent/fluent.js.git
7575
$ cd fluent.js
7676

77-
You'll need at least Node.js 12 LTS. Older versions are not supported.
77+
You'll need at least **Node.js 12** and **npm v7**.
78+
Older versions are not supported.
7879

79-
Install the build tools used by all packages (Babel, Rollup, Mocha etc.):
80+
Install the dependencies used by all packages, which are managed as
81+
[npm workspaces](https://docs.npmjs.com/cli/v7/using-npm/workspaces):
8082

8183
$ npm install
8284

83-
Install dependencies of individual `fluent.js` packages which are required for
84-
passing tests:
85+
Build and test all packages at once:
8586

86-
$ make deps
87-
88-
Build all packages at once:
89-
90-
$ make
87+
$ npm run dist
9188

9289
…which is equivalent to:
9390

94-
$ make lint
95-
$ make test
96-
$ make build
91+
$ npm run clean
92+
$ npm run build --workspaces
93+
$ npm run lint
94+
$ npm run test
95+
$ npm run docs --workspaces
9796

98-
You can also `cd` into a package's directory and issue the above `make`
99-
commands from there. Only this one package will be affected.
97+
Each package may also be built separately by running `npm run build` in
98+
its directory.

common.mk

Lines changed: 0 additions & 55 deletions
This file was deleted.

fluent-bundle/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# @fluent/bundle ![](https://github.com/projectfluent/fluent.js/workflows/@fluent/bundle/badge.svg)
1+
# @fluent/bundle ![](https://github.com/projectfluent/fluent.js/workflows/test/badge.svg)
22

33
`@fluent/bundle` is a JavaScript implementation of [Project Fluent][],
44
optimized for runtime performance.

fluent-bundle/esm/package.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"type": "module"
3+
}

0 commit comments

Comments
 (0)