Skip to content

Commit daafd0a

Browse files
committed
Initial commit
0 parents  commit daafd0a

File tree

102 files changed

+7550
-0
lines changed

Some content is hidden

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

102 files changed

+7550
-0
lines changed

.editorconfig

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
# Editor configuration, see http://editorconfig.org
2+
root = true
3+
4+
[*]
5+
charset = utf-8
6+
indent_style = space
7+
indent_size = 2
8+
insert_final_newline = true
9+
trim_trailing_whitespace = true
10+
11+
[*.md]
12+
max_line_length = off
13+
trim_trailing_whitespace = false

.eslintrc.json

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
{
2+
"root": true,
3+
"ignorePatterns": ["**/*"],
4+
"plugins": ["@nrwl/nx"],
5+
"overrides": [
6+
{
7+
"files": ["*.ts", "*.tsx", "*.js", "*.jsx"],
8+
"rules": {
9+
"@nrwl/nx/enforce-module-boundaries": [
10+
"error",
11+
{
12+
"enforceBuildableLibDependency": true,
13+
"allow": [],
14+
"depConstraints": [
15+
{
16+
"sourceTag": "*",
17+
"onlyDependOnLibsWithTags": ["*"]
18+
}
19+
]
20+
}
21+
]
22+
}
23+
},
24+
{
25+
"files": ["*.ts", "*.tsx"],
26+
"extends": ["plugin:@nrwl/nx/typescript"],
27+
"rules": {}
28+
},
29+
{
30+
"files": ["*.js", "*.jsx"],
31+
"extends": ["plugin:@nrwl/nx/javascript"],
32+
"rules": {}
33+
},
34+
{
35+
"files": ["*.spec.ts", "*.spec.tsx", "*.spec.js", "*.spec.jsx"],
36+
"env": {
37+
"jest": true
38+
},
39+
"rules": {}
40+
},
41+
{
42+
"files": "*.json",
43+
"parser": "jsonc-eslint-parser",
44+
"rules": {}
45+
}
46+
]
47+
}

.gitignore

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
# See http://help.github.com/ignore-files/ for more about ignoring files.
2+
3+
# compiled output
4+
dist
5+
tmp
6+
/out-tsc
7+
8+
# dependencies
9+
node_modules
10+
11+
# IDEs and editors
12+
/.idea
13+
.project
14+
.classpath
15+
.c9/
16+
*.launch
17+
.settings/
18+
*.sublime-workspace
19+
20+
# IDE - VSCode
21+
.vscode/*
22+
!.vscode/settings.json
23+
!.vscode/tasks.json
24+
!.vscode/launch.json
25+
!.vscode/extensions.json
26+
27+
# misc
28+
/.sass-cache
29+
/connect.lock
30+
/coverage
31+
/libpeerconnection.log
32+
npm-debug.log
33+
yarn-error.log
34+
testem.log
35+
/typings
36+
37+
# System Files
38+
.DS_Store
39+
Thumbs.db

.prettierignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
# Add files here to ignore them from prettier formatting
2+
3+
/dist
4+
/coverage

.prettierrc

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"singleQuote": true
3+
}

.vscode/extensions.json

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
{
2+
"recommendations": [
3+
"nrwl.angular-console",
4+
"esbenp.prettier-vscode",
5+
"dbaeumer.vscode-eslint",
6+
"firsttris.vscode-jest-runner"
7+
]
8+
}

.vscode/settings.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"eslint.validate": ["json"]
3+
}

e2e/qwik-nx-e2e/jest.config.ts

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
/* eslint-disable */
2+
export default {
3+
displayName: 'qwik-nx-e2e',
4+
preset: '../../jest.preset.js',
5+
globals: {
6+
'ts-jest': {
7+
tsconfig: '<rootDir>/tsconfig.spec.json',
8+
},
9+
},
10+
transform: {
11+
'^.+\\.[tj]s$': 'ts-jest',
12+
},
13+
moduleFileExtensions: ['ts', 'js', 'html'],
14+
coverageDirectory: '../../coverage/e2e/qwik-nx-e2e',
15+
};

e2e/qwik-nx-e2e/project.json

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
{
2+
"name": "qwik-nx-e2e",
3+
"$schema": "../../node_modules/nx/schemas/project-schema.json",
4+
"projectType": "application",
5+
"sourceRoot": "e2e/qwik-nx-e2e/src",
6+
"targets": {
7+
"e2e": {
8+
"executor": "@nrwl/nx-plugin:e2e",
9+
"options": {
10+
"target": "qwik-nx:build",
11+
"jestConfig": "e2e/qwik-nx-e2e/jest.config.ts"
12+
}
13+
}
14+
},
15+
"tags": [],
16+
"implicitDependencies": ["qwik-nx"]
17+
}

e2e/qwik-nx-e2e/tests/qwik-nx.spec.ts

Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
import {
2+
checkFilesExist,
3+
ensureNxProject,
4+
readJson,
5+
runNxCommandAsync,
6+
uniq,
7+
} from '@nrwl/nx-plugin/testing';
8+
9+
describe('qwik-nx e2e', () => {
10+
// Setting up individual workspaces per
11+
// test can cause e2e runs to take a long time.
12+
// For this reason, we recommend each suite only
13+
// consumes 1 workspace. The tests should each operate
14+
// on a unique project in the workspace, such that they
15+
// are not dependant on one another.
16+
beforeAll(() => {
17+
ensureNxProject('qwik-nx', 'dist/packages/qwik-nx');
18+
});
19+
20+
afterAll(() => {
21+
// `nx reset` kills the daemon, and performs
22+
// some work which can help clean up e2e leftovers
23+
runNxCommandAsync('reset');
24+
});
25+
26+
it('should create qwik-nx', async () => {
27+
const project = uniq('qwik-nx');
28+
await runNxCommandAsync(`generate qwik-nx:qwik-nx ${project}`);
29+
const result = await runNxCommandAsync(`build ${project}`);
30+
expect(result.stdout).toContain('Executor ran');
31+
}, 120000);
32+
33+
describe('--directory', () => {
34+
it('should create src in the specified directory', async () => {
35+
const project = uniq('qwik-nx');
36+
await runNxCommandAsync(
37+
`generate qwik-nx:qwik-nx ${project} --directory subdir`
38+
);
39+
expect(() =>
40+
checkFilesExist(`libs/subdir/${project}/src/index.ts`)
41+
).not.toThrow();
42+
}, 120000);
43+
});
44+
45+
describe('--tags', () => {
46+
it('should add tags to the project', async () => {
47+
const projectName = uniq('qwik-nx');
48+
ensureNxProject('qwik-nx', 'dist/packages/qwik-nx');
49+
await runNxCommandAsync(
50+
`generate qwik-nx:qwik-nx ${projectName} --tags e2etag,e2ePackage`
51+
);
52+
const project = readJson(`libs/${projectName}/project.json`);
53+
expect(project.tags).toEqual(['e2etag', 'e2ePackage']);
54+
}, 120000);
55+
});
56+
});

0 commit comments

Comments
 (0)