Skip to content
This repository was archived by the owner on Mar 4, 2020. It is now read-only.

Commit f3fe241

Browse files
committed
Everybody gets a package
1 parent 236a5ce commit f3fe241

33 files changed

+896
-1241
lines changed

.eslintrc.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
{
2-
"extends": ["./packages/internal-tooling/eslint/index.js"],
2+
"extends": ["./build/eslint/index.js"],
33
"root": true
44
}

build/.eslintrc.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"extends": ["../packages/internal-tooling/eslint/index.js"],
2+
"extends": ["./eslint/index.js"],
33
"rules": {
44
"no-console": "off"
55
},
File renamed without changes.
File renamed without changes.
File renamed without changes.

build/gulp/plugins/gulp-webpack.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
import webpack from 'webpack'
22
import config from '../../../config'
3+
import { log, PluginError } from 'gulp-util'
34

45
const { __DEV__, __SKIP_ERRORS__ } = config.compiler_globals
5-
const { log, PluginError } = require('gulp-load-plugins')().util
66

77
const DEV_SKIP_ERRORS = __DEV__ && __SKIP_ERRORS__
88

build/gulp/serve.ts

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,10 @@ import express from 'express'
22

33
import historyApiFallback from 'connect-history-api-fallback'
44
import { Server } from 'http'
5+
import { colors, log } from 'gulp-util'
56

67
type Express = ReturnType<typeof express>
78

8-
const g = require('gulp-load-plugins')()
9-
10-
const { colors, log } = g.util
11-
129
const serve = (
1310
directoryPath: string,
1411
host: string,

build/gulp/tasks/bundle.ts

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,14 @@
11
import { task, series, parallel, src, dest } from 'gulp'
22
import babel from 'gulp-babel'
3+
import { log, PluginError } from 'gulp-util'
4+
import typescript from 'gulp-typescript'
35
import del from 'del'
46
import webpack from 'webpack'
57

68
import config from '../../../config'
79
import sh from '../sh'
810

9-
const g = require('gulp-load-plugins')()
10-
1111
const { paths } = config
12-
const { log, PluginError } = g.util
1312

1413
const packageName = config.package
1514

@@ -47,15 +46,15 @@ task('bundle:package:es', () =>
4746

4847
task('bundle:package:types', () => {
4948
const tsConfig = paths.base('build/tsconfig.json')
50-
const typescript = g.typescript.createProject(tsConfig, {
49+
const tsProject = typescript.createProject(tsConfig, {
5150
declaration: true,
5251
isolatedModules: false,
5352
module: 'esnext',
5453
})
5554

5655
return (
5756
src(componentsSrc)
58-
.pipe(typescript())
57+
.pipe(tsProject())
5958
// Write only the .d.ts files to dist/es (.js files are generated by bundle:package:es)
6059
.dts.pipe(dest(paths.packageDist(packageName, 'es')))
6160
)

build/gulp/tasks/docs.ts

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ import { dest, lastRun, parallel, series, src, task, watch } from 'gulp'
22
import chalk from 'chalk'
33
import cache from 'gulp-cache'
44
import remember from 'gulp-remember'
5+
import { log } from 'gulp-util'
56
import fs from 'fs'
67
import path from 'path'
78
import del from 'del'
@@ -24,9 +25,6 @@ import { Server } from 'http'
2425
import serve, { forceClose } from '../serve'
2526

2627
const { paths } = config
27-
const g = require('gulp-load-plugins')()
28-
29-
const { log } = g.util
3028

3129
const logWatchAdd = (filePath: string) => log('Created', chalk.blue(path.basename(filePath)))
3230
const logWatchChange = (filePath: string) => log('Changed', chalk.magenta(path.basename(filePath)))

build/gulp/tasks/perf.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import express from 'express'
22
import fs from 'fs'
33
import { series, task } from 'gulp'
4+
import { colors, log } from 'gulp-util'
45
import _ from 'lodash'
56
import ProgressBar from 'progress'
67
import puppeteer from 'puppeteer'
@@ -20,7 +21,6 @@ import webpackPlugin from '../plugins/gulp-webpack'
2021
import { safeLaunchOptions } from 'build/puppeteer.config'
2122

2223
const { paths } = config
23-
const { colors, log } = require('gulp-load-plugins')().util
2424

2525
const DEFAULT_RUN_TIMES = 10
2626
let server

build/gulp/tasks/stats.ts

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import fs from 'fs'
22
import { task, parallel, series } from 'gulp'
3+
import { log, PluginError } from 'gulp-util'
34
import _ from 'lodash'
45
import webpack from 'webpack'
56
import stableStringify from 'json-stable-stringify-without-jsonify'
@@ -8,10 +9,7 @@ import requestHttp from 'request-promise-native'
89

910
import config from '../../../config'
1011

11-
const g = require('gulp-load-plugins')()
12-
1312
const { paths } = config
14-
const { log, PluginError } = g.util
1513

1614
const UNRELEASED_VERSION_STRING = 'Unreleased'
1715
const SEMVER_MATCHER = /(\d+)\.(\d+)\.(\d+)/

build/gulp/tasks/test-projects.ts

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,11 +47,14 @@ const packProjectPackages = async (logger: Function): Promise<PackedPackages> =>
4747
const projectPackages = lernaAliases({ sourceDirectory: false })
4848

4949
// We don't want to pack a package with our dev tools
50+
delete projectPackages['@fluentui/digest']
51+
delete projectPackages['@fluentui/docs']
52+
delete projectPackages['@fluentui/e2e']
5053
delete projectPackages['@fluentui/eslint-plugin']
5154
delete projectPackages['@fluentui/internal-tooling']
52-
delete projectPackages['@fluentui/scripts']
53-
delete projectPackages['@fluentui/digest']
55+
delete projectPackages['@fluentui/perf']
5456
delete projectPackages['@fluentui/perf-test']
57+
delete projectPackages['@fluentui/scripts']
5558

5659
await Promise.all(
5760
Object.keys(projectPackages).map(async (packageName: string) => {
File renamed without changes.

build/package.json

Lines changed: 87 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,87 @@
1+
{
2+
"name": "@fluentui/internal-tooling",
3+
"version": "0.42.0",
4+
"license": "MIT",
5+
"dependencies": {
6+
"@babel/core": "^7.6.4",
7+
"@babel/plugin-proposal-class-properties": "^7.5.5",
8+
"@babel/plugin-syntax-dynamic-import": "^7.2.0",
9+
"@babel/plugin-transform-runtime": "^7.6.2",
10+
"@babel/preset-env": "^7.6.3",
11+
"@babel/preset-react": "^7.6.3",
12+
"@babel/preset-typescript": "^7.6.0",
13+
"@babel/register": "^7.4.4",
14+
"@babel/standalone": "^7.3.2",
15+
"@fluentui/eslint-plugin": "^0.42.0",
16+
"@mdx-js/loader": "^1.0.21",
17+
"@types/babel__traverse": "^7.0.4",
18+
"@types/express": "^4.16.1",
19+
"@types/gulp": "^4.0.6",
20+
"@types/gulp-babel": "6.1.29",
21+
"@types/gulp-cache": "^0.4.4",
22+
"@types/gulp-util": "^3.0.34",
23+
"@types/gulp-remember": "^0.0.31",
24+
"@types/jest-axe": "^2.2.3",
25+
"@types/jest": "^24.0.19",
26+
"@types/node": "^10.3.2",
27+
"@types/puppeteer": "^1.11.1",
28+
"@types/rimraf": "^2.0.2",
29+
"@types/webpack-dev-middleware": "^2.0.1",
30+
"@types/webpack-hot-middleware": "^2.16.3",
31+
"@typescript-eslint/eslint-plugin": "^2.5.0",
32+
"@typescript-eslint/parser": "^2.5.0",
33+
"babel-jest": "^24.5.0",
34+
"babel-loader": "^8.0.6",
35+
"babel-plugin-lodash": "^3.3.4",
36+
"circular-dependency-plugin": "^5.0.2",
37+
"clean-webpack-plugin": "^0.1.19",
38+
"connect-history-api-fallback": "^1.3.0",
39+
"copy-webpack-plugin": "^4.5.2",
40+
"del": "^5.1.0",
41+
"doctrine": "^2.0.0",
42+
"eslint": "^6.5.1",
43+
"eslint-config-airbnb": "^17.1.0",
44+
"eslint-config-prettier": "^4.1.0",
45+
"eslint-plugin-import": "^2.18.2",
46+
"eslint-plugin-jest": "^22.4.1",
47+
"eslint-plugin-jsx-a11y": "^6.2.1",
48+
"eslint-plugin-react-hooks": "^2.1.2",
49+
"eslint-plugin-react": "^7.16.0",
50+
"express": "^4.15.4",
51+
"extract-comments": "^1.0.0",
52+
"fork-ts-checker-webpack-plugin": "^1.3.3",
53+
"glob": "^7.1.2",
54+
"gulp": "^4.0.2",
55+
"gulp-babel": "^8.0.0",
56+
"gulp-cache": "^1.0.2",
57+
"gulp-remember": "^1.0.1",
58+
"gulp-typescript": "^5.0.0",
59+
"gulp-util": "^3.0.8",
60+
"html-webpack-plugin": "^4.0.0-beta.5",
61+
"jest": "^24.9.0",
62+
"jest-axe": "^3.1.1",
63+
"jest-react-fela": "^10.6.1",
64+
"json-stable-stringify-without-jsonify": "^1.0.1",
65+
"license-webpack-plugin": "^2.1.1",
66+
"portfinder": "^1.0.20",
67+
"prettier": "^1.19.1",
68+
"progress": "^2.0.3",
69+
"puppeteer": "^1.11.0",
70+
"react-hot-loader": "^4.12.15",
71+
"react-vis": "^1.11.6",
72+
"read-package-json": "^2.0.13",
73+
"request-promise-native": "^1.0.5",
74+
"rimraf": "^2.6.1",
75+
"semver": "^6.2.0",
76+
"through2": "^2.0.3",
77+
"tmp": "^0.0.33",
78+
"tsconfig-paths": "^3.7.0",
79+
"webpack": "^4.35.0",
80+
"webpack-bundle-analyzer": "^3.3.2",
81+
"webpack-dev-middleware": "^3.6.2",
82+
"webpack-hot-middleware": "^2.24.3"
83+
},
84+
"publishConfig": {
85+
"access": "public"
86+
}
87+
}

docs/.eslintrc.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"extends": ["../packages/internal-tooling/eslint/index.js"],
2+
"extends": ["@fluentui/internal-tooling/eslint/index.js"],
33
"rules": {
44
"no-alert": "off"
55
},

docs/package.json

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
{
2+
"name": "@fluentui/docs",
3+
"version": "0.42.0",
4+
"private": true,
5+
"license": "MIT",
6+
"dependencies": {
7+
"color": "^3.1.0",
8+
"copy-to-clipboard": "^3.0.8",
9+
"faker": "^4.1.0",
10+
"flat": "^4.1.0",
11+
"react-ace": "^5.1.2",
12+
"react-codesandboxer": "^3.1.3",
13+
"react-custom-scrollbars": "^4.2.1",
14+
"react-document-title": "^2.0.3",
15+
"react-element-to-jsx-string": "^14.0.2",
16+
"react-hot-loader": "^4.12.15",
17+
"react-markdown": "^4.0.8",
18+
"react-router-dom": "^5.0.1",
19+
"react-source-render": "4.0.0-1",
20+
"react-virtualized": "^9.21.1",
21+
"react-vis": "^1.11.6"
22+
23+
},
24+
"devDependencies": {
25+
"@fluentui/internal-tooling": "^0.42.0",
26+
"@types/color": "^3.0.0",
27+
"@types/faker": "^4.1.3",
28+
"@types/gulp": "^4.0.6",
29+
"@types/node": "^10.3.2",
30+
"@types/react-custom-scrollbars": "^4.0.5",
31+
"@types/react-router-dom": "^4.3.4",
32+
"gulp": "^4.0.2"
33+
},
34+
"publishConfig": {
35+
"access": "public"
36+
}
37+
}

e2e/package.json

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
{
2+
"name": "@fluentui/e2e",
3+
"version": "0.42.0",
4+
"private": true,
5+
"license": "MIT",
6+
"devDependencies": {
7+
"@fluentui/internal-tooling": "^0.42.0",
8+
"@fluentui/react": "^0.42.0",
9+
"@types/puppeteer": "^1.11.1",
10+
"@types/react-router-dom": "^4.3.4",
11+
"puppeteer": "^1.11.0",
12+
"react-router-dom": "^5.0.1"
13+
},
14+
"publishConfig": {
15+
"access": "public"
16+
}
17+
}

e2e/tsconfig.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
{
22
"extends": "../build/tsconfig.common.json",
33
"compilerOptions": {
4-
"module": "esnext"
4+
"module": "esnext",
5+
"allowSyntheticDefaultImports": true
56
},
67
"include": ["../packages/react/src", "../e2e", "../types"]
78
}

jest.config.js

Lines changed: 13 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,19 @@ const fs = require('fs')
88
const packagePaths = lernaAliases({ sourceDirectory: false })
99

1010
// Exclude packages which build with just, and other special packages
11-
const excludedPackages = ['@fluentui/internal-tooling']
12-
const projects = Object.keys(packagePaths).filter(
13-
packageName =>
14-
!excludedPackages.includes(packageName) &&
15-
!fs.existsSync(path.join(packagePaths[packageName], 'just.config.ts')),
16-
)
11+
const excludedPackages = [
12+
'@fluentui/docs',
13+
'@fluentui/e2e',
14+
'@fluentui/internal-tooling',
15+
'@fluentui/perf',
16+
]
17+
const projects = Object.keys(packagePaths)
18+
.filter(
19+
packageName =>
20+
!excludedPackages.includes(packageName) &&
21+
!fs.existsSync(path.join(packagePaths[packageName], 'just.config.ts')),
22+
)
23+
.map(packageName => projects[packageName])
1724

1825
module.exports = {
1926
coverageReporters,

lerna.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"packages": ["packages/*", "scripts"],
2+
"packages": ["packages/*", "scripts", "build", "docs", "e2e", "perf"],
33
"version": "0.42.0",
44
"npmClient": "yarn",
55
"useWorkspaces": true

0 commit comments

Comments
 (0)