Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(svelte): Add svelte plugin (#75)
* feat(svelte): add svelte plugin * chore(svelte): add docs * chore(svelte): disbale linting for rollup imports * test(stencil): disable tests for capacitor * chore(stencil): remove unused import
- Loading branch information
1 parent
c762d66
commit e0dffb8
Showing
56 changed files
with
2,283 additions
and
283 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
name: nxext stencil macos CI | ||
name: nxext macos CI | ||
on: | ||
pull_request: | ||
branches: [master] | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
name: nxext stencil windows CI | ||
name: nxext windows CI | ||
on: | ||
pull_request: | ||
branches: [master] | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
module.exports = { | ||
name: 'svelte-e2e', | ||
preset: '../../jest.config.js', | ||
globals: { | ||
'ts-jest': { | ||
tsConfig: '<rootDir>/tsconfig.spec.json', | ||
}, | ||
}, | ||
transform: { | ||
'^.+\\.[tj]s$': 'ts-jest', | ||
}, | ||
moduleFileExtensions: ['ts', 'js', 'html'], | ||
coverageDirectory: '../../coverage/e2e/svelte-e2e', | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
import { | ||
checkFilesExist, | ||
ensureNxProject, | ||
readJson, | ||
runNxCommandAsync, | ||
uniq, | ||
} from '@nrwl/nx-plugin/testing'; | ||
describe('svelte e2e', () => { | ||
it('should create svelte', async (done) => { | ||
const plugin = uniq('svelte'); | ||
ensureNxProject('@nxext/svelte', 'dist/packages/svelte'); | ||
await runNxCommandAsync(`generate @nxext/svelte:app ${plugin}`); | ||
|
||
const result = await runNxCommandAsync(`build ${plugin}`); | ||
expect(result.stdout).toContain('Bundle complete'); | ||
|
||
done(); | ||
}); | ||
|
||
describe('--tags', () => { | ||
it('should add tags to nx.json', async (done) => { | ||
const plugin = uniq('svelte'); | ||
ensureNxProject('@nxext/svelte', 'dist/packages/svelte'); | ||
await runNxCommandAsync( | ||
`generate @nxext/svelte:app ${plugin} --tags e2etag,e2ePackage` | ||
); | ||
const nxJson = readJson('nx.json'); | ||
expect(nxJson.projects[plugin].tags).toEqual(['e2etag', 'e2ePackage']); | ||
done(); | ||
}); | ||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
{ | ||
"extends": "../../tsconfig.base.json", | ||
"files": [], | ||
"include": [], | ||
"references": [ | ||
{ | ||
"path": "./tsconfig.e2e.json" | ||
}, | ||
{ | ||
"path": "./tsconfig.spec.json" | ||
} | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
{ | ||
"extends": "./tsconfig.json", | ||
"compilerOptions": { | ||
"outDir": "../../dist/out-tsc", | ||
"module": "commonjs", | ||
"types": ["jest", "node"] | ||
}, | ||
"include": ["**/*.spec.ts", "**/*.d.ts"] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,25 +1,88 @@ | ||
{ | ||
"migrations": [ | ||
{ | ||
"version": "10.1.0-beta.0", | ||
"description": "Migrate .eslintrc files to use tsconfig with a wildcard", | ||
"factory": "./src/migrations/update-10-1-0/migrate-eslintrc-tsconfig-wildcard", | ||
"version": "10.3.0-beta.0", | ||
"description": "Add @nrwl/cli as dependency", | ||
"factory": "./src/migrations/update-10-3-0/add-cli-dependency", | ||
"package": "@nrwl/workspace", | ||
"name": "migrate-eslintrc-tsconfig-wildcard" | ||
"name": "add-cli-dependency" | ||
}, | ||
{ | ||
"version": "10.1.0-beta.4", | ||
"description": "Update jest to v26", | ||
"factory": "./src/migrations/update-10-1-0/update-10-1-0", | ||
"version": "10.3.0-beta.0", | ||
"description": "Update typescript to v4", | ||
"factory": "./src/migrations/update-10-3-0/update-typescript", | ||
"package": "@nrwl/workspace", | ||
"name": "update-10-3-0" | ||
}, | ||
{ | ||
"version": "10.3.0-beta.1", | ||
"description": "Adds .vscode/extensions.json to a workspace", | ||
"factory": "./src/migrations/update-10-3-0/add-vscode-extensions", | ||
"package": "@nrwl/workspace", | ||
"name": "add-vscode-extensions" | ||
}, | ||
{ | ||
"version": "10.3.0-beta.0", | ||
"description": "Adds `buildableProjectDepsInPackageJsonType` for web and angular package builders", | ||
"factory": "./src/migrations/update-10-3-0/add-buildable-project-deps-in-package-json-type", | ||
"package": "@nrwl/workspace", | ||
"name": "add-buildable-project-deps-in-package-json-type" | ||
}, | ||
{ | ||
"version": "10.3.0-beta.1", | ||
"description": "Add tsconfig.editor.json to angular apps and update jest-angular-preset", | ||
"factory": "./src/migrations/update-10-3-0/update-10-3-0", | ||
"package": "@nrwl/angular", | ||
"name": "update-10-3-0" | ||
}, | ||
{ | ||
"version": "10.3.0-beta.1", | ||
"description": "Adds all jest projects into the root jest config", | ||
"factory": "./src/migrations/update-10-3-0/update-projects-property", | ||
"package": "@nrwl/jest", | ||
"name": "update-10.1.0" | ||
"name": "update-projects-property" | ||
}, | ||
{ | ||
"version": "10.3.0-beta.1", | ||
"description": "Update ts-jest to v26.4", | ||
"factory": "./src/migrations/update-10-3-0/update-ts-jest", | ||
"package": "@nrwl/jest", | ||
"name": "update-ts-jest" | ||
}, | ||
{ | ||
"version": "10.3.0-beta.1", | ||
"description": "Adds a jest extension to the recommended extensions for vscode", | ||
"factory": "./src/migrations/update-10-3-0/add-jest-extension", | ||
"package": "@nrwl/jest", | ||
"name": "add-jest-extension" | ||
}, | ||
{ | ||
"version": "10.3.0-beta.1", | ||
"description": "Update @typescript-eslint to v4.3", | ||
"factory": "./src/migrations/update-10-3-0/update-10-3-0", | ||
"package": "@nrwl/linter", | ||
"name": "update-10.3.0" | ||
}, | ||
{ | ||
"version": "10.3.0-beta.0", | ||
"description": "Migrate to the new ESLint builder and ESLint config style", | ||
"factory": "./src/migrations/update-10-3-0/update-eslint-builder-and-config", | ||
"package": "@nrwl/linter", | ||
"name": "update-eslint-builder-and-config" | ||
}, | ||
{ | ||
"version": "10.3.0-beta.2", | ||
"description": "Add explicit .json file extension to .eslintrc files, not using an extension is deprecated", | ||
"factory": "./src/migrations/update-10-3-0/add-json-ext-to-eslintrc", | ||
"package": "@nrwl/linter", | ||
"name": "add-json-ext-to-eslintrc" | ||
}, | ||
{ | ||
"version": "10.1.0-beta.1", | ||
"description": "Removes rootDir from node libs' tsconfig", | ||
"factory": "./src/migrations/update-10-1-0/remove-root-dir", | ||
"package": "@nrwl/node", | ||
"name": "remove-root-dir" | ||
"version": "10.3.0-beta.3", | ||
"description": "Update implicitDependencies within nx.json to include root .eslintrc.json", | ||
"factory": "./src/migrations/update-10-3-0/add-root-eslintrc-json-to-workspace-implicit-deps", | ||
"package": "@nrwl/linter", | ||
"name": "add-root-eslintrc-json-to-workspace-implicit-deps" | ||
} | ||
] | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
{ "extends": "../../.eslintrc", "rules": {}, "ignorePatterns": ["!**/*"] } |
Oops, something went wrong.