From 015cb4e043ce87dc52f6d485b27d115aea45b8f5 Mon Sep 17 00:00:00 2001 From: alemagio Date: Sat, 18 Jul 2020 10:33:33 +0200 Subject: [PATCH] fix: fixed package from not publishing template root files (#6) --- saofile.js | 8 ++++++++ template/index.js | 2 +- template/package.json | 1 - 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/saofile.js b/saofile.js index d0a007a..8665a22 100644 --- a/saofile.js +++ b/saofile.js @@ -91,6 +91,14 @@ module.exports = { return data } }, + { + type: 'modify', + files: 'package.json', + handler(data, filepath) { + data.files = ['src'] + return data + } + }, { type: 'move', patterns: { diff --git a/template/index.js b/template/index.js index afc719f..42502b2 100644 --- a/template/index.js +++ b/template/index.js @@ -1,5 +1,5 @@ 'use strict' -const app = require('src') +const app = require('./src') module.exports = {} diff --git a/template/package.json b/template/package.json index d0163df..16125c5 100644 --- a/template/package.json +++ b/template/package.json @@ -6,7 +6,6 @@ "engines": { "node": ">=10.0.0" }, - "files": ["src/"], "scripts": { "lint": "eslint . && <%= npmClient %> run lint:lockfile", "lint:fix": "eslint . --fix",