Skip to content

Commit de44a90

Browse files
authored
chore: remove postclone script from plugins package.json (#167)
1 parent 09813b0 commit de44a90

File tree

3 files changed

+7
-1
lines changed

3 files changed

+7
-1
lines changed

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ src/*.d.ts
1010
!src/references.d.ts
1111
!src/scripts/*.js
1212
!seed-tests/*.js
13-
seed-tests/seed-copy/**/*.*
13+
seed-tests/seed-copy
1414
seed-tests/seed-copy-new-git-repo/**/*.*
1515
!demo/karma.conf.js
1616
!demo/app/tests/*.js

seed-tests/postclone.tests.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -178,6 +178,11 @@ describe('postclone', function () {
178178
expect(fs.existsSync(constants.SEED_COPY_LOCATION + "/src/scripts/postclone.js")).toBeFalsy();
179179
});
180180

181+
it('should delete the postclone script', function () {
182+
let packageJsonContents = fs.readFileSync(constants.SEED_COPY_LOCATION + "/src/package.json").toString('utf-8');
183+
expect(packageJsonContents.includes("postclone")).toBeFalsy();
184+
});
185+
181186
it('should delete the seed tests folder', function () {
182187
expect(fs.existsSync(constants.SEED_COPY_LOCATION + "/seed-tests")).toBeFalsy();
183188
});

src/scripts/postclone.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -455,6 +455,7 @@ function updateSrcJson() {
455455
let pluginScripts = getPluginScripts();
456456

457457
var newScripts = updateObject(pluginScripts, jsonScripts);
458+
delete newScripts["postclone"];
458459
jsonObject["scripts"] = newScripts;
459460

460461
fs.writeFileSync(jsonPath, JSON.stringify(jsonObject, null, "\t"));

0 commit comments

Comments
 (0)