Skip to content
This repository was archived by the owner on Jun 27, 2019. It is now read-only.

Commit bbc74cf

Browse files
committed
Fixes scoped starterkit regression. Updates dependencies
1 parent da8c987 commit bbc74cf

File tree

8 files changed

+828
-206
lines changed

8 files changed

+828
-206
lines changed

bin/inquiries/starterkit.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ const starterkitSetup = [{
88
choices: [
99
{
1010
name: 'starterkit-mustache-demo',
11-
value: 'starterkit-mustache-demo'
11+
value: '@pattern-lab/starterkit-mustache-demo'
1212
},
1313
{
1414
name: 'starterkit-mustache-bootstrap',
@@ -44,7 +44,7 @@ const starterkitSetup = [{
4444
},
4545
{
4646
name: 'starterkit-mustache-base',
47-
value: 'starterkit-mustache-base'
47+
value: '@pattern-lab/starterkit-mustache-base'
4848
},
4949
new inquirer.Separator(),
5050
{

bin/install-starterkit.js

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,12 @@ const checkAndInstallPackage = require('./utils').checkAndInstallPackage;
44
const copyAsync = require('./utils').copyAsync;
55
const wrapAsync = require('./utils').wrapAsync;
66

7-
const installStarterkit = (starterkit, config) => wrapAsync(function*() {
7+
const installStarterkit = (starterkit, config) => wrapAsync(function * () {
88
const sourceDir = config.paths.source.root;
9-
const name = starterkit.name || starterkit;
10-
const url = `pattern-lab/${name}`;
9+
const name = starterkit.value || starterkit;
10+
const url = name.startsWith('@pattern-lab/')
11+
? name
12+
: `pattern-lab/${name}`;
1113
yield checkAndInstallPackage(name, url);
1214
yield copyAsync(path.resolve('./node_modules', name, 'dist'), path.resolve(sourceDir));
1315
return name;

package.json

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -10,26 +10,26 @@
1010
},
1111
"private": true,
1212
"dependencies": {
13-
"@pattern-lab/live-server": "^1.3.2",
14-
"archiver": "2.0.3",
15-
"chalk": "2.1.0",
16-
"chokidar": "1.7.0",
17-
"commander": "2.11.0",
18-
"execa": "0.8.0",
13+
"@pattern-lab/live-server": "1.3.2",
14+
"archiver": "2.1.1",
15+
"chalk": "2.3.1",
16+
"chokidar": "2.0.2",
17+
"commander": "2.14.1",
18+
"execa": "0.9.0",
1919
"fs-promise": "2.0.3",
2020
"glob": "7.1.2",
2121
"has-yarn": "1.0.0",
22-
"inquirer": "3.3.0",
23-
"lodash": "4.17.4",
24-
"ora": "1.3.0",
22+
"inquirer": "5.1.0",
23+
"lodash": "4.17.5",
24+
"ora": "1.4.0",
2525
"path-exists": "3.0.0",
2626
"patternlab-node": "2.12.0",
2727
"sanitize-filename": "1.6.1"
2828
},
2929
"devDependencies": {
30-
"eslint": "4.8.0",
30+
"eslint": "4.17.0",
3131
"proxyquire": "1.8.0",
32-
"tap": "10.7.2"
32+
"tap": "11.1.0"
3333
},
3434
"files": [
3535
"bin"

test/cli-build.test.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ const wrapAsync = require('../bin/utils').wrapAsync;
88
const projectRoot = getUniqueProjectPath();
99

1010
tap.test('Init and build ->', t => wrapAsync(function*() {
11-
yield spawnCmd(['init', '--verbose', '--project-dir', projectRoot, '--edition', 'edition-node', '--starterkit', 'starterkit-mustache-base']);
11+
yield spawnCmd(['init', '--verbose', '--project-dir', projectRoot, '--edition', 'edition-node', '--starterkit', '@pattern-lab/starterkit-mustache-base']);
1212
yield spawnCmd(['build', '--config', `${projectRoot}/patternlab-config.json`]);
1313
t.ok(exists.sync(path.resolve(projectRoot, 'public')), 'should build all files into public dir');
1414
t.ok(exists.sync(path.resolve(projectRoot, 'public', 'annotations')), 'with a annotations dir');

test/cli-export.test.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ const wrapAsync = require('../bin/utils').wrapAsync;
88
const projectRoot = getUniqueProjectPath();
99

1010
tap.test('Init and export ->', t => wrapAsync(function*() {
11-
yield spawnCmd(['init', '--verbose', '--project-dir', projectRoot, '--edition', 'edition-node', '--starterkit', 'starterkit-mustache-base']);
11+
yield spawnCmd(['init', '--verbose', '--project-dir', projectRoot, '--edition', 'edition-node', '--starterkit', '@pattern-lab/starterkit-mustache-base']);
1212
yield spawnCmd(['export', '--config', `${projectRoot}/patternlab-config.json`]);
1313
t.ok(exists.sync(path.resolve(projectRoot, 'pattern_exports', 'patterns.zip')), ' should create patterns.zip');
1414
t.end();

test/cli-init.test.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ const wrapAsync = require('../bin/utils').wrapAsync;
88
const projectRoot = getUniqueProjectPath();
99

1010
tap.test('Init ->', t => wrapAsync(function*() {
11-
yield spawnCmd(['init', '--verbose', '--project-dir', projectRoot, '--edition', 'edition-node', '--starterkit', 'starterkit-mustache-base']);
11+
yield spawnCmd(['init', '--verbose', '--project-dir', projectRoot, '--edition', 'edition-node', '--starterkit', '@pattern-lab/starterkit-mustache-base']);
1212
t.ok(exists.sync(path.resolve(projectRoot)), 'should initialize a PatternLab project');
1313
t.ok(exists.sync(path.resolve(projectRoot, 'source')), 'with a source dir');
1414
t.ok(exists.sync(path.resolve(projectRoot, 'public')), 'with a public dir');

test/install-starterkit.test.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,15 +15,15 @@ const minimalConfig = {
1515
};
1616

1717
tap.test('Install starterkit-mustache-demo ->', t => wrapAsync(function*() {
18-
yield installStarterkit('starterkit-mustache-demo', minimalConfig);
19-
const pkg = yield moduleExist('starterkit-mustache-demo');
18+
yield installStarterkit('@pattern-lab/starterkit-mustache-demo', minimalConfig);
19+
const pkg = yield moduleExist('@pattern-lab/starterkit-mustache-demo');
2020
t.ok(pkg, 'module should exist after install');
2121
t.end();
2222
}));
2323

2424
tap.test('Install starterkit-mustache-base ->', t => wrapAsync(function*() {
25-
yield installStarterkit('starterkit-mustache-base', minimalConfig);
26-
const pkg = yield moduleExist('starterkit-mustache-base');
25+
yield installStarterkit('@pattern-lab/starterkit-mustache-base', minimalConfig);
26+
const pkg = yield moduleExist('@pattern-lab/starterkit-mustache-base');
2727
t.ok(pkg, 'module should exist after install');
2828
t.end();
2929
}));

0 commit comments

Comments
 (0)