Compare commits

...

10 Commits

Author SHA1 Message Date
Chen Asraf
8b22e96329 try new release version 2021-11-18 14:19:50 +02:00
Chen Asraf
53c0842ab8 fixed release tarball file location 2021-11-18 14:18:18 +02:00
Chen Asraf
48631325c1 fixed release tarball file location 2021-11-18 14:16:58 +02:00
Chen Asraf
045ad0118a fix build output files 2021-11-18 14:09:21 +02:00
Chen Asraf
b4dca7a954 add build step 2021-11-18 13:57:57 +02:00
Chen Asraf
7c42808f63 try to fix workflow 2021-11-18 13:56:24 +02:00
Chen Asraf
fd42013e8b publish: debug mode off, try to fix workflow 2021-11-18 13:55:30 +02:00
Chen Asraf
961a72fcdc publish: debug mode on 2021-11-18 13:51:29 +02:00
Chen Asraf
d6d99cfdf2 try fix workflow 2021-11-18 13:45:37 +02:00
Chen Asraf
ea4ecabe02 Merge pull request #12 from chenasraf/v1.0
v1.0
2021-11-18 13:44:09 +02:00
6 changed files with 17 additions and 12 deletions

View File

@@ -13,7 +13,8 @@ jobs:
with:
node-version: "12.x"
- run: yarn install --frozen-lockfile
- run: yarn pack --filename=release.tgz
- run: yarn build
- run: cd ./dist && yarn pack --filename=../release.tgz
- uses: Klemensas/action-autotag@stable
id: update_tag
with:
@@ -26,7 +27,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:
@@ -35,7 +36,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:

View File

@@ -13,7 +13,8 @@ jobs:
with:
node-version: "12.x"
- run: yarn install --frozen-lockfile
- run: yarn pack --filename=release.tgz
- run: yarn build
- run: cd ./dist && yarn pack --filename=../release.tgz
- uses: Klemensas/action-autotag@stable
id: update_tag
with:
@@ -22,10 +23,10 @@ jobs:
- name: Publish on NPM
uses: JS-DevTools/npm-publish@v1
with:
package: dist/package.json
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 +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
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:

1
.gitignore vendored
View File

@@ -59,3 +59,4 @@ typings/
examples/test-output/**/*
dist/
.DS_Store

View File

@@ -1,16 +1,16 @@
{
"name": "simple-scaffold",
"version": "1.0.0-alpha.1",
"version": "1.0.0-alpha.4",
"description": "Create files based on templates",
"repository": "https://github.com/chenasraf/simple-scaffold.git",
"author": "Chen Asraf <inbox@casraf.com>",
"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",

View File

@@ -3,6 +3,7 @@ export type FileResponseFn<T> = (fullPath: string, basedir: string, basename: st
export type FileResponse<T> = T | FileResponseFn<T>
export interface ScaffoldConfig {
/** The name supplied for the output templates */
name: string
templates: string[]
output: FileResponse<string>

View File

@@ -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/*"