Skip to content

Commit 18260d1

Browse files
committed
🐛 fix: copy-templates script
1 parent 3924c05 commit 18260d1

File tree

2 files changed

+2
-11
lines changed

2 files changed

+2
-11
lines changed

__tests__/cli.test.ts

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,11 @@
11
import { filesystem, system } from 'gluegun';
2-
import { PackageJSON } from 'gluegun/build/types/toolbox/meta-types';
32

43
const src = filesystem.path(__dirname, '..');
54

65
const cli = async (cmd) =>
76
system.run('node ' + filesystem.path(src, 'bin', 'ngx-devs-cli') + ` ${cmd}`);
87

98
describe('[CLI]', () => {
10-
describe('[Commands: version]', () => {
11-
test('should output package.json version', async () => {
12-
const packageJson: PackageJSON = require('../package.json');
13-
const version = packageJson?.version;
14-
const output = await cli('-v');
15-
expect(output).toContain(version);
16-
});
17-
});
18-
199
describe('[Commands: generate page component]', () => {
2010
afterEach(() => {
2111
filesystem.remove('sample');

package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
"scripts": {
1717
"clean-build": "rm -rf ./build",
1818
"compile": "tsc -p .",
19-
"copy-templates": "copyfiles ./src/templates/* ./build/templates",
19+
"copy-templates": "copyfiles --up 1 ./src/templates/** ./build",
2020
"build": "npm run clean-build && npm run compile && npm run copy-templates",
2121
"prepublishOnly": "npm run build",
2222
"format": "eslint \"**/*.{js,jsx,ts,tsx}\" --fix && prettier \"**/*.{js,jsx,ts,tsx,json}\" --write",
@@ -43,6 +43,7 @@
4343
"devDependencies": {
4444
"@commitlint/cli": "^16.2.3",
4545
"@commitlint/config-conventional": "^16.2.1",
46+
"@ngx-devs/commitlint-plugin-imperative": "^1.1.1",
4647
"@semantic-release/changelog": "^6.0.1",
4748
"@semantic-release/git": "^10.0.1",
4849
"@types/jest": "^26.0.20",

0 commit comments

Comments
 (0)