Skip to content

Commit

Permalink
[Build] add plugins to root (#281)
Browse files Browse the repository at this point in the history
  • Loading branch information
kavilla authored Apr 12, 2021
1 parent 9e4400b commit b12ea28
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 3 deletions.
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ target
/test/*/screenshots/visual_regression_gallery.html
/html_docs
.eslintcache
/plugins/
/data
disabledPlugins
webpackstats.json
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,11 +43,15 @@ const GENERATED_DIR = Path.resolve(REPO_ROOT, `plugins`);
expect.addSnapshotSerializer(createAbsolutePathSerializer());

beforeEach(async () => {
await del(GENERATED_DIR, { force: true });
await del([`${GENERATED_DIR}/**`, `!${GENERATED_DIR}`, `!${GENERATED_DIR}/.gitignore`], {
force: true,
});
});

afterEach(async () => {
await del(GENERATED_DIR, { force: true });
await del([`${GENERATED_DIR}/**`, `!${GENERATED_DIR}`, `!${GENERATED_DIR}/.gitignore`], {
force: true,
});
});

it('generates a plugin', async () => {
Expand All @@ -66,6 +70,7 @@ it('generates a plugin', async () => {

expect(paths.sort((a, b) => a.localeCompare(b))).toMatchInlineSnapshot(`
Array [
<absolute path>/plugins/.gitignore,
<absolute path>/plugins/foo/.eslintrc.js,
<absolute path>/plugins/foo/.gitignore,
<absolute path>/plugins/foo/.i18nrc.json,
Expand Down Expand Up @@ -105,6 +110,7 @@ it('generates a plugin without UI', async () => {

expect(paths.sort((a, b) => a.localeCompare(b))).toMatchInlineSnapshot(`
Array [
<absolute path>/plugins/.gitignore,
<absolute path>/plugins/bar/.eslintrc.js,
<absolute path>/plugins/bar/.gitignore,
<absolute path>/plugins/bar/.i18nrc.json,
Expand Down Expand Up @@ -137,6 +143,7 @@ it('generates a plugin without server plugin', async () => {

expect(paths.sort((a, b) => a.localeCompare(b))).toMatchInlineSnapshot(`
Array [
<absolute path>/plugins/.gitignore,
<absolute path>/plugins/baz/.eslintrc.js,
<absolute path>/plugins/baz/.gitignore,
<absolute path>/plugins/baz/.i18nrc.json,
Expand Down
4 changes: 4 additions & 0 deletions plugins/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# Ignore everything in this directory
*
# Except this file
!.gitignore

0 comments on commit b12ea28

Please sign in to comment.