Skip to content

Commit bfef44d

Browse files
committed
Merge branch 'dev' into feature/fix-directory-naming
# Conflicts: # packages/uikit-workshop/dist/styleguide/js/patternlab-viewer.js
2 parents 911480f + a93e552 commit bfef44d

File tree

22 files changed

+26
-46
lines changed

22 files changed

+26
-46
lines changed

netlify.toml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
[context.deploy-preview]
2+
command = "npm run preview:hbs"

package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,8 @@
2929
"test": "lerna run test",
3030
"clean": "git clean -dfx",
3131
"publish": "npx lerna publish -m \"[skip travis] chore(release): publish %s\"",
32-
"postpublish": "auto release"
32+
"postpublish": "auto release",
33+
"preview:hbs": "cd packages/development-edition-engine-handlebars && npx patternlab add --starterkits '@pattern-lab/starterkit-handlebars-vanilla' && npm run pl:build"
3334
},
3435
"nyc": {
3536
"exclude": [

packages/core/src/lib/plugin_manager.js

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22

33
const plugin_manager = function() {
44
const path = require('path');
5-
const findModules = require('./findModules');
65
const logger = require('./log');
76

87
const pluginMatcher = /^plugin-(.*)$/;
@@ -38,25 +37,25 @@ const plugin_manager = function() {
3837
* @param {object} patternlab
3938
*/
4039
function initializePlugins(patternlab) {
41-
const nodeModulesPath = path.join(process.cwd(), 'node_modules');
42-
const foundPlugins = findModules(nodeModulesPath, isPlugin);
40+
const foundPlugins = Object.keys(patternlab.config.plugins || {});
4341
foundPlugins.forEach(plugin => {
44-
logger.info(`Found plugin: plugin-${plugin.name}`);
42+
logger.info(`Found plugin: ${plugin}`);
4543
logger.info(`Attempting to load and initialize plugin.`);
46-
const pluginModule = loadPlugin(plugin.modulePath);
44+
const pluginModule = loadPlugin(
45+
path.join(process.cwd(), 'node_modules', plugin)
46+
);
4747
pluginModule(patternlab);
4848
});
4949
}
5050

51-
async function raiseEvent(patternlab, eventName, ...args) {
51+
async function raiseEvent(patternlab, eventName, args) {
5252
patternlab.events.emit(eventName, args);
53-
5453
await (async function() {
5554
const hookHandlers = (patternlab.hooks[eventName] || []).map(h =>
5655
h(args)
5756
);
5857

59-
const results = await Promise.all(hookHandlers);
58+
await Promise.all(hookHandlers);
6059
})();
6160
}
6261

packages/development-edition-engine-handlebars/source/_patterns/atoms/swatches/swatch.hbs

Lines changed: 0 additions & 6 deletions
This file was deleted.

packages/development-edition-engine-handlebars/source/_patterns/atoms/swatches/swatch.json

Lines changed: 0 additions & 7 deletions
This file was deleted.

packages/development-edition-engine-handlebars/source/_patterns/atoms/swatches/swatch.md

Lines changed: 0 additions & 1 deletion
This file was deleted.

packages/development-edition-engine-handlebars/source/_patterns/atoms/swatches/swatch.scss

Lines changed: 0 additions & 3 deletions
This file was deleted.

packages/development-edition-engine-handlebars/source/_patterns/atoms/text/helper.hbs

Lines changed: 0 additions & 1 deletion
This file was deleted.

packages/development-edition-engine-handlebars/source/_patterns/atoms/type.md

Lines changed: 0 additions & 1 deletion
This file was deleted.

packages/development-edition-engine-handlebars/source/_patterns/atoms/type/annotation.hbs

Lines changed: 0 additions & 1 deletion
This file was deleted.

0 commit comments

Comments
 (0)