Skip to content

Commit

Permalink
setup pnpm repo structure
Browse files Browse the repository at this point in the history
  • Loading branch information
cwaring committed Sep 21, 2021
1 parent 9d3e52e commit 5bc2c68
Show file tree
Hide file tree
Showing 44 changed files with 33 additions and 19 deletions.
6 changes: 4 additions & 2 deletions .gitignore
@@ -1,5 +1,7 @@
node_modules
./package-lock.json
**/package-lock.json
./*-lock.json
**/*-lock.json
./*-lock.yaml
**/*-lock.yaml
*.log
**/dist
1 change: 1 addition & 0 deletions .npmrc
@@ -0,0 +1 @@
shamefully-hoist=true
10 changes: 4 additions & 6 deletions package.json
Expand Up @@ -2,14 +2,12 @@
"name": "origin-project",
"private": true,
"version": "0.3.0",
"scripts": {},
"workspaces": [
"./packages/*"
],
"scripts": {
"dev": "pnpm -r --parallel run dev --filter ./packages"
},
"prettier": "@app-research/origin-vue/config/prettier",
"engines": {
"npm": ">=7",
"node": ">=12"
"node": ">=16"
},
"devDependencies": {
"@app-research/eslint-config": "^0.1.2",
Expand Down
5 changes: 4 additions & 1 deletion packages/create-origin/package.json
Expand Up @@ -16,7 +16,7 @@
"url": "https://github.com/application-research/origin/issues"
},
"homepage": "https://github.com/application-research/origin/tree/main/packages/create-origin#readme",
"files":[
"files": [
"dist",
"bin"
],
Expand All @@ -32,5 +32,8 @@
"license": "MIT",
"dependencies": {
"cac": "^6.7.3"
},
"devDependencies": {
"rimraf": "^3.0.2"
}
}
3 changes: 3 additions & 0 deletions packages/create-origin/src/index.ts
Expand Up @@ -9,6 +9,9 @@ const cli = cac('coa')

cli
.command('[dir]', 'build base origin-vue-ts app with defaults')
.option('--template', 'select a base template', {
default: 'origin-vue-ts'
})
.action((dir = 'origin-app', opts) => {
console.log('scaffolding project to :', dir)
})
Expand Down
2 changes: 1 addition & 1 deletion packages/origin-vue/bin/cli.js
@@ -1,3 +1,3 @@
#!/usr/bin/env node
'use strict'
require('../dist/cjs/cli/')
require('../dist/cjs/node/cli/')
9 changes: 5 additions & 4 deletions packages/origin-vue/package.json
Expand Up @@ -21,16 +21,16 @@
"import": "./dist/esm/index.js"
},
"./vite": {
"require": "./dist/cjs/vite/index.js",
"import": "./dist/esm/vite/index.js"
"require": "./dist/cjs/node/vite/index.js",
"import": "./dist/esm/node/vite/index.js"
},
"./config/tsconfig.base": "./config/tsconfig.base.json",
"./config/prettier": "./config/prettier.json"
},
"typesVersions": {
"*": {
"vite": [
"./dist/esm/vite/index.d.ts"
"./dist/esm/node/vite/index.d.ts"
]
}
},
Expand All @@ -39,7 +39,6 @@
},
"dependencies": {
"@nuxt/devalue": "^2.0.0",
"@types/node": "^16.9.2",
"@vitejs/plugin-vue": "^1.6.2",
"@vue/compiler-sfc": "^3.2.12",
"@vue/server-renderer": "^3.2.12",
Expand All @@ -52,6 +51,7 @@
"pinia": "^2.0.0-rc.9",
"postcss-nested": "^5.0.6",
"unplugin-vue-components": "^0.15.2",
"vite": "^2.5.10",
"vite-plugin-pages": "^0.18.1",
"vite-plugin-vue-layouts": "^0.4.1",
"vite-ssg": "^0.15.1",
Expand All @@ -69,6 +69,7 @@
"vue-router": "^4.0.11"
},
"devDependencies": {
"@types/node": "^16.9.4",
"rimraf": "^3.0.2"
}
}
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion packages/origin-vue/src/index.ts
@@ -1 +1 @@
export * from './origin'
export * from './client/origin'
File renamed without changes.
Expand Up @@ -40,5 +40,5 @@ cli
})

cli.help()
cli.version(require('../../../package.json').version)
// cli.version(require('../../../package.json').version)
cli.parse()
File renamed without changes.
1 change: 1 addition & 0 deletions packages/origin-vue/src/node/vite/index.ts
@@ -0,0 +1 @@
export { config } from './default.config'
1 change: 0 additions & 1 deletion packages/origin-vue/src/vite/index.ts

This file was deleted.

6 changes: 6 additions & 0 deletions pnpm-workspace.yaml
@@ -0,0 +1,6 @@
packages:
# all packages in subdirs of packages/ and projects/
- 'packages/**'
- 'projects/**'
# exclude packages that are inside test directories
- '!**/test/**'
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Expand Up @@ -10,11 +10,11 @@
"lint": "eslint 'src/**' --fix"
},
"devDependencies": {
"@app-research/origin-vue": "0.3.0-beta.2"
"@app-research/origin-vue": "workspace:*"
},
"prettier": "@app-research/origin-vue/config/prettier",
"engines": {
"npm": ">=7",
"node": ">=12"
"node": ">=16"
}
}
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 comments on commit 5bc2c68

Please sign in to comment.