Skip to content

Commit

Permalink
refactor(e2e): rename tests folders to {{name}}-{{version}}
Browse files Browse the repository at this point in the history
It was previously `{{name}}-v{{version}}` but the `v` isn't needed as we are using `latest` version in many and `vX-lts` for angular.
  • Loading branch information
gaetanmaisse committed Jul 21, 2020
1 parent c82d84d commit 0560e86
Showing 1 changed file with 11 additions and 11 deletions.
22 changes: 11 additions & 11 deletions scripts/run-e2e-config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { Parameters } from './run-e2e';

const fromDeps = (...args: string[]): string =>
[
'cd {{name}}-v{{version}}',
'cd {{name}}-{{version}}',
// Create `yarn.lock` to force Yarn to consider adding deps in this directory
// and not look for a yarn workspace in parent directory
'touch yarn.lock',
Expand All @@ -17,7 +17,7 @@ const baseAngular: Parameters = {
version: 'latest',
generator: [
`yarn add @angular/cli@{{version}} --no-lockfile --non-interactive --silent --no-progress`,
`npx ng new {{name}}-v{{version}} --routing=true --minimal=true --style=scss --skipInstall=true`,
`npx ng new {{name}}-{{version}} --routing=true --minimal=true --style=scss --skipInstall=true`,
].join(' && '),
additionalDeps: ['react', 'react-dom'],
};
Expand Down Expand Up @@ -53,7 +53,7 @@ export const angular: Parameters = baseAngular;
// name: 'ember',
// version: 'latest',
// generator:
// 'npx ember-cli@{{version}} new {{name}}-v{{version}} --skip-git --skip-npm --yarn --skip-bower',
// 'npx ember-cli@{{version}} new {{name}}-{{version}} --skip-git --skip-npm --yarn --skip-bower',
// preBuildCommand: 'ember build',
// };

Expand All @@ -80,15 +80,15 @@ export const angular: Parameters = baseAngular;
// export const marko: Parameters = {
// name: 'marko',
// version: 'latest',
// generator: 'npx marko-cli@{{version}} create {{name}}-v{{version}}',
// generator: 'npx marko-cli@{{version}} create {{name}}-{{version}}',
// ensureDir: false,
// };

// TODO: need to install meteor first
// export const meteor: Parameters = {
// name: 'meteor',
// version: 'latest',
// generator: 'meteor create {{name}}-v{{version}} --minimal --react',
// generator: 'meteor create {{name}}-{{version}} --minimal --react',
// };

export const mithril: Parameters = {
Expand All @@ -102,7 +102,7 @@ export const preact: Parameters = {
name: 'preact',
version: 'latest',
generator:
'npx preact-cli@{{version}} create preactjs-templates/default {{name}}-v{{version}} --yarn --install=false --git=false',
'npx preact-cli@{{version}} create preactjs-templates/default {{name}}-{{version}} --yarn --install=false --git=false',
ensureDir: false,
};

Expand Down Expand Up @@ -130,14 +130,14 @@ export const react_typescript: Parameters = {
// export const reactNative: Parameters = {
// name: 'reactNative',
// version: 'latest',
// generator: 'npx expo-cli init {{name}}-v{{version}} --template=bare-minimum --yarn',
// generator: 'npx expo-cli init {{name}}-{{version}} --template=bare-minimum --yarn',
// };

// TODO: issue in @storybook/cli init
export const cra: Parameters = {
name: 'cra',
version: 'latest',
generator: 'npx create-react-app@{{version}} {{name}}-v{{version}}',
generator: 'npx create-react-app@{{version}} {{name}}-{{version}}',
};

// TODO: there is a compatibility issue with riot@4
Expand All @@ -157,14 +157,14 @@ export const sfcVue: Parameters = {
export const svelte: Parameters = {
name: 'svelte',
version: 'latest',
generator: 'npx degit sveltejs/template {{name}}-v{{version}}',
generator: 'npx degit sveltejs/template {{name}}-{{version}}',
additionalDeps: ['react', 'react-dom'],
};

export const vue: Parameters = {
name: 'vue',
version: 'latest',
generator: `npx @vue/cli@{{version}} create {{name}}-v{{version}} --default --packageManager=yarn --no-git --force`,
generator: `npx @vue/cli@{{version}} create {{name}}-{{version}} --default --packageManager=yarn --no-git --force`,
additionalDeps: ['react', 'react-dom'],
};

Expand All @@ -185,7 +185,7 @@ export const react_in_yarn_workspace: Parameters = {
name: 'react_in_yarn_workspace',
version: 'latest',
generator: [
'cd {{name}}-v{{version}}',
'cd {{name}}-{{version}}',
'echo "{ \\"name\\": \\"workspace-root\\", \\"private\\": true, \\"workspaces\\": [] }" > package.json',
`yarn add react react-dom --silent -W`,
].join(' && '),
Expand Down

0 comments on commit 0560e86

Please sign in to comment.