Skip to content

Commit

Permalink
Merge branch 'master' into landingpage-#1290-add-next-nx-executors
Browse files Browse the repository at this point in the history
  • Loading branch information
janivo committed Mar 28, 2024
2 parents d5cfa47 + 1dfdd1c commit d561f69
Show file tree
Hide file tree
Showing 25 changed files with 282 additions and 337 deletions.
19 changes: 19 additions & 0 deletions nx.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,25 @@
"{workspaceRoot}/.eslintrc.json"
]
},
"clean": {
"executor": "nx:run-commands",
"options": {
"cwd": "{projectRoot}",
"parallel": false,
"commands": [
"nx run {projectName}:clean:dist",
"nx run {projectName}:clean:node"
]
},
"configurations": {
"dist": {
"commands": ["shx rm -rf ./dist"]
},
"node": {
"commands": ["shx rm -rf ./node_modules"]
}
}
},
"@angular-devkit/build-angular:browser": {
"cache": true,
"dependsOn": ["^build"],
Expand Down
21 changes: 13 additions & 8 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,16 +10,21 @@
"start:storybook": "nx run-many --target=start --projects=storybook,elements --output-style=stream",
"start:landingpage": "nx run landingpage:start",
"start:ui-patterns-playground": "nx run-many --target=start --projects=ui-patterns,ui-patterns-playground --output-style=stream",
"build": "nx run-many --target=build --output-style=stream --exclude workspace",
"test": "nx run-many --target=test --output-style=stream --configuration=ci --exclude workspace",
"build": "nx run-many --target=build --output-style=stream",
"test": "nx run-many --target=test --output-style=stream --configuration=ci",
"test:core:watch": "nx run elements:test:watch",
"lint": "nx affected --target=lint --output-style=stream --exclude workspace",
"lint:fix": "nx affected --target=lint --configuration=fix --output-style=stream --exclude workspace",
"format": "nx format:check --exclude workspace",
"format:fix": "nx format:write --exclude workspace",
"lint": "nx affected --target=lint --output-style=stream",
"lint:fix": "nx affected --target=lint --configuration=fix --output-style=stream",
"format": "nx format:check",
"format:fix": "nx format:write",
"qc": "yarn lint && yarn format && yarn build && yarn test",
"clean": "nx run-many --target=clean --exclude workspace && shx rm -rf dist",
"clean:node-modules": "nx run-many --target=clean --configuration=nodejs --exclude workspace && shx rm -rf node_modules"
"clean": "nx run-many --target=clean && yarn clean:nx && shx rm -rf node_modules .nx",
"clean:dist": "nx run-many --target=clean --configuration=dist && yarn clean:nx",
"clean:node": "nx run-many --target=clean --configuration=node && yarn clean:nx && shx rm -rf node_modules",
"clean:nx": "nx daemon --stop && nx reset"
},
"nx": {
"includedScripts": []
},
"devDependencies": {
"@angular-devkit/build-angular": "~15.1.0",
Expand Down
3 changes: 2 additions & 1 deletion packages/elements-angular-example/project.json
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,8 @@
"packages/elements-angular-example/**/*.html"
]
}
}
},
"clean": {}
},
"tags": []
}
3 changes: 2 additions & 1 deletion packages/elements-angular/project.json
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,8 @@
"packages/elements-angular/src/**/*.html"
]
}
}
},
"clean": {}
},
"tags": []
}
13 changes: 1 addition & 12 deletions packages/elements-react-example/project.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,17 +28,6 @@
}
}
},
"clean": {
"executor": "nx:run-commands",
"options": {
"cwd": "packages/elements-react-example",
"command": "shx rm -rf dist"
},
"configurations": {
"nodejs": {
"command": "shx rm -rf node_modules"
}
}
}
"clean": {}
}
}
12 changes: 1 addition & 11 deletions packages/elements-react/project.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,16 +24,6 @@
"command": "tsc --project ./tsconfig.lib.json"
}
},
"clean": {
"executor": "nx:run-commands",
"options": {
"command": "shx rm -rf packages/elements-react/dist"
},
"configurations": {
"nodejs": {
"command": "shx rm -rf packages/elements-react/node_modules"
}
}
}
"clean": {}
}
}
13 changes: 1 addition & 12 deletions packages/elements-vue-example/project.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,17 +36,6 @@
]
}
},
"clean": {
"executor": "nx:run-commands",
"options": {
"cwd": "packages/elements-vue-example",
"command": "shx rm -rf dist"
},
"configurations": {
"nodejs": {
"command": "shx rm -rf node_modules"
}
}
}
"clean": {}
}
}
12 changes: 1 addition & 11 deletions packages/elements-vue/project.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,16 +24,6 @@
"command": "tsc --project ./tsconfig.lib.json"
}
},
"clean": {
"executor": "nx:run-commands",
"options": {
"command": "shx rm -rf packages/elements-vue/dist"
},
"configurations": {
"nodejs": {
"command": "shx rm -rf packages/elements-vue/node_modules"
}
}
}
"clean": {}
}
}
7 changes: 7 additions & 0 deletions packages/elements/project.json
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,13 @@
"command": "svgo -f packages/elements/src/assets/ino-icon --config svgo.config.js"
}
}
},
"clean": {
"configurations": {
"dist": {
"commands": ["shx rm -rf ./dist ./.stencil"]
}
}
}
}
}
12 changes: 4 additions & 8 deletions packages/elements/setupSpecTests.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,7 @@
observe() {}
};

jest.mock('@material/textfield', () => ({
...jest.requireActual('@material/textfield'),
MDCTextField: class {
public focus = jest.fn();
public destroy = jest.fn();
public value = '';
},
}));
HTMLInputElement.prototype.checkValidity = jest.fn();
HTMLInputElement.prototype.setSelectionRange = jest.fn();

jest.mock('@material/textfield');
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ const INO_CHECKBOX_ITEM = `<ino-list><ino-control-item role="checkbox" text="Som
const INO_CHECKBOX_ITEM_CHECKED = `<ino-list><ino-control-item role="checkbox" text="Some Item" checked></ino-control-item></ino-list>`;
const INO_CHECKBOX_ITEM_DISABLED = `<ino-list><ino-control-item role="checkbox" text="Some Item" disabled></ino-control-item></ino-list>`;
const INO_RADIO_ITEM = `<ino-list><ino-control-item role="radio" text="Some Item"></ino-checkbox-item></ino-list>`;
const INO_RADIO_ITEM_CHECKED = `<ino-list><ino-control-item role="radio" text="Some Item" checked></ino-control-item></ino-list>`;
const INO_RADIO_ITEM_DISABLED = `<ino-list><ino-control-item role="radio" text="Some Item" disabled></ino-control-item></ino-list>`;

describe('InoControlItem', () => {
Expand Down Expand Up @@ -48,13 +47,6 @@ describe('InoControlItem', () => {
assertEventDetails(false);
});

it('should emit a checkedChange event with true as detail (radio)', async () => {
await setupPage(INO_RADIO_ITEM_CHECKED);
const { assertEventDetails } = listenForEvent(page, 'checkedChange');
inoControlItem.click();
assertEventDetails(true);
});

it('should not emit a checkedChange event if checkbox is disabled', async () => {
await setupPage(INO_CHECKBOX_ITEM_DISABLED);
const { eventSpy } = listenForEvent(page, 'checkedChange');
Expand Down

This file was deleted.

Loading

0 comments on commit d561f69

Please sign in to comment.