Skip to content

Commit 3185677

Browse files
Chau TranChau Tran
authored andcommitted
feat: upgrade nx
1 parent a30a56a commit 3185677

20 files changed

Lines changed: 18019 additions & 29180 deletions

.eslintrc.json

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
{
22
"root": true,
33
"ignorePatterns": ["**/*"],
4-
"plugins": ["@nrwl/nx"],
4+
"plugins": ["@nx"],
55
"overrides": [
66
{
77
"files": ["*.ts", "*.tsx", "*.js", "*.jsx"],
88
"rules": {
9-
"@nrwl/nx/enforce-module-boundaries": [
9+
"@nx/enforce-module-boundaries": [
1010
"error",
1111
{
1212
"enforceBuildableLibDependency": true,
@@ -23,12 +23,12 @@
2323
},
2424
{
2525
"files": ["*.ts", "*.tsx"],
26-
"extends": ["plugin:@nrwl/nx/typescript"],
26+
"extends": ["plugin:@nx/typescript"],
2727
"rules": {}
2828
},
2929
{
3030
"files": ["*.js", "*.jsx"],
31-
"extends": ["plugin:@nrwl/nx/javascript"],
31+
"extends": ["plugin:@nx/javascript"],
3232
"rules": {}
3333
},
3434
{
@@ -43,5 +43,6 @@
4343
"parser": "jsonc-eslint-parser",
4444
"rules": {}
4545
}
46-
]
46+
],
47+
"extends": [null, "plugin:storybook/recommended"]
4748
}

jest.config.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { getJestProjects } from '@nrwl/jest';
1+
import { getJestProjects } from '@nx/jest';
22

33
export default {
44
projects: getJestProjects(),

jest.preset.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
const nxPreset = require('@nrwl/jest/preset').default;
1+
const nxPreset = require('@nx/jest/preset').default;
22

33
module.exports = {
44
...nxPreset,

libs/angular-three-soba/.eslintrc.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,11 +17,11 @@
1717
"@typescript-eslint/member-ordering": "off",
1818
"@typescript-eslint/no-non-null-assertion": "off"
1919
},
20-
"extends": ["plugin:@nrwl/nx/angular", "plugin:@angular-eslint/template/process-inline-templates"]
20+
"extends": ["plugin:@nx/angular", "plugin:@angular-eslint/template/process-inline-templates"]
2121
},
2222
{
2323
"files": ["*.html"],
24-
"extends": ["plugin:@nrwl/nx/angular-template"],
24+
"extends": ["plugin:@nx/angular-template"],
2525
"rules": {}
2626
}
2727
]
Lines changed: 27 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,29 @@
1-
const { resolve } = require('path');
2-
1+
const {
2+
resolve
3+
} = require('path');
34
module.exports = {
4-
core: { builder: 'webpack5' },
5-
stories: ['../src/**/*.stories.mdx', '../src/**/*.stories.@(js|jsx|ts|tsx)'],
6-
addons: ['@storybook/addon-essentials'],
7-
webpackFinal: async (config, { configType }) => {
8-
// apply any global webpack configs that might have been specified in .storybook/main.js
9-
10-
// add your own webpack tweaks if needed
11-
config.module.rules.push({
12-
test: /\.(glsl|vs|fs|vert|frag)$/,
13-
exclude: /node_modules/,
14-
use: ['raw-loader', 'glslify-loader'],
15-
include: resolve(__dirname, '../'),
16-
});
5+
stories: ['../src/**/*.stories.mdx', '../src/**/*.stories.@(js|jsx|ts|tsx)'],
6+
addons: ['@storybook/addon-essentials'],
7+
webpackFinal: async (config, {
8+
configType
9+
}) => {
10+
// apply any global webpack configs that might have been specified in .storybook/main.js
1711

18-
return config;
19-
},
20-
staticDirs: ['./public'],
21-
};
12+
// add your own webpack tweaks if needed
13+
config.module.rules.push({
14+
test: /\.(glsl|vs|fs|vert|frag)$/,
15+
exclude: /node_modules/,
16+
use: ['raw-loader', 'glslify-loader'],
17+
include: resolve(__dirname, '../')
18+
});
19+
return config;
20+
},
21+
staticDirs: ['./public'],
22+
framework: {
23+
name: '@storybook/angular',
24+
options: {}
25+
},
26+
docs: {
27+
autodocs: true
28+
}
29+
};

libs/angular-three-soba/.storybook/preview-body.html

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,7 @@
11
<style>
22
html,
3-
body {
4-
width: 100%;
5-
height: 100%;
6-
background-color: #121212;
7-
}
8-
9-
#root {
3+
body,
4+
#storybook-root {
105
width: 100%;
116
height: 100%;
127
background-color: #121212;
Binary file not shown.

libs/angular-three-soba/ng-package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,5 +11,5 @@
1111
"output": "assets"
1212
}
1313
],
14-
"allowedNonPeerDependencies": ["@nrwl/devkit"]
14+
"allowedNonPeerDependencies": ["@nx/devkit"]
1515
}

libs/angular-three-soba/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,8 @@
3434
"troika-three-text": "^0.47.0"
3535
},
3636
"dependencies": {
37-
"@nrwl/devkit": "^15.0.0",
38-
"tslib": "^2.3.0"
37+
"tslib": "^2.3.0",
38+
"@nx/devkit": "^15.0.0"
3939
},
4040
"sideEffects": false,
4141
"generators": "./plugin/generators.json",

libs/angular-three-soba/project.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
"prefix": "ngts",
77
"targets": {
88
"build": {
9-
"executor": "@nrwl/angular:package",
9+
"executor": "@nx/angular:package",
1010
"outputs": ["{workspaceRoot}/dist/{projectRoot}"],
1111
"options": {
1212
"project": "libs/angular-three-soba/ng-package.json"
@@ -29,7 +29,7 @@
2929
}
3030
},
3131
"test": {
32-
"executor": "@nrwl/jest:jest",
32+
"executor": "@nx/jest:jest",
3333
"outputs": ["{workspaceRoot}/coverage/{projectRoot}"],
3434
"options": {
3535
"jestConfig": "libs/angular-three-soba/jest.config.ts",
@@ -43,7 +43,7 @@
4343
}
4444
},
4545
"lint": {
46-
"executor": "@nrwl/linter:eslint",
46+
"executor": "@nx/linter:eslint",
4747
"outputs": ["{options.outputFile}"],
4848
"options": {
4949
"lintFilePatterns": [

0 commit comments

Comments
 (0)