Skip to content

Commit

Permalink
Add heft-fastify-test project
Browse files Browse the repository at this point in the history
  • Loading branch information
octogonz committed May 27, 2021
1 parent 7d99ef1 commit 34f4e83
Show file tree
Hide file tree
Showing 8 changed files with 118 additions and 0 deletions.
7 changes: 7 additions & 0 deletions build-tests/heft-fastify-test/.eslintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
// This is a workaround for https://github.com/eslint/eslint/issues/3458
require('@rushstack/eslint-config/patch/modern-module-resolution');

module.exports = {
extends: ['@rushstack/eslint-config/profile/node'],
parserOptions: { tsconfigRootDir: __dirname }
};
3 changes: 3 additions & 0 deletions build-tests/heft-fastify-test/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# heft-fastify-test

This project tests Heft support for the [Fastify](https://www.fastify.io/) framework for Node.js services.
51 changes: 51 additions & 0 deletions build-tests/heft-fastify-test/config/heft.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
/**
* Defines configuration used by core Heft.
*/
{
"$schema": "https://developer.microsoft.com/json-schemas/heft/heft.schema.json",

"eventActions": [
{
/**
* The kind of built-in operation that should be performed.
* The "deleteGlobs" action deletes files or folders that match the
* specified glob patterns.
*/
"actionKind": "deleteGlobs",

/**
* The stage of the Heft run during which this action should occur. Note that actions specified in heft.json
* occur at the end of the stage of the Heft run.
*/
"heftEvent": "clean",

/**
* A user-defined tag whose purpose is to allow configs to replace/delete handlers that were added by other
* configs.
*/
"actionId": "defaultClean",

/**
* Glob patterns to be deleted. The paths are resolved relative to the project folder.
*/
"globsToDelete": ["dist", "lib", "temp"]
}
],

/**
* The list of Heft plugins to be loaded.
*/
"heftPlugins": [
// {
// /**
// * The path to the plugin package.
// */
// "plugin": "path/to/my-plugin",
//
// /**
// * An optional object that provides additional settings that may be defined by the plugin.
// */
// // "options": { }
// }
]
}
3 changes: 3 additions & 0 deletions build-tests/heft-fastify-test/config/rush-project.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"projectOutputFolderNames": ["lib", "dist"]
}
19 changes: 19 additions & 0 deletions build-tests/heft-fastify-test/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
{
"name": "heft-fastify-test",
"description": "This project tests Heft support for the Fastify framework for Node.js services",
"version": "1.0.0",
"private": true,
"main": "lib/index.js",
"license": "MIT",
"scripts": {
"build": "heft test --clean"
},
"devDependencies": {
"@rushstack/eslint-config": "workspace:*",
"@rushstack/heft": "workspace:*",
"@types/heft-jest": "1.0.1",
"@types/node": "10.17.13",
"eslint": "~7.12.1",
"typescript": "~3.9.7"
}
}
4 changes: 4 additions & 0 deletions build-tests/heft-fastify-test/src/start.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
// Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT license.
// See LICENSE in the project root for license information.

console.log('Hello, world!');
25 changes: 25 additions & 0 deletions build-tests/heft-fastify-test/tsconfig.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
{
"$schema": "http://json.schemastore.org/tsconfig",

"compilerOptions": {
"outDir": "lib",
"rootDir": "src",

"forceConsistentCasingInFileNames": true,
"jsx": "react",
"declaration": true,
"sourceMap": true,
"declarationMap": true,
"inlineSources": true,
"experimentalDecorators": true,
"strictNullChecks": true,
"noUnusedLocals": true,
"types": ["heft-jest", "node"],

"module": "commonjs",
"target": "es2017",
"lib": ["es2017"]
},
"include": ["src/**/*.ts", "src/**/*.tsx"],
"exclude": ["node_modules", "lib"]
}
6 changes: 6 additions & 0 deletions rush.json
Original file line number Diff line number Diff line change
Expand Up @@ -568,6 +568,12 @@
"reviewCategory": "tests",
"shouldPublish": false
},
{
"packageName": "heft-fastify-test",
"projectFolder": "build-tests/heft-fastify-test",
"reviewCategory": "tests",
"shouldPublish": false
},
{
"packageName": "heft-minimal-rig-test",
"projectFolder": "build-tests/heft-minimal-rig-test",
Expand Down

0 comments on commit 34f4e83

Please sign in to comment.