add npmignore

This commit is contained in:
Evan You
2018-01-05 09:20:20 -05:00
parent 16221c1e78
commit f6e0452ffb
21 changed files with 51 additions and 6 deletions
+5 -6
View File
@@ -8,7 +8,6 @@ const packagesDir = path.resolve(__dirname, '../packages/@vue')
const files = fs.readdirSync(packagesDir)
files.forEach(pkg => {
if (pkg === 'cli') return
if (pkg.charAt(0) === '.') return
const isPlugin = /^cli-plugin-/.test(pkg)
@@ -46,11 +45,11 @@ files.forEach(pkg => {
const readmePath = path.join(packagesDir, pkg, `README.md`)
if (!fs.existsSync(readmePath)) {
fs.writeFileSync(readmePath,
`# @vue/${pkg}
fs.writeFileSync(readmePath, `# @vue/${pkg}\n\n> ${desc}`)
}
> ${desc}
`
)
const npmIgnorePath = path.join(packagesDir, pkg, `.npmignore`)
if (!fs.existsSync(npmIgnorePath)) {
fs.writeFileSync(npmIgnorePath, `__tests__/\n__mocks__/`)
}
})