Launch Week Day 5: Introducing Reachability for PHP.Learn More
Socket
Book a DemoSign in
Socket

cspell-dict-golang

Package Overview
Dependencies
Maintainers
1
Versions
17
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

cspell-dict-golang - npm Package Compare versions

Comparing version
1.1.1
to
1.1.2
+10
CHANGELOG.md
# Change Log
# 1.1.2
- Add dictionary description.
## 1.1.0
- Add keywords for Go 1.9
## 1.0.0
- Initial Release
export function getConfigLocation(): string;
'use strict';
var util = require('./util');
function getConfigLocation() {
return util.configLocation;
}
module.exports = {
getConfigLocation,
};
#!/usr/bin/env node
'use strict';
var util = require('./util');
util.install();
#!/usr/bin/env node
'use strict';
var util = require('./util');
util.uninstall();
'use strict';
// Cspell:word configstore
var Configstore = require('configstore');
var Path = require('path');
var packageName = 'cspell';
var importPath = 'import';
var configLocation = Path.join(__dirname, 'cspell-ext.json');
function getImports(conf) {
var imports = conf.get(importPath);
imports = imports || [];
if (typeof imports === 'string') {
imports = [imports];
}
return imports;
}
function install() {
var conf = new Configstore(packageName);
/** @type {string[]|string|undefined} */
var imports = getImports(conf);
if (imports.indexOf(configLocation) < 0) {
imports.push(configLocation);
conf.set(importPath, imports);
}
}
function uninstall() {
var conf = new Configstore(packageName);
/** @type {string[]|string|undefined} */
var imports = getImports(conf);
var index = imports.indexOf(configLocation);
if (index >= 0) {
imports.splice(index, 1);
conf.set(importPath, imports);
}
}
module.exports = {
install,
uninstall,
configLocation,
};
+14
-3
// cSpell Settings
{
"id": "golang",
"name": "Go Language",
"description": "Go Language Dictionary",
// List of dictionary files to add to the global list of dictionaries
"dictionaryDefinitions": [
{ "name": "golang", "file": "./go.txt.gz" }
{
"name": "golang",
"file": "./go.txt.gz",
"description": "Go Language Dictionary"
}
],

@@ -18,7 +25,11 @@ // Dictionaries to always be used.

// Language local. i.e. en-US, de-AT, or ru. * will match all locals.
// Multiple locals can be specified like: "en, en-US" to match both English and English US.
"local": "*",
// It is common in Go to glue words together.
"allowCompoundWords": true,
// By default the whole text of a file is included for spell checking
// Adding patterns to the "includeRegExpList" to only include matching patterns
"includeRegExpList": [],
// To exclude patterns, add them to "ignoreRegExpList"
"ignoreRegExpList": [],
"includeRegExpList": [],
// regex patterns than can be used with ignoreRegExpList or includeRegExpList

@@ -30,3 +41,3 @@ // Example: "pattern": [{ "name": "mdash", "pattern": "&mdash;" }]

"dictionaries": ["golang"],
// Dictionary definitions can also be supplied here
// Dictionary definitions can also be supplied here. They are only used iff "languageId" and "local" match.
"dictionaryDefinitions": []

@@ -33,0 +44,0 @@ }

{
"name": "cspell-dict-golang",
"version": "1.1.1",
"description": "Golang dictionary for cspell.",
"version": "1.1.2",
"description": "Go Language dictionary for cspell.",
"bin": {
"cspell-dict-golang-link": "./link.js",
"cspell-dict-golang-unlink": "./unlink.js"
},
"scripts": {
"build": "cspell-tools compile \"go.txt\" -o ."
"build": "cspell-tools compile \"go.txt\" -o .",
"prepublishOnly": "cp ../util/* .",
"cspell-link": "node link.js",
"cspell-unlink": "node unlink.js",
"publish-minor": "npm version minor && npm publish",
"publish-patch": "npm version patch && npm publish"
},

@@ -15,2 +24,3 @@ "repository": {

"golang",
"Go Language",
"dictionary",

@@ -30,2 +40,5 @@ "spelling"

},
"dependencies": {
"configstore": "^3.1.0"
},
"files": [

@@ -32,0 +45,0 @@ "go.txt.gz",

@@ -1,3 +0,5 @@

# Cspell Golang Dictionary
# Cspell Go Language Dictionary
Go Language dictionary for cspell.
This is a pre-built dictionary for use with cspell.

@@ -7,4 +9,21 @@

## Usage
This dictionary is included by default in cSpell.
## Installation
Global Install and add to cspell global settings.
```sh
npm install -g cspell-dict-golang
cspell-dict-golang-link
```
## Uninstall from cspell
```sh
cspell-dict-golang-unlink
```
## Manual Installation
The `cspell-ext.json` file in this package should be added to the import section in your cspell.json file.

@@ -15,3 +34,3 @@

// …
"import": ["<path to node>/cspell-dict-golang/cspell-ext.json"],
"import": ["<path to node_modules>/cspell-dict-golang/cspell-ext.json"],
// …

@@ -34,2 +53,3 @@ }

MIT
MIT
> Some packages may have other licenses included.