Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Build] add plugins to root #281

Merged
merged 1 commit into from
Apr 12, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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