diff --git a/packages/cli/CHANGELOG.md b/packages/cli/CHANGELOG.md
index 4b620690f..3453506e1 100644
--- a/packages/cli/CHANGELOG.md
+++ b/packages/cli/CHANGELOG.md
@@ -3,6 +3,15 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
+
+## [0.0.1-alpha.22](https://github.com/pattern-lab/patternlab-node/tree/master/packages/cli/compare/@pattern-lab/cli@0.0.1-alpha.21...@pattern-lab/cli@0.0.1-alpha.22) (2018-07-06)
+
+**Note:** Version bump only for package @pattern-lab/cli
+
+
+
+
+
## [0.0.1-alpha.21](https://github.com/pattern-lab/patternlab-node/tree/master/packages/cli/compare/@pattern-lab/cli@0.0.1-alpha.20...@pattern-lab/cli@0.0.1-alpha.21) (2018-07-06)
diff --git a/packages/cli/bin/cli-actions/init.js b/packages/cli/bin/cli-actions/init.js
index 6136ae193..a69d39642 100644
--- a/packages/cli/bin/cli-actions/init.js
+++ b/packages/cli/bin/cli-actions/init.js
@@ -45,7 +45,11 @@ const init = options =>
if (edition) {
spinner.text = `⊙ patternlab → Installing edition: ${edition}`;
- const newConf = yield installEdition(edition, patternlabConfig); // 3.1
+ const newConf = yield installEdition(
+ edition,
+ patternlabConfig,
+ projectDir
+ ); // 3.1
patternlabConfig = Object.assign(patternlabConfig, newConf); // 3.2
spinner.succeed(`⊙ patternlab → Installed edition: ${edition}`);
}
diff --git a/packages/cli/bin/install-edition.js b/packages/cli/bin/install-edition.js
index 278027dc6..dee31895c 100644
--- a/packages/cli/bin/install-edition.js
+++ b/packages/cli/bin/install-edition.js
@@ -1,20 +1,26 @@
'use strict';
+
const path = require('path');
-const pkg = require(path.resolve(process.cwd(), 'package.json'));
+const EOL = require('os').EOL;
const {
checkAndInstallPackage,
copyAsync,
wrapAsync,
writeJsonAsync,
+ getJSONKey,
} = require('./utils');
-const installEdition = (edition, config) =>
- wrapAsync(function*() {
+const installEdition = (edition, config, projectDir) => {
+ const pkg = require(path.resolve(projectDir, 'package.json'));
+
+ return wrapAsync(function*() {
/**
* 1. Trigger edition install
* 2. Copy over the mandatory edition files to sourceDir
- * 3. Do custom post-install procedures for different core editions:
- * 3.1 Copy gulpfile.js for edition-node-gulp
+ * 3. Copy dependencies defined in edition
+ * 4. Do custom post-install procedures for different core editions:
+ * 4.1 Copy gulpfile.js for edition-node-gulp
+ * 4.2 Copy scripts for edition-node
*/
const sourceDir = config.paths.source.root;
yield checkAndInstallPackage(edition); // 1
@@ -22,8 +28,13 @@ const installEdition = (edition, config) =>
path.resolve('./node_modules', edition, 'source', '_meta'),
path.resolve(sourceDir, '_meta')
); // 2
- switch (edition) { // 3
- // 3.1
+ pkg.dependencies = Object.assign(
+ {},
+ pkg.dependencies || {},
+ yield getJSONKey(edition, 'dependencies')
+ ); // 3
+ switch (edition) { // 4
+ // 4.1
case '@pattern-lab/edition-node-gulp': {
yield copyAsync(
path.resolve('./node_modules', edition, 'gulpfile.js'),
@@ -31,20 +42,22 @@ const installEdition = (edition, config) =>
);
break;
}
+ // 4.2
case '@pattern-lab/edition-node': {
- const scriptsJSON = {
- 'pl:build': 'patternlab build --config ./patternlab-config.json',
- 'pl:help': 'patternlab --help',
- 'pl:install': 'patternlab install --config ./patternlab-config.json',
- 'pl:serve': 'patternlab serve --config ./patternlab-config.json',
- 'pl:version': 'patternlab --version',
- };
- pkg.scripts = Object.assign({}, pkg.scripts || {}, scriptsJSON);
- yield writeJsonAsync('./package.json', pkg, { spaces: 2 });
+ pkg.scripts = Object.assign(
+ {},
+ pkg.scripts || {},
+ yield getJSONKey(edition, 'scripts')
+ );
break;
}
}
+ yield writeJsonAsync(path.resolve(projectDir, 'package.json'), pkg, {
+ spaces: 2,
+ EOL: EOL,
+ });
return config;
});
+};
module.exports = installEdition;
diff --git a/packages/cli/bin/utils.js b/packages/cli/bin/utils.js
index 10048ecee..0699bff36 100644
--- a/packages/cli/bin/utils.js
+++ b/packages/cli/bin/utils.js
@@ -175,6 +175,15 @@ const checkAndInstallPackage = (packageName, url) =>
*/
const noop = () => {};
+const getJSONKey = (packageName, key, fileName = 'package.json') =>
+ wrapAsync(function*() {
+ yield checkAndInstallPackage(packageName);
+ const packageJSON = yield fs.readJson(
+ path.resolve('node_modules', packageName, fileName)
+ );
+ return packageJSON[key];
+ });
+
module.exports = {
copyWithPattern,
copyAsync: fs.copy,
@@ -189,4 +198,5 @@ module.exports = {
wrapAsync,
checkAndInstallPackage,
noop,
+ getJSONKey,
};
diff --git a/packages/cli/package.json b/packages/cli/package.json
index fd6909bdb..a3cd8497a 100644
--- a/packages/cli/package.json
+++ b/packages/cli/package.json
@@ -1,7 +1,7 @@
{
"name": "@pattern-lab/cli",
"description": "Command-line interface (CLI) for the @pattern-lab/core.",
- "version": "0.0.1-alpha.21",
+ "version": "0.0.1-alpha.22",
"bin": {
"patternlab": "bin/patternlab.js"
},
@@ -9,8 +9,8 @@
"name": "Raphael Okon"
},
"dependencies": {
- "@pattern-lab/core": "^3.0.0-alpha.15",
- "@pattern-lab/live-server": "^1.3.3-alpha.5",
+ "@pattern-lab/core": "^3.0.0-alpha.16",
+ "@pattern-lab/live-server": "^1.3.3-alpha.6",
"archiver": "2.1.1",
"chalk": "2.4.1",
"commander": "2.15.1",
diff --git a/packages/core/CHANGELOG.md b/packages/core/CHANGELOG.md
index 1a4fa1bff..1ff344cf6 100644
--- a/packages/core/CHANGELOG.md
+++ b/packages/core/CHANGELOG.md
@@ -3,6 +3,15 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
+
+# [3.0.0-alpha.16](https://github.com/pattern-lab/patternlab-node/tree/master/packages/core/compare/@pattern-lab/core@3.0.0-alpha.15...@pattern-lab/core@3.0.0-alpha.16) (2018-07-06)
+
+**Note:** Version bump only for package @pattern-lab/core
+
+
+
+
+
# [3.0.0-alpha.15](https://github.com/pattern-lab/patternlab-node/tree/master/packages/core/compare/@pattern-lab/core@3.0.0-alpha.14...@pattern-lab/core@3.0.0-alpha.15) (2018-07-06)
diff --git a/packages/core/package.json b/packages/core/package.json
index f6aa51355..20b9015bf 100644
--- a/packages/core/package.json
+++ b/packages/core/package.json
@@ -1,11 +1,11 @@
{
"name": "@pattern-lab/core",
"description": "Create atomic design systems with Pattern Lab. This is the core API and orchestrator of the ecosystem.",
- "version": "3.0.0-alpha.15",
+ "version": "3.0.0-alpha.16",
"main": "./src/index.js",
"dependencies": {
"@pattern-lab/engine-mustache": "^2.0.0-alpha.8",
- "@pattern-lab/live-server": "^1.3.3-alpha.5",
+ "@pattern-lab/live-server": "^1.3.3-alpha.6",
"chalk": "1.1.3",
"chokidar": "1.7.0",
"dive": "0.5.0",
diff --git a/packages/development-edition-engine-react/CHANGELOG.md b/packages/development-edition-engine-react/CHANGELOG.md
index 05193524e..515588f83 100644
--- a/packages/development-edition-engine-react/CHANGELOG.md
+++ b/packages/development-edition-engine-react/CHANGELOG.md
@@ -3,6 +3,15 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
+
+## [0.1.1-alpha.4](https://github.com/pattern-lab/edition-node-gulp/compare/@pattern-lab/engine-react-testing-tree@0.1.1-alpha.3...@pattern-lab/engine-react-testing-tree@0.1.1-alpha.4) (2018-07-06)
+
+**Note:** Version bump only for package @pattern-lab/engine-react-testing-tree
+
+
+
+
+
## [0.1.1-alpha.3](https://github.com/pattern-lab/edition-node-gulp/compare/@pattern-lab/engine-react-testing-tree@0.1.1-alpha.2...@pattern-lab/engine-react-testing-tree@0.1.1-alpha.3) (2018-07-06)
diff --git a/packages/development-edition-engine-react/package.json b/packages/development-edition-engine-react/package.json
index 4ceaf1172..8fc886599 100644
--- a/packages/development-edition-engine-react/package.json
+++ b/packages/development-edition-engine-react/package.json
@@ -1,11 +1,11 @@
{
"name": "@pattern-lab/engine-react-testing-tree",
"description": "The tree of components we use to test, develop and validate the React engine",
- "version": "0.1.1-alpha.3",
+ "version": "0.1.1-alpha.4",
"private": true,
"main": "gulpfile.js",
"dependencies": {
- "@pattern-lab/core": "^3.0.0-alpha.15",
+ "@pattern-lab/core": "^3.0.0-alpha.16",
"@pattern-lab/engine-mustache": "^2.0.0-alpha.8",
"@pattern-lab/engine-react": "^0.2.1-alpha.5",
"@pattern-lab/uikit-workshop": "^1.0.0-alpha.7",
diff --git a/packages/edition-node-gulp/CHANGELOG.md b/packages/edition-node-gulp/CHANGELOG.md
index cfd8842e8..ce928004f 100644
--- a/packages/edition-node-gulp/CHANGELOG.md
+++ b/packages/edition-node-gulp/CHANGELOG.md
@@ -3,6 +3,15 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
+
+# [2.0.0-alpha.14](https://github.com/pattern-lab/patternlab-node/tree/master/packages/edition-node-gulp/compare/@pattern-lab/edition-node-gulp@2.0.0-alpha.13...@pattern-lab/edition-node-gulp@2.0.0-alpha.14) (2018-07-06)
+
+**Note:** Version bump only for package @pattern-lab/edition-node-gulp
+
+
+
+
+
# [2.0.0-alpha.13](https://github.com/pattern-lab/patternlab-node/tree/master/packages/edition-node-gulp/compare/@pattern-lab/edition-node-gulp@2.0.0-alpha.12...@pattern-lab/edition-node-gulp@2.0.0-alpha.13) (2018-07-06)
diff --git a/packages/edition-node-gulp/package.json b/packages/edition-node-gulp/package.json
index d78404ad2..c28a6d1df 100644
--- a/packages/edition-node-gulp/package.json
+++ b/packages/edition-node-gulp/package.json
@@ -1,11 +1,11 @@
{
"name": "@pattern-lab/edition-node-gulp",
"description": "The gulp wrapper around patternlab-node core, providing tasks to interact with the core library and move supporting frontend assets.",
- "version": "2.0.0-alpha.13",
+ "version": "2.0.0-alpha.14",
"main": "gulpfile.js",
"dependencies": {
- "@pattern-lab/cli": "^0.0.1-alpha.21",
- "@pattern-lab/core": "^3.0.0-alpha.15",
+ "@pattern-lab/cli": "^0.0.1-alpha.22",
+ "@pattern-lab/core": "^3.0.0-alpha.16",
"@pattern-lab/engine-mustache": "^2.0.0-alpha.8",
"@pattern-lab/uikit-workshop": "^1.0.0-alpha.7",
"gulp": "3.9.1",
diff --git a/packages/edition-node/CHANGELOG.md b/packages/edition-node/CHANGELOG.md
index aaff338e5..d99da0e1e 100644
--- a/packages/edition-node/CHANGELOG.md
+++ b/packages/edition-node/CHANGELOG.md
@@ -3,6 +3,15 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
+
+# [1.0.0-alpha.12](https://github.com/pattern-lab/patternlab-node/tree/master/packages/edition-node/compare/@pattern-lab/edition-node@1.0.0-alpha.11...@pattern-lab/edition-node@1.0.0-alpha.12) (2018-07-06)
+
+**Note:** Version bump only for package @pattern-lab/edition-node
+
+
+
+
+
# [1.0.0-alpha.11](https://github.com/pattern-lab/patternlab-node/tree/master/packages/edition-node/compare/@pattern-lab/edition-node@1.0.0-alpha.10...@pattern-lab/edition-node@1.0.0-alpha.11) (2018-07-06)
diff --git a/packages/edition-node/package.json b/packages/edition-node/package.json
index 3a5477bec..78bb0190f 100644
--- a/packages/edition-node/package.json
+++ b/packages/edition-node/package.json
@@ -1,11 +1,11 @@
{
"name": "@pattern-lab/edition-node",
"description": "A pure wrapper around patternlab-node core, the default pattern engine, and supporting frontend assets.",
- "version": "1.0.0-alpha.11",
+ "version": "1.0.0-alpha.12",
"main": "patternlab-config.json",
"dependencies": {
- "@pattern-lab/cli": "^0.0.1-alpha.21",
- "@pattern-lab/core": "^3.0.0-alpha.15",
+ "@pattern-lab/cli": "^0.0.1-alpha.22",
+ "@pattern-lab/core": "^3.0.0-alpha.16",
"@pattern-lab/engine-mustache": "^2.0.0-alpha.8",
"@pattern-lab/uikit-workshop": "^1.0.0-alpha.7"
},
@@ -19,11 +19,11 @@
"bugs": "https://github.com/pattern-lab/patternlab-node/issues",
"author": "Brian Muenzenmeyer",
"scripts": {
- "build": "patternlab build --config ./patternlab-config.json",
- "help": "patternlab --help",
- "install": "patternlab install --config ./patternlab-config.json",
- "serve": "patternlab serve --config ./patternlab-config.json",
- "version": "patternlab --version"
+ "pl:build": "patternlab build --config ./patternlab-config.json",
+ "pl:help": "patternlab --help",
+ "pl:install": "patternlab install --config ./patternlab-config.json",
+ "pl:serve": "patternlab serve --config ./patternlab-config.json",
+ "pl:version": "patternlab --version"
},
"license": "MIT",
"engines": {
diff --git a/packages/live-server/CHANGELOG.md b/packages/live-server/CHANGELOG.md
index 970a82a25..9396dc2a1 100644
--- a/packages/live-server/CHANGELOG.md
+++ b/packages/live-server/CHANGELOG.md
@@ -3,6 +3,18 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
+
+## [1.3.3-alpha.6](https://github.com/pattern-lab/patternlab-node/tree/master/packages/live-server/compare/@pattern-lab/live-server@1.3.3-alpha.5...@pattern-lab/live-server@1.3.3-alpha.6) (2018-07-06)
+
+
+### Bug Fixes
+
+* **dependencies:** pin all packages marked as latest ([87347d5](https://github.com/pattern-lab/patternlab-node/tree/master/packages/live-server/commit/87347d5))
+
+
+
+
+
## [1.3.3-alpha.5](https://github.com/pattern-lab/patternlab-node/tree/master/packages/live-server/compare/@pattern-lab/live-server@1.3.3-alpha.4...@pattern-lab/live-server@1.3.3-alpha.5) (2018-07-06)
diff --git a/packages/live-server/package.json b/packages/live-server/package.json
index f17a6bbba..2b10e9a10 100644
--- a/packages/live-server/package.json
+++ b/packages/live-server/package.json
@@ -1,6 +1,6 @@
{
"name": "@pattern-lab/live-server",
- "version": "1.3.3-alpha.5",
+ "version": "1.3.3-alpha.6",
"description": "simple development http server with live reload capability",
"keywords": [
"front-end",