From 99c9055208c8d096d979d607f9a8a42b066065c6 Mon Sep 17 00:00:00 2001 From: Chen Asraf Date: Thu, 18 Nov 2021 14:09:21 +0200 Subject: [PATCH] fix build output files --- .github/workflows/alpha.yml | 5 ++--- .github/workflows/main.yml | 4 ++-- package.json | 6 +++--- src/{types.d.ts => types.ts} | 1 + tsconfig.json | 5 +++-- 5 files changed, 11 insertions(+), 10 deletions(-) rename src/{types.d.ts => types.ts} (91%) diff --git a/.github/workflows/alpha.yml b/.github/workflows/alpha.yml index 85827b9..82a0f7b 100644 --- a/.github/workflows/alpha.yml +++ b/.github/workflows/alpha.yml @@ -14,7 +14,6 @@ jobs: node-version: "12.x" - run: yarn install --frozen-lockfile - run: yarn build - - run: yarn pack --filename=release.tgz - uses: Klemensas/action-autotag@stable id: update_tag with: @@ -27,7 +26,7 @@ jobs: package: ./dist/package.json token: "${{ secrets.NPM_TOKEN }}" - name: Create Release - if: "steps.update_tag.outputs.tagname && !contains(github.event.head_commit.message, '[skip publish]')" + if: steps.update_tag.outputs.tagname && !contains(github.event.head_commit.message, '[skip publish]') uses: actions/create-release@v1 id: create_release env: @@ -36,7 +35,7 @@ jobs: tag_name: ${{ steps.update_tag.outputs.tagname }} release_name: Release ${{ steps.update_tag.outputs.tagname }} - name: Upload Release Asset - if: "steps.update_tag.outputs.tagname && !contains(github.event.head_commit.message, '[skip publish]')" + if: steps.update_tag.outputs.tagname && !contains(github.event.head_commit.message, '[skip publish]') id: upload-release-asset uses: actions/upload-release-asset@v1 env: diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 403229e..7f79b95 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -25,7 +25,7 @@ jobs: package: ./dist/package.json token: "${{ secrets.NPM_TOKEN }}" - name: Create Release - if: steps.update_tag.outputs.tagname + if: steps.update_tag.outputs.tagname && !contains(github.event.head_commit.message, '[skip publish]') uses: actions/create-release@v1 id: create_release env: @@ -34,7 +34,7 @@ jobs: tag_name: ${{ steps.update_tag.outputs.tagname }} release_name: Release ${{ steps.update_tag.outputs.tagname }} - name: Upload Release Asset - if: steps.update_tag.outputs.tagname + if: steps.update_tag.outputs.tagname && !contains(github.event.head_commit.message, '[skip publish]') id: upload-release-asset uses: actions/upload-release-asset@v1 env: diff --git a/package.json b/package.json index 0a35645..075d48d 100644 --- a/package.json +++ b/package.json @@ -1,16 +1,16 @@ { "name": "simple-scaffold", - "version": "1.0.0-alpha.1", + "version": "1.0.0-alpha.2", "description": "Create files based on templates", "repository": "https://github.com/chenasraf/simple-scaffold.git", "author": "Chen Asraf ", "license": "MIT", "main": "index.js", "bin": "cmd.js", - "types": "index.d.ts", + "types": "types.d.ts", "scripts": { "clean": "rm -rf dist/", - "build": "yarn clean && tsc && chmod -R +x ./dist && cp ./package.json ./dist/package.json", + "build": "yarn clean && tsc && chmod -R +x ./dist && cp ./package.json ./dist/ && cp ./README.md ./dist/", "dev": "tsc --watch", "start": "node dist/scaffold.js", "test": "jest --verbose", diff --git a/src/types.d.ts b/src/types.ts similarity index 91% rename from src/types.d.ts rename to src/types.ts index 7eec8f6..59ab9a9 100644 --- a/src/types.d.ts +++ b/src/types.ts @@ -3,6 +3,7 @@ export type FileResponseFn = (fullPath: string, basedir: string, basename: st export type FileResponse = T | FileResponseFn export interface ScaffoldConfig { + /** The name supplied for the output templates */ name: string templates: string[] output: FileResponse diff --git a/tsconfig.json b/tsconfig.json index dab32c9..2d2b232 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -10,11 +10,12 @@ "declaration": true, "outDir": "dist", "strict": true, - "sourceMap": true + "sourceMap": true, + "removeComments": false, }, "include": [ "src/index.ts", - "src/cmd.ts" + "src/cmd.ts", ], "exclude": [ "tests/*"