-
-
Notifications
You must be signed in to change notification settings - Fork 4.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #26624 from mshima/javascript-bootstrap
add javascript:bootstrap generator
- Loading branch information
Showing
14 changed files
with
334 additions
and
139 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
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
82 changes: 82 additions & 0 deletions
82
generators/javascript/generators/bootstrap/__snapshots__/generator.spec.ts.snap
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,82 @@ | ||
// Jest Snapshot v1, https://goo.gl/fbAQLP | ||
|
||
exports[`generator - javascript:bootstrap customVersion-commonjs should call source snapshot 1`] = `{}`; | ||
|
||
exports[`generator - javascript:bootstrap customVersion-commonjs should match files snapshot 1`] = ` | ||
{ | ||
".yo-rc.json": ObjectContaining { | ||
"contents": Any<String>, | ||
}, | ||
"package.json": { | ||
"contents": "{ | ||
"name": "dasherizedBaseName", | ||
"version": "0.0.0", | ||
"description": "projectDescription", | ||
"private": true, | ||
"license": "UNLICENSED", | ||
"dependencies": {}, | ||
"devDependencies": {}, | ||
"engines": { | ||
"node": "customVersion" | ||
}, | ||
"scripts": {}, | ||
"type": "commonjs" | ||
} | ||
", | ||
"stateCleared": "modified", | ||
}, | ||
} | ||
`; | ||
exports[`generator - javascript:bootstrap packageJsonNodeEngine(false)-module should call source snapshot 1`] = `{}`; | ||
exports[`generator - javascript:bootstrap packageJsonNodeEngine(false)-module should match files snapshot 1`] = ` | ||
{ | ||
".yo-rc.json": ObjectContaining { | ||
"contents": Any<String>, | ||
}, | ||
"package.json": { | ||
"contents": "{ | ||
"name": "dasherizedBaseName", | ||
"version": "0.0.0", | ||
"description": "projectDescription", | ||
"private": true, | ||
"license": "UNLICENSED", | ||
"dependencies": {}, | ||
"devDependencies": {}, | ||
"engines": {}, | ||
"scripts": {}, | ||
"type": "module" | ||
} | ||
", | ||
"stateCleared": "modified", | ||
}, | ||
} | ||
`; | ||
exports[`generator - javascript:bootstrap packageJsonNodeEngine(true) should call source snapshot 1`] = `{}`; | ||
exports[`generator - javascript:bootstrap packageJsonNodeEngine(true) should match files snapshot 1`] = ` | ||
{ | ||
".yo-rc.json": ObjectContaining { | ||
"contents": Any<String>, | ||
}, | ||
"package.json": { | ||
"contents": "{ | ||
"name": "dasherizedBaseName", | ||
"version": "0.0.0", | ||
"description": "projectDescription", | ||
"private": true, | ||
"license": "UNLICENSED", | ||
"dependencies": {}, | ||
"devDependencies": {}, | ||
"engines": { | ||
"node": "^18.19.0 || >= 20.6.1" | ||
}, | ||
"scripts": {} | ||
} | ||
", | ||
"stateCleared": "modified", | ||
}, | ||
} | ||
`; |
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,43 @@ | ||
/** | ||
* Copyright 2013-2024 the original author or authors from the JHipster project. | ||
* | ||
* This file is part of the JHipster project, see https://www.jhipster.tech/ | ||
* for more information. | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* https://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
import type { JHipsterCommandDefinition } from '../../../base/api.js'; | ||
|
||
const command: JHipsterCommandDefinition = { | ||
configs: { | ||
packageJsonNodeEngine: { | ||
cli: { | ||
// Accepts a boolean or a string | ||
type: val => val, | ||
hide: true, | ||
}, | ||
scope: 'storage', | ||
}, | ||
packageJsonType: { | ||
cli: { | ||
type: String, | ||
hide: true, | ||
}, | ||
choices: ['commonjs', 'module'], | ||
scope: 'storage', | ||
}, | ||
}, | ||
import: [], | ||
}; | ||
|
||
export default command; |
Oops, something went wrong.