Skip to content

Commit

Permalink
add npmignore
Browse files Browse the repository at this point in the history
  • Loading branch information
yyx990803 committed Jan 5, 2018
1 parent 16221c1 commit f6e0452
Show file tree
Hide file tree
Showing 21 changed files with 51 additions and 6 deletions.
2 changes: 2 additions & 0 deletions packages/@vue/babel-preset-app/.npmignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
__tests__/
__mocks__/
2 changes: 2 additions & 0 deletions packages/@vue/cli-init/.npmignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
__tests__/
__mocks__/
2 changes: 2 additions & 0 deletions packages/@vue/cli-overlay/.npmignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
__tests__/
__mocks__/
2 changes: 2 additions & 0 deletions packages/@vue/cli-plugin-babel/.npmignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
__tests__/
__mocks__/
2 changes: 2 additions & 0 deletions packages/@vue/cli-plugin-e2e-cypress/.npmignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
__tests__/
__mocks__/
2 changes: 2 additions & 0 deletions packages/@vue/cli-plugin-e2e-nightwatch/.npmignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
__tests__/
__mocks__/
2 changes: 2 additions & 0 deletions packages/@vue/cli-plugin-eslint/.npmignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
__tests__/
__mocks__/
2 changes: 2 additions & 0 deletions packages/@vue/cli-plugin-pwa/.npmignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
__tests__/
__mocks__/
2 changes: 2 additions & 0 deletions packages/@vue/cli-plugin-typescript/.npmignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
__tests__/
__mocks__/
2 changes: 2 additions & 0 deletions packages/@vue/cli-plugin-unit-jest/.npmignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
__tests__/
__mocks__/
2 changes: 2 additions & 0 deletions packages/@vue/cli-plugin-unit-mocha-webpack/.npmignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
__tests__/
__mocks__/
2 changes: 2 additions & 0 deletions packages/@vue/cli-service-global/.npmignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
__tests__/
__mocks__/
2 changes: 2 additions & 0 deletions packages/@vue/cli-service/.npmignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
__tests__/
__mocks__/
2 changes: 2 additions & 0 deletions packages/@vue/cli-shared-utils/.npmignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
__tests__/
__mocks__/
2 changes: 2 additions & 0 deletions packages/@vue/cli-test-utils/.npmignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
__tests__/
__mocks__/
2 changes: 2 additions & 0 deletions packages/@vue/cli/.npmignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
__tests__/
__mocks__/
8 changes: 8 additions & 0 deletions packages/@vue/cli/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# @vue/cli

## Usage

``` sh
npm install -g @vue/cli
vue create my-app
```
2 changes: 2 additions & 0 deletions packages/@vue/eslint-config-airbnb/.npmignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
__tests__/
__mocks__/
2 changes: 2 additions & 0 deletions packages/@vue/eslint-config-prettier/.npmignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
__tests__/
__mocks__/
2 changes: 2 additions & 0 deletions packages/@vue/eslint-config-standard/.npmignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
__tests__/
__mocks__/
11 changes: 5 additions & 6 deletions scripts/bootstrap.js
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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__/`)
}
})

0 comments on commit f6e0452

Please sign in to comment.