Skip to content

Commit

Permalink
feat: add basic monorepo structure
Browse files Browse the repository at this point in the history
  • Loading branch information
pedronauck committed Mar 15, 2018
0 parents commit 5a977ed
Show file tree
Hide file tree
Showing 12 changed files with 1,958 additions and 0 deletions.
31 changes: 31 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
logs
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*
pids
*.pid
*.seed
*.pid.lock
lib-cov
coverage
.nyc_output
.grunt
bower_components
.lock-wscript
build/Release
node_modules/
jspm_packages/
typings/
.npm
.npmrc
.eslintcache
.node_repl_history
*.tgz
.yarn-integrity
.env
es
lib
stats.html
build
index.d.ts
12 changes: 12 additions & 0 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"parser": "typescript",
"requirePragma": false,
"printWidth": 80,
"tabWidth": 2,
"useTabs": false,
"semi": false,
"singleQuote": true,
"trailingComma": "es5",
"bracketSpacing": true,
"jsxBracketSameLine": false
}
11 changes: 11 additions & 0 deletions examples/basic/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"name": "playgrodd-example-basic",
"version": "0.0.0",
"license": "MIT",
"scripts": {
"start": "playgrodd start"
},
"devDependencies": {
"playgrodd": "0.0.0"
}
}
4 changes: 4 additions & 0 deletions examples/basic/src/Button.doc.jsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
import { doc } from 'playgrodd'
import { Button } from './'

doc('Button', () => <Button>Click me</Button>)
5 changes: 5 additions & 0 deletions examples/basic/src/Button.jsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
import React from 'react'

export const Button = ({ children, ...props }) => (
<button {...props}>{children}</button>
)
6 changes: 6 additions & 0 deletions lerna.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"lerna": "2.9.0",
"version": "0.0.0",
"npmClient": "yarn",
"useWorkspaces": true
}
11 changes: 11 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"private": true,
"license": "MIT",
"workspaces": [
"packages/*",
"examples/*"
],
"devDependencies": {
"lerna": "^2.9.0"
}
}
22 changes: 22 additions & 0 deletions packages/playgrood/bin/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
#!/usr/bin/env node

const { server } = require('../src/server')

require('yargs')
.command(
'start [files]',
'initialize the playground server',
yargs => {
yargs.positional('files', {
type: 'string',
default: '**/*.doc.js',
describe: 'files that you want to document',
})
},
argv => server(argv)
)
.demandCommand()
.help()
.wrap(72)
.epilog('for more information visit https://github.com/pedronauck/playgrodd')
.showHelpOnFail(false, 'whoops, something went wrong! run with --help').argv
12 changes: 12 additions & 0 deletions packages/playgrood/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"name": "playgrodd",
"version": "0.0.0",
"preferGlobal": true,
"main": "src/index.js",
"bin": {
"playgrodd": "./bin/index.js"
},
"dependencies": {
"yargs": "^11.0.0"
}
}
1 change: 1 addition & 0 deletions packages/playgrood/src/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
const doc = render => render
3 changes: 3 additions & 0 deletions packages/playgrood/src/server.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
exports.server = argv => {
console.log(argv)
}
Loading

0 comments on commit 5a977ed

Please sign in to comment.