Skip to content

Commit 8986a29

Browse files
committed
Merge branch 'dev' into feature/fix-directory-naming
2 parents 936be65 + d060200 commit 8986a29

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

63 files changed

+605
-262
lines changed

.github/FUNDING.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# These are supported funding model platforms
2+
3+
patreon: patternlab

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ Thumbs.db
55
.nyc_output/
66
.vscode/
77
.idea/
8+
.env
89
packages/core/test/public
910
packages/*/public
1011
!packages/core/test/patterns/public/.gitkeep

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,7 @@ Pattern Lab / Node wouldn't be what it is today without the support of the commu
6161
6262
* **[Brad Frost](http://bradfrost.com/)**
6363
* [Marcos Peebles](https://twitter.com/marcospeebles)
64+
* [Maximilian Franzke](https://twitter.com/maedmaex)
6465
* [Susan Simkins](https://twitter.com/susanmsimkins)
6566
6667
## Contributing

lerna.json

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,10 @@
1919
]
2020
},
2121
"publish": {
22-
"allowBranch": "master"
22+
"allowBranch": [
23+
"dev",
24+
"master"
25+
]
2326
}
2427
},
2528
"npmClientArgs": [

package.json

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,12 @@
1010
"eslint-plugin-prettier": "^3.1.0",
1111
"lerna": "3.11.0",
1212
"prettier": "^1.14.3",
13-
"pretty-quick": "^1.11.1"
13+
"pretty-quick": "^1.11.1",
14+
"auto": "^7.8.0"
15+
},
16+
"repository": {
17+
"type": "git",
18+
"url": "git+https://github.com/pattern-lab/patternlab-node.git"
1419
},
1520
"private": true,
1621
"scripts": {
@@ -22,7 +27,9 @@
2227
"lint:fix": "npm run lint -- --fix",
2328
"lint": "eslint --max-warnings 0 './packages/{core,cli,uikit-workshop}/**/*.js ' --ignore-path .eslintignore",
2429
"test": "lerna run test",
25-
"clean": "git clean -dfx"
30+
"clean": "git clean -dfx",
31+
"publish": "npx lerna publish -m \"[skip travis] chore(release): publish %s\"",
32+
"postpublish": "auto release"
2633
},
2734
"nyc": {
2835
"exclude": [

packages/cli/CHANGELOG.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,15 @@
33
All notable changes to this project will be documented in this file.
44
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
55

6+
## [1.0.3](https://github.com/pattern-lab/patternlab-node/tree/master/packages/cli/compare/@pattern-lab/[email protected]...@pattern-lab/[email protected]) (2019-10-14)
7+
8+
**Note:** Version bump only for package @pattern-lab/cli
9+
10+
11+
12+
13+
14+
615
# [1.0.0](https://github.com/pattern-lab/patternlab-node/tree/master/packages/cli/compare/@pattern-lab/[email protected]...@pattern-lab/[email protected]) (2019-08-23)
716

817

packages/cli/bin/inquiries/starterkit.js

Lines changed: 13 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -10,42 +10,46 @@ const starterkitSetup = [
1010
message: 'Which starterkit do you want to use?',
1111
choices: [
1212
{
13-
name: 'starterkit-handlebars-demo [Recommended]',
13+
name: 'starterkit-handlebars-demo (Recommended)',
1414
value: '@pattern-lab/starterkit-handlebars-demo',
1515
},
1616
{
17-
name: 'starterkit-twig-demo [Recommended]',
17+
name: 'starterkit-handlebars-vanilla (Recommended)',
18+
value: '@pattern-lab/starterkit-handlebars-vanilla',
19+
},
20+
{
21+
name: 'starterkit-twig-demo (Recommended)',
1822
value: '@pattern-lab/starterkit-twig-demo',
19-
},
23+
},
2024
{
2125
name: 'starterkit-mustache-bootstrap',
2226
value: 'starterkit-mustache-bootstrap',
23-
},
27+
},
2428
{
2529
name: 'starterkit-mustache-demo',
2630
value: '@pattern-lab/starterkit-mustache-demo',
27-
},
31+
},
2832
{
2933
name: 'starterkit-mustache-foundation',
3034
value: 'starterkit-mustache-foundation',
31-
},
35+
},
3236
{
3337
name: 'starterkit-mustache-materialdesign',
3438
value: 'starterkit-mustache-materialdesign',
35-
},
39+
},
3640
{
3741
name: 'starterkit-mustache-base',
3842
value: '@pattern-lab/starterkit-mustache-base',
3943
},
40-
44+
4145
new inquirer.Separator(),
4246
{
4347
name: 'Custom starterkit',
4448
value: CUSTOM_STARTERKIT,
4549
},
4650
new inquirer.Separator(),
4751
{
48-
name: 'None',
52+
name: 'None (Start a blank project)',
4953
value: false,
5054
},
5155
],

packages/cli/bin/install-plugin.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ const installPlugin = (plugin, config) =>
2222
try {
2323
const pluginConfigJSON = require(pluginPathConfig);
2424
if (!_.has(config.plugins[name].options)) {
25-
_.set(config, `plugins[${name}]['options]`, pluginConfigJSON);
25+
_.set(config, `plugins[${name}][options]`, pluginConfigJSON);
2626
}
2727
} catch (ex) {
2828
//a config.json file is not required at this time

packages/cli/bin/install-starterkit.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,7 @@ const installStarterkit = (starterkit, config) =>
1212
wrapAsync(function*() {
1313
const sourceDir = config.paths.source.root;
1414
const name = starterkit.value || starterkit;
15-
const url = name.startsWith('@pattern-lab/') ? name : `pattern-lab/${name}`;
16-
yield checkAndInstallPackage(name, url);
15+
yield checkAndInstallPackage(name);
1716
const kitPath = path.resolve('./node_modules', name);
1817
yield copyAsync(path.resolve(kitPath, 'dist'), path.resolve(sourceDir));
1918
let kitConfig;

packages/cli/bin/utils.js

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -126,16 +126,15 @@ const copyWithPattern = (cwd, pattern, dest) =>
126126
* @func fetchPackage
127127
* @desc Fetches and saves packages from npm into node_modules and adds a reference in the package.json under dependencies
128128
* @param {string} packageName - The package name
129-
* @param {string} [url] - A URL which will be used to fetch the package from
130129
*/
131-
const fetchPackage = (packageName, url) =>
130+
const fetchPackage = packageName =>
132131
wrapAsync(function*() {
133132
const useYarn = hasYarn();
134133
const pm = useYarn ? 'yarn' : 'npm';
135134
const installCmd = useYarn ? 'add' : 'install';
136135
try {
137-
if (packageName || url) {
138-
const cmd = yield spawn(pm, [installCmd, url || packageName]);
136+
if (packageName) {
137+
const cmd = yield spawn(pm, [installCmd, packageName]);
139138
error(cmd.stderr);
140139
}
141140
} catch (err) {
@@ -150,10 +149,9 @@ const fetchPackage = (packageName, url) =>
150149
* @func checkAndInstallPackage
151150
* Checks whether a package for a given packageName is installed locally. If package cannot be found, fetch and install it
152151
* @param {string} packageName - The package name
153-
* @param {string} [url] - A URL which will be used to fetch the package from
154152
* @return {boolean}
155153
*/
156-
const checkAndInstallPackage = (packageName, url) =>
154+
const checkAndInstallPackage = packageName =>
157155
wrapAsync(function*() {
158156
try {
159157
require.resolve(packageName);
@@ -162,7 +160,7 @@ const checkAndInstallPackage = (packageName, url) =>
162160
debug(
163161
`checkAndInstallPackage: ${packageName} not installed. Fetching it now …`
164162
);
165-
yield fetchPackage(packageName, url);
163+
yield fetchPackage(packageName);
166164
return false;
167165
}
168166
});

0 commit comments

Comments
 (0)