Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion bin/vue-init
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,11 @@ function run () {
if (!hasSlash) {
// use official templates
template = 'vuejs-templates/' + template
checkDistBranch(template, downloadAndGenerate)
if (template.indexOf('#') !== -1) {
downloadAndGenerate(template)
} else {
checkDistBranch(template, downloadAndGenerate)
}
} else {
downloadAndGenerate(template)
}
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
"main": "lib/index.js",
"scripts": {
"test": "npm run lint && npm run e2e",
"lint": "eslint test/test.js lib bin/* --env mocha",
"lint": "eslint test/e2e/test.js lib bin/* --env mocha",
"e2e": "rimraf test/e2e/mock-template-build/*.* && cross-env BABEL_ENV=development mocha test/e2e/test.js --slow 1000 --compilers js:babel-core/register"
},
"dependencies": {
Expand Down
4 changes: 2 additions & 2 deletions test/e2e/test.js
Original file line number Diff line number Diff line change
Expand Up @@ -50,15 +50,15 @@ describe('vue-cli', () => {
})

it('read metadata from js', done => {
const meta = metadata('test-pkg', __dirname + '/mock-metadata-repo-js')
const meta = metadata('test-pkg', path.join(__dirname, '/mock-metadata-repo-js'))
expect(meta).to.be.an('object')
expect(meta.prompts).to.have.property('description')
done()
})

it('helpers', done => {
monkeyPatchInquirer(answers)
const buildPath = __dirname + '/mock-metadata-repo-js'
const buildPath = path.join(__dirname, '/mock-metadata-repo-js')
generate('test', buildPath, MOCK_TEMPLATE_BUILD_PATH, err => {
if (err) done(err)
const contents = fs.readFileSync(`${MOCK_TEMPLATE_BUILD_PATH}/readme.md`, 'utf-8')
Expand Down