Skip to content

Commit

Permalink
fix(plugin): correct spelling error and function locations
Browse files Browse the repository at this point in the history
Fix for #916
  • Loading branch information
enigmatic committed Mar 19, 2019
1 parent d7fa04d commit d4abd88
Show file tree
Hide file tree
Showing 6 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion packages/cli/bin/install-plugin.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ const installPlugin = (plugin, config) =>
try {
const pluginConfigJSON = require(pluginPathConfig);
if (!_.has(config.plugins[name].options)) {
_.set(config, `plugins[${name}]['options]`, pluginConfigJSON);
_.set(config, `plugins[${name}][options]`, pluginConfigJSON);
}
} catch (ex) {
//a config.json file is not required at this time
Expand Down
4 changes: 2 additions & 2 deletions packages/core/src/lib/plugin_manager.js
Original file line number Diff line number Diff line change
Expand Up @@ -42,11 +42,11 @@ const plugin_manager = function() {
*/
function initializePlugins(patternlab) {
const nodeModulesPath = path.join(process.cwd(), 'node_modules');
const foundPlugins = findModules(nodeModulesPath, plugin_manager.is_plugin);
const foundPlugins = findModules(nodeModulesPath, isPlugin);
foundPlugins.forEach(plugin => {
logger.info(`Found plugin: plugin-${plugin.name}`);
logger.info(`Attempting to load and initialize plugin.`);
const pluginModule = plugin_manager.load_plugin(plugin.modulePath);
const pluginModule = loadPlugin(plugin.modulePath);
pluginModule(patternlab);
});
}
Expand Down
2 changes: 1 addition & 1 deletion packages/plugin-tab/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ Example:

```
"plugins": {
"pattern-lab-plugin-tab": {
"@pattern-lab/plugin-tab": {
"enabled": true,
"initialized": false,
"options": {
Expand Down
2 changes: 1 addition & 1 deletion packages/plugin-tab/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ const glob = require('glob');

const tab_loader = require('./src/tab-loader');

const pluginName = 'pattern-lab-plugin-tab';
const pluginName = '@pattern-lab/plugin-tab';

function writeConfigToOutput(patternlab, pluginConfig) {
try {
Expand Down
2 changes: 1 addition & 1 deletion packages/plugin-tab/src/tab-loader.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ const fs = require('fs-extra');
function findTab(patternlab, pattern) {
//read the filetypes from the configuration
const fileTypes =
patternlab.config.plugins['pattern-lab-plugin-tab'].options.tabsToAdd;
patternlab.config.plugins['@pattern-lab/plugin-tab'].options.tabsToAdd;

//exit if either of these two parameters are missing
if (!patternlab) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ const scriptjs = require('scriptjs');
export const pluginLoader = {
init() {
for (let i = 0; i < window.plugins.length; ++i) {
const plugin = window.lugins[i];
const plugin = window.plugins[i];

// load the templates
for (const key in plugin.templates) {
Expand Down

0 comments on commit d4abd88

Please sign in to comment.