Skip to content

Commit 59c85a3

Browse files
committed
feat: Enable root-level typedoc generation for the project.
- All local types have been pulled out to the project directory. - Packages moved to /packages/@css-blocks for module name generation. - typedoc.js configuration file added. - packages/css-blocks => packages/@css-blocks/core - packages/webpack-plugin => packages/@css-blocks/webpack. - packages/glimmer-templates => packages/@css-blocks/glimmer. - packages/runtime/src/runtime.ts => packages/@css-blocks/runtime/src/index.ts. - yarn run docs will generate a typedoc site at /docs. - TODO: Uses pre-built forked version of typedoc-plugin-external-module-map. Remove when merged.
1 parent 77cf0b9 commit 59c85a3

347 files changed

Lines changed: 964 additions & 533 deletions

File tree

Some content is hidden

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

CHANGELOG.md

Lines changed: 1 addition & 1 deletion

css-blocks.code-workspace

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,25 @@
11
{
22
"folders": [
33
{
4-
"path": "packages/css-blocks"
4+
"path": "packages/@css-blocks/broccoli"
55
},
66
{
7-
"path": "packages/glimmer-templates"
7+
"path": "packages/@css-blocks/code-style"
88
},
99
{
10-
"path": "packages/jsx"
10+
"path": "packages/@css-blocks/core"
1111
},
1212
{
13-
"path": "packages/runtime"
13+
"path": "packages/@css-blocks/glimmer"
1414
},
1515
{
16-
"path": "packages/webpack-plugin"
16+
"path": "packages/@css-blocks/jsx"
1717
},
1818
{
19-
"path": "packages/code-style"
19+
"path": "packages/@css-blocks/runtime"
20+
},
21+
{
22+
"path": "packages/@css-blocks/webpack"
2023
},
2124
{
2225
"path": ".",

package.json

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,8 @@
22
"private": true,
33
"scripts": {
44
"commitmsg": "commitlint --edit $GIT_PARAMS",
5-
"ci": "lerna run test"
5+
"ci": "lerna run test",
6+
"docs": "typedoc"
67
},
78
"devDependencies": {
89
"@commitlint/cli": "^6.1.0",
@@ -16,10 +17,12 @@
1617
"@types/babylon": "^6.16.1",
1718
"@types/chai": "^3.5.2",
1819
"@types/debug": "0.0.29",
20+
"@types/loader-utils": "^1.1.3",
1921
"@types/minimatch": "^2.0.29",
2022
"@types/mocha": "^2.2.41",
2123
"@types/node": "^8.0.0",
2224
"@types/prettier": "^1.8.0",
25+
"@types/tapable": "0.2.4",
2326
"chai": "^3.5.0",
2427
"husky": "^0.14.3",
2528
"istanbul": "^0.4.5",
@@ -38,11 +41,12 @@
3841
"test-console": "^1.1.0",
3942
"ts-node": "^3.0.4",
4043
"tslint": "^5.9.1",
41-
"typedoc": "^0.7.1",
44+
"typedoc": "^0.11.0",
4245
"typescript": "^2.8.1",
46+
"typedoc-plugin-external-module-map": "amiller-gh/typedoc-plugin-external-module-map#prebuilt",
4347
"watch": "^1.0.2"
4448
},
4549
"workspaces": [
46-
"packages/*"
50+
"packages/@css-blocks/*"
4751
]
4852
}

packages/broccoli-css-blocks/package.json renamed to packages/@css-blocks/broccoli/package.json

Lines changed: 12 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,11 @@
55
"main": "dist/src/index.js",
66
"author": "Adam Miller <ammiller@linkedin.com>",
77
"license": "MIT",
8-
"keywords": ["css-blocks", "css blocks", "broccoli-plugin"],
8+
"keywords": [
9+
"css-blocks",
10+
"css blocks",
11+
"broccoli-plugin"
12+
],
913
"scripts": {
1014
"test": "mocha --opts test/mocha.opts dist/test",
1115
"compile": "rm -rf dist && tsc -p tsconfig.json",
@@ -15,32 +19,31 @@
1519
"lint": "tslint -t msbuild --project . -c tslint.cli.json",
1620
"lintall": "tslint -t msbuild --project . -c tslint.release.json",
1721
"lintfix": "tslint -t msbuild --project . -c tslint.cli.json --fix",
18-
"coverage":
19-
"istanbul cover -i dist/src/**/*.js --dir ./build/coverage node_modules/mocha/bin/_mocha -- dist/test --opts test/mocha.opts",
20-
"remap":
21-
"remap-istanbul -i build/coverage/coverage.json -o coverage -t html",
22+
"coverage": "istanbul cover -i dist/src/**/*.js --dir ./build/coverage node_modules/mocha/bin/_mocha -- dist/test --opts test/mocha.opts",
23+
"remap": "remap-istanbul -i build/coverage/coverage.json -o coverage -t html",
2224
"docs": "typedoc --out ./docs .",
2325
"watch": "watch 'yarn run test' src test types-local --wait=1"
2426
},
2527
"devDependencies": {
2628
"@css-blocks/code-style": "^0.17.0",
27-
"@css-blocks/glimmer-templates": "^0.17.0"
29+
"@css-blocks/glimmer": "^0.17.0"
2830
},
2931
"dependencies": {
32+
"@css-blocks/core": "^0.17.0",
3033
"@glimmer/compiler": "^0.33.0",
3134
"@glimmer/syntax": "^0.33.0",
35+
"@opticss/template-api": "file:../../../../opticss/packages/template-api",
3236
"@types/recursive-readdir": "^2.2.0",
3337
"broccoli-funnel": "^2.0.1",
3438
"broccoli-merge-trees": "^3.0.0",
3539
"broccoli-plugin": "^1.3.0",
3640
"broccoli-test-helper": "^1.2.0",
3741
"colors": "^1.2.1",
38-
"css-blocks": "^0.17.0",
3942
"debug": "^3.1.0",
4043
"fs-extra": "^5.0.0",
41-
"opticss": "file:../../../opticss/packages/opticss",
44+
"opticss": "file:../../../../opticss/packages/opticss",
4245
"postcss": "^6.0.21",
4346
"recursive-readdir": "^2.2.2",
4447
"walk-sync": "^0.3.2"
4548
}
46-
}
49+
}

packages/broccoli-css-blocks/src/index.ts renamed to packages/@css-blocks/broccoli/src/index.ts

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,12 @@
11
import * as fs from "fs-extra";
22
import * as path from "path";
33

4-
import { Analyzer, BlockCompiler, StyleMapping } from "css-blocks";
4+
import { Analyzer, BlockCompiler, StyleMapping } from "@css-blocks/core";
5+
import { TemplateTypes } from "@opticss/template-api";
56
import { Optimizer } from "opticss";
67
import * as postcss from "postcss";
78
import * as readdir from "recursive-readdir";
89

9-
import { TemplateTypes } from "@opticss/template-api";
10-
1110
import { BroccoliPlugin } from "./utils";
1211

1312
export interface BroccoliOptions {
File renamed without changes.

packages/broccoli-css-blocks/test/plugin-test.ts renamed to packages/@css-blocks/broccoli/test/plugin-test.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
1-
import { GlimmerAnalyzer } from "@css-blocks/glimmer-templates";
1+
import { GlimmerAnalyzer } from "@css-blocks/glimmer";
22
import * as assert from "assert";
33
import { TempDir, buildOutput, createTempDir } from "broccoli-test-helper";
44

55
import { BroccoliCSSBlocks } from "../src/index";
66

7-
describe("Broccoli Plugin Test", function() {
7+
describe("Broccoli Plugin Test", function () {
88
let input: TempDir;
99

1010
beforeEach(async () => {
File renamed without changes.

packages/broccoli-css-blocks/tsconfig.json renamed to packages/@css-blocks/broccoli/tsconfig.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"extends": "../../tsconfig.json",
2+
"extends": "../../../tsconfig.json",
33
"compilerOptions": {
44
"outDir": "dist",
55
"baseUrl": "dist"
File renamed without changes.

0 commit comments

Comments
 (0)