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
// Nx Devkit | |
export default async function (tree: Tree, options: Schema) { | |
generateFiles( | |
tree, | |
join(__dirname, 'files'), | |
join('tools/generators', options.name), | |
options | |
); | |
await formatFiles(tree); | |
} |
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
{ | |
"tasks": [ | |
{ | |
"id": "react-app:build", | |
"overrides": {}, | |
"target": { | |
"project": "react-app", | |
"target": "build" | |
}, | |
"command": "npm run nx -- build react-app", |
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
const execSync = require('child_process').execSync; | |
const commands = JSON.parse(process.argv[2]); | |
const projects = commands[process.argv[3]]; | |
const target = process.argv[4]; | |
execSync( | |
`npx nx run-many --target=${target} --projects=${projects.join( | |
',' | |
)} --parallel`, | |
{ | |
stdio: [0, 1, 2] |
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
- job: lint1 | |
dependsOn: initial_setup | |
condition: | | |
and( | |
succeeded(), | |
not(contains( | |
dependencies.initial_setup.outputs['setCommands.COMMANDS'], | |
'"lint1":[]' | |
)) | |
) |
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
const isMaster = process.argv[2] === 'False'; | |
const baseSha = isMaster ? 'origin/master~1' : 'origin/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
- job: lint1 | |
dependsOn: initial_setup | |
condition: | | |
and( | |
succeeded(), | |
not(contains( | |
dependencies.initial_setup.outputs['setCommands.COMMANDS'], | |
'"lint1":[]' | |
)) | |
) |
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
jobs: | |
- job: initial_setup | |
pool: | |
vmImage: 'ubuntu-latest' | |
variables: | |
IS_PR: $[ eq(variables['Build.Reason'], 'PullRequest') ] | |
steps: | |
- template: .azure-pipelines/steps/install-node-modules.yml | |
- powershell: echo "##vso[task.setvariable variable=COMMANDS;isOutput=true]$(node ./tools/scripts/calculate-commands.js $(IS_PR))" | |
name: setCommands |
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
jobs: | |
- job: ci | |
timeoutInMinutes: 120 | |
pool: | |
vmImage: 'ubuntu-latest' | |
variables: | |
IS_PR: $[ eq(variables['Build.Reason'], 'PullRequest') ] | |
steps: | |
- template: .azure-pipelines/steps/install-node-modules.yml | |
- script: yarn nx affected --target=test --base=origin/master --parallel |
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
jobs: | |
- job: ci | |
timeoutInMinutes: 120 | |
pool: | |
vmImage: 'ubuntu-latest' | |
steps: | |
- template: .azure-pipelines/steps/install-node-modules.yml | |
- script: yarn nx affected --target=test --base=origin/master | |
- script: yarn nx affected --target=lint --base=origin/master | |
- script: yarn nx affected --target=build --base=origin/master --prod |
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
jobs: | |
- job: ci | |
timeoutInMinutes: 120 | |
pool: | |
vmImage: 'ubuntu-latest' | |
steps: | |
- template: .azure-pipelines/steps/install-node-modules.yml | |
- script: yarn nx run-many --target=test --all | |
- script: yarn nx run-many --target=lint --all | |
- script: yarn nx run-many --target=build --all --prod |
NewerOlder