Skip to content

Commit 960426d

Browse files
committed
Move all templates out of cli into renderers
1 parent 44abd49 commit 960426d

File tree

165 files changed

+318
-780
lines changed

Some content is hidden

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

165 files changed

+318
-780
lines changed

code/.eslintrc.js

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -150,5 +150,12 @@ module.exports = {
150150
'no-undef': 'off', // ignore "window" undef errors
151151
},
152152
},
153+
{
154+
// Because those templates reference css files in other directory.
155+
files: ['**/template/cli/**/*'],
156+
rules: {
157+
'import/no-unresolved': 'off',
158+
},
159+
},
153160
],
154161
};

code/frameworks/angular/package.json

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -20,18 +20,18 @@
2020
"url": "https://opencollective.com/storybook"
2121
},
2222
"license": "MIT",
23-
"main": "dist/types/index.js",
24-
"module": "dist/types/index.js",
25-
"types": "dist/types/index.d.ts",
23+
"main": "dist/index.js",
24+
"types": "dist/index.d.ts",
2625
"files": [
2726
"dist/**/*",
27+
"template/**/*",
2828
"README.md",
2929
"*.js",
3030
"*.d.ts"
3131
],
3232
"scripts": {
33-
"check": "../../../scripts/node_modules/.bin/tsc --noEmit",
34-
"prep": "node ../../../scripts/prepare.js"
33+
"check": "../../../scripts/node_modules/.bin/tsc",
34+
"prep": "rimraf dist && ../../../scripts/node_modules/.bin/tsc --project tsconfig.build.json && echo \"Preventing passing flags to tsc\""
3535
},
3636
"dependencies": {
3737
"@storybook/addons": "7.0.0-alpha.46",
@@ -77,11 +77,13 @@
7777
"@angular/platform-browser": "^13.3.6",
7878
"@angular/platform-browser-dynamic": "^13.3.6",
7979
"@nrwl/workspace": "14.6.1",
80+
"@types/rimraf": "^3.0.2",
8081
"@types/tmp": "^0.2.3",
8182
"cross-spawn": "^7.0.3",
8283
"jest": "^27.5.1",
8384
"jest-preset-angular": "^12.0.0",
8485
"jest-specific-snapshot": "^5.0.0",
86+
"rimraf": "^3.0.2",
8587
"tmp": "^0.2.1",
8688
"typescript": "~4.6.3",
8789
"webpack": "5",
@@ -119,6 +121,6 @@
119121
"publishConfig": {
120122
"access": "public"
121123
},
122-
"builders": "dist/types/builders/builders.json",
124+
"builders": "dist/builders/builders.json",
123125
"gitHead": "c64b5be851ed2affac56e1daaac3f453fbe6f230"
124126
}

code/frameworks/angular/preset.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
module.exports = require('./dist/types/preset');
1+
module.exports = require('./dist/preset');
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
export * from './dist/types/renderer.d';
1+
export * from './dist/renderer.d';
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
module.exports = require('./dist/types/renderer');
1+
module.exports = require('./dist/renderer');

code/frameworks/angular/src/server/framework-preset-angular-docs.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,5 +4,5 @@ import { hasDocsOrControls } from '@storybook/docs-tools';
44

55
export const previewAnnotations: StorybookConfig['previewAnnotations'] = (entry = [], options) => {
66
if (!hasDocsOrControls(options)) return entry;
7-
return [...entry, path.join(__dirname, '../../../dist/types/client/docs/config')];
7+
return [...entry, path.join(__dirname, '../../dist/client/docs/config')];
88
};
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
{
2+
"rules": {
3+
"@typescript-eslint/consistent-type-imports": ["error", { "disallowTypeAnnotations": false }]
4+
}
5+
}

code/lib/cli/rendererAssets/angular/Button.stories.ts renamed to code/frameworks/angular/template/cli/Button.stories.ts

File renamed without changes.

code/lib/cli/rendererAssets/angular/Header.stories.ts renamed to code/frameworks/angular/template/cli/Header.stories.ts

File renamed without changes.
File renamed without changes.

0 commit comments

Comments
 (0)