Skip to content

Commit

Permalink
#576 - .nuxtignore (NuxtJS) support
Browse files Browse the repository at this point in the history
  • Loading branch information
hsz committed Apr 4, 2019
1 parent 3dfda66 commit 394ea36
Show file tree
Hide file tree
Showing 12 changed files with 133 additions and 0 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ Change Log
**Implemented enhancements:**

- .gcloudignore (Google Cloud) support [\#577](https://github.com/hsz/idea-gitignore/issues/577)
- .nuxtignore (Nuxt.js) support [\#576](https://github.com/hsz/idea-gitignore/issues/576)

**Fixed bugs:**

Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,7 @@ Changelog
**Implemented enhancements:**

- .gcloudignore (Google Cloud) support [\#577](https://github.com/hsz/idea-gitignore/issues/577)
- .nuxtignore (Nuxt.js) support [\#576](https://github.com/hsz/idea-gitignore/issues/576)

**Fixed bugs:**

Expand Down
11 changes: 11 additions & 0 deletions resources/META-INF/plugin.xml
Original file line number Diff line number Diff line change
Expand Up @@ -426,6 +426,17 @@
implementationClass="mobi.hsz.idea.gitignore.highlighter.IgnoreHighlighterFactory"/>
<!-- END Npm -->

<!-- NuxtJS -->
<lang.parserDefinition language="NuxtJS"
implementationClass="mobi.hsz.idea.gitignore.lang.IgnoreParserDefinition"/>
<codeInsight.lineMarkerProvider language="NuxtJS"
implementationClass="mobi.hsz.idea.gitignore.daemon.IgnoreDirectoryMarkerProvider"/>
<lang.braceMatcher language="NuxtJS" implementationClass="mobi.hsz.idea.gitignore.lang.IgnoreBraceMatcher"/>
<lang.commenter language="NuxtJS" implementationClass="mobi.hsz.idea.gitignore.lang.IgnoreCommenter"/>
<lang.syntaxHighlighterFactory language="NuxtJS"
implementationClass="mobi.hsz.idea.gitignore.highlighter.IgnoreHighlighterFactory"/>
<!-- END NuxtJS -->

<!-- Perforce -->
<lang.parserDefinition language="Perforce"
implementationClass="mobi.hsz.idea.gitignore.lang.IgnoreParserDefinition"/>
Expand Down
Binary file added resources/icons/icon_nuxtjs.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added resources/icons/[email protected]
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added resources/icons/icon_nuxtjs@2x_dark.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added resources/icons/icon_nuxtjs_dark.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions resources/messages/IgnoreBundle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -157,6 +157,9 @@ notification.untrack.content=<b>.ignore</b> plugin found some files that are tra
notification.update.title=<b>.ignore</b> plugin updated to v{0}
notification.update.content=<br/>\
Helpful? <b><a href="https://www.paypal.me/hsz">Donate with PayPal</a> or <a href="https://opencollective.com/ignore">OpenCollective!</a></b><br/><br/>\
Implemented enhancements:<br/>\
- .gcloudignore (Google Cloud) support (#577)<br/>\
- .nuxtignore (Nuxt.js) support (#576)<br/>\
Fixes:<br/>\
- Adding 2+ templates without new line in between (#561)<br/>\
<br/>\
Expand Down
2 changes: 2 additions & 0 deletions src/mobi/hsz/idea/gitignore/IgnoreBundle.java
Original file line number Diff line number Diff line change
Expand Up @@ -79,13 +79,15 @@ private IgnoreBundle() {
FossilLanguage.INSTANCE,
GitLanguage.INSTANCE,
GitExcludeLanguage.INSTANCE,
GoogleCloudLanguage.INSTANCE,
HelmLanguage.INSTANCE,
JetpackLanguage.INSTANCE,
JSHintLanguage.INSTANCE,
MercurialLanguage.INSTANCE,
MonotoneLanguage.INSTANCE,
NodemonLanguage.INSTANCE,
NpmLanguage.INSTANCE,
NuxtJSLanguage.INSTANCE,
PerforceLanguage.INSTANCE,
PrettierLanguage.INSTANCE,
StyleLintLanguage.INSTANCE,
Expand Down
44 changes: 44 additions & 0 deletions src/mobi/hsz/idea/gitignore/file/type/kind/NuxtJSFileType.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
/*
* The MIT License (MIT)
*
* Copyright (c) 2019 hsz Jakub Chrzanowski <[email protected]>
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in all
* copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*/

package mobi.hsz.idea.gitignore.file.type.kind;

import mobi.hsz.idea.gitignore.file.type.IgnoreFileType;
import mobi.hsz.idea.gitignore.lang.kind.NuxtJSLanguage;

/**
* Describes NuxtJS file type.
*
* @author Jakub Chrzanowski <[email protected]>
* @since 3.1
*/
public class NuxtJSFileType extends IgnoreFileType {
/** Contains {@link NuxtJSFileType} singleton. */
public static final NuxtJSFileType INSTANCE = new NuxtJSFileType();

/** Private constructor to prevent direct object creation. */
private NuxtJSFileType() {
super(NuxtJSLanguage.INSTANCE);
}
}
68 changes: 68 additions & 0 deletions src/mobi/hsz/idea/gitignore/lang/kind/NuxtJSLanguage.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
/*
* The MIT License (MIT)
*
* Copyright (c) 2019 hsz Jakub Chrzanowski <[email protected]>
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in all
* copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*/

package mobi.hsz.idea.gitignore.lang.kind;

import mobi.hsz.idea.gitignore.file.type.IgnoreFileType;
import mobi.hsz.idea.gitignore.file.type.kind.NuxtJSFileType;
import mobi.hsz.idea.gitignore.lang.IgnoreLanguage;
import mobi.hsz.idea.gitignore.util.Icons;
import org.jetbrains.annotations.NotNull;

/**
* NuxtJS {@link IgnoreLanguage} definition.
*
* @author Jakub Chrzanowski <[email protected]>
* @since 3.1
*/
public class NuxtJSLanguage extends IgnoreLanguage {
/** The {@link NuxtJSLanguage} instance. */
public static final NuxtJSLanguage INSTANCE = new NuxtJSLanguage();

/** {@link IgnoreLanguage} is a non-instantiable static class. */
private NuxtJSLanguage() {
super("NuxtJS", "nuxtignore", null, Icons.NUXTJS);
}

/**
* Language file type.
*
* @return {@link NuxtJSFileType} instance
*/
@NotNull
@Override
public IgnoreFileType getFileType() {
return NuxtJSFileType.INSTANCE;
}

/**
* Language is related to the VCS.
*
* @return is VCS
*/
@Override
public boolean isVCS() {
return false;
}
}
3 changes: 3 additions & 0 deletions src/mobi/hsz/idea/gitignore/util/Icons.java
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,9 @@ public class Icons {
/** Npmignore icon. */
public static final Icon NPM = IconLoader.getIcon("/icons/icon_npm.png");

/** NuxtJS icon. */
public static final Icon NUXTJS = IconLoader.getIcon("/icons/icon_nuxtjs.png");

/** Perforce icon. */
public static final Icon PERFORCE = IconLoader.getIcon("/icons/icon_perforce.png");

Expand Down

0 comments on commit 394ea36

Please sign in to comment.