Comparing version 0.1.11 to 0.1.13
@@ -8,2 +8,3 @@ #!/usr/bin/env node | ||
const get = require('lodash/get'); | ||
const { standardizePresetName } = require('../src/utils'); | ||
@@ -51,3 +52,3 @@ process.on('unhandledRejection', (err) => { | ||
const presetPath = resolveFrom(context, presetName); | ||
const presetPath = resolveFrom(context, standardizePresetName(presetName)); | ||
const run = haste(presetPath); | ||
@@ -54,0 +55,0 @@ const preset = require(presetPath); |
{ | ||
"name": "haste-cli", | ||
"version": "0.1.11", | ||
"version": "0.1.13", | ||
"main": "index.js", | ||
@@ -12,3 +12,3 @@ "author": "Ronen Amiel", | ||
"cosmiconfig": "^2.2.2", | ||
"haste-core": "^0.1.5", | ||
"haste-core": "^0.1.13", | ||
"lodash": "^4.17.4", | ||
@@ -15,0 +15,0 @@ "resolve-from": "~3.0.0", |
@@ -29,2 +29,10 @@ const path = require('path'); | ||
it('should normalize preset name', async () => { | ||
const result = await execa(process.execPath, [HASTE_BIN, 'build', '--preset', 'basic'], { | ||
cwd: path.join(__dirname, './fixtures/cli-configured'), | ||
}); | ||
expect(result.stdout).toMatch(/running build.../); | ||
}); | ||
it('should throw if no "preset" was configured (via cli/config)', async () => { | ||
@@ -48,3 +56,3 @@ expect.assertions(2); | ||
expect(error.code).toEqual(1); | ||
expect(error.message).toMatch(/Cannot find module 'some-preset'/); | ||
expect(error.message).toMatch(/Cannot find module 'haste-preset-some-preset'/); | ||
} | ||
@@ -51,0 +59,0 @@ }); |
9
140
5713
Updatedhaste-core@^0.1.13