diff --git a/lib/eslint-angular/project.json b/lib/eslint-angular/project.json index ec7f7c400a..bdf8a3c541 100644 --- a/lib/eslint-angular/project.json +++ b/lib/eslint-angular/project.json @@ -5,13 +5,25 @@ "projectType": "library", "prefix": "adf", "targets": { - "build": { + "compile": { "executor": "@nx/js:tsc", "outputs": ["{options.outputPath}"], "options": { "outputPath": "dist/libs/eslint-plugin-eslint-angular", "main": "lib/eslint-angular/index.ts", - "tsConfig": "lib/eslint-angular/tsconfig.lib.prod.json" + "tsConfig": "lib/eslint-angular/tsconfig.lib.prod.json", + "assets": [ + { + "input": "lib/eslint-angular", + "glob": "package.json", + "output": "." + }, + { + "input": "lib/eslint-angular", + "glob": "README.md", + "output": "." + } + ] }, "configurations": { "production": { @@ -21,6 +33,24 @@ } } }, + "build": { + "executor": "nx:run-commands", + "outputs": ["{options.outputPath}"], + "options": { + "outputPath": "dist/libs/eslint-plugin-eslint-angular", + "commands": [ + { + "command": "nx run eslint-angular:compile", + "forwardAllArgs": false + }, + { + "command": "printf \"module.exports = require('./index.js');\\n\" > dist/libs/eslint-plugin-eslint-angular/main.js", + "forwardAllArgs": false + } + ], + "parallel": false + } + }, "lint": { "executor": "@nx/eslint:lint", "options": {