Skip to content

Commit e18c373

Browse files
committed
Experiment: VITE
1 parent e8a3793 commit e18c373

5 files changed

Lines changed: 24 additions & 2 deletions

File tree

.github/workflows/ci.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -111,6 +111,7 @@ jobs:
111111
- ENABLE_ALL_EXPERIMENTS
112112
- EMBROIDER
113113
- CLASSIC
114+
- VITE
114115

115116
steps:
116117
- uses: actions/checkout@v4

lib/commands/init.js

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@ const { isPnpmProject, isYarnProject } = require('../utilities/package-managers'
1212
const getLangArg = require('../../lib/utilities/get-lang-arg');
1313
const { deprecate, DEPRECATIONS } = require('../debug');
1414

15+
const { isExperimentEnabled } = require('@ember-tooling/blueprint-model/utilities/experiments');
16+
1517
module.exports = Command.extend({
1618
name: 'init',
1719
description: 'Reinitializes a new ember-cli project in the current folder.',
@@ -116,12 +118,17 @@ module.exports = Command.extend({
116118
}
117119

118120
let blueprintOpts = clone(commandOptions);
121+
let blueprint = normalizeBlueprint(blueprintOpts.blueprint || this._defaultBlueprint());
122+
123+
if (isExperimentEnabled('VITE') && blueprint === 'app') {
124+
blueprint = '@ember/app-blueprint';
125+
}
119126

120127
merge(blueprintOpts, {
121128
rawName: packageName,
122129
targetFiles: rawArgs || [],
123130
rawArgs: rawArgs.toString(),
124-
blueprint: normalizeBlueprint(blueprintOpts.blueprint || this._defaultBlueprint()),
131+
blueprint,
125132
ciProvider,
126133
});
127134

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,7 @@
5050
"@ember-tooling/blueprint-model": "workspace:*",
5151
"@ember-tooling/classic-build-addon-blueprint": "workspace:*",
5252
"@ember-tooling/classic-build-app-blueprint": "workspace:*",
53+
"@ember/app-blueprint": "^0.8.1",
5354
"@pnpm/find-workspace-dir": "^1000.1.0",
5455
"babel-remove-types": "^1.0.1",
5556
"broccoli": "^3.5.2",

packages/blueprint-model/utilities/experiments.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
'use strict';
22

33
const chalk = require('chalk');
4-
const availableExperiments = Object.freeze(['EMBROIDER', 'CLASSIC']);
4+
const availableExperiments = Object.freeze(['EMBROIDER', 'CLASSIC', 'VITE']);
55

66
const deprecatedExperiments = Object.freeze([]);
77
const enabledExperiments = Object.freeze([]);

pnpm-lock.yaml

Lines changed: 13 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)