Skip to content

Commit

Permalink
chore(lerna): clean
Browse files Browse the repository at this point in the history
  • Loading branch information
deot committed Jun 19, 2020
1 parent e11b3e2 commit 521bc7a
Show file tree
Hide file tree
Showing 80 changed files with 933 additions and 285 deletions.
6 changes: 6 additions & 0 deletions .browserslistrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
> 1%
IE > 8
last 2 versions
Firefox ESR
Opera 12.1
Safari > 7
12 changes: 8 additions & 4 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
node_modules/**
**/*.css
**/*.html
**/*.min.js
**/node_modules/**
site/**
dist/**
templates/**
packages/*/dist/**
node_modules/**
**/node_modules/**
packages/*/node_modules/**


8 changes: 8 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"files.watcherExclude": {
"**/node_modules": true
},
"search.exclude": {
"**/node_modules": false
}
}
7 changes: 7 additions & 0 deletions lerna-debug.log
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
0 silly argv { _: [ 'clean' ], lernaVersion: '3.22.1', '$0': 'lerna' }
1 notice cli v3.22.1
2 verbose rootPath /Users/deot/Desktop/wya/github/wya-doc
3 info versioning independent
4 error JSONError: Unexpected token ] in JSON at position 143 while parsing near '...*", "src/**", ], "scripts": { ...' in packages/utils/package.json
4 error at module.exports (/Users/deot/Desktop/wya/github/wya-doc/node_modules/parse-json/index.js:26:19)
4 error at parse (/Users/deot/Desktop/wya/github/wya-doc/node_modules/load-json-file/index.js:15:9)
19 changes: 13 additions & 6 deletions lerna.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,14 @@
{
"version": "2.0.0",
"npmClient": "npm",
"packages": [
"packages/*"
]
}
"useWorkspaces": true,
"npmClient": "yarn",
"command": {
"publish": {
"ignoreChanges": ["*.md"],
"message": "chore(release): publish"
},
"bootstrap": {
"npmClientArgs": ["--no-package-lock"]
}
},
"version": "independent"
}
27 changes: 14 additions & 13 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,17 +1,21 @@
{
"name": "wya-doc",
"version": "1.1.1",
"name": "@wya/doc",
"version": "2.0.0",
"description": "wya-doc for js",
"main": "index.js",
"files": [
"packages/**"
"private": true,
"workspaces": [
"packages/*"
],
"scripts": {
"link": "npm link",
"dev": "./packages/doc/bin/doc.js dev ./docs",
"build": "./packages/doc/bin/doc.js build ./docs",
"build:packages": "cross-env NODE_ENV=production node --max_old_space_size=8192 ./scripts/build.js",
"test": "node scripts/unit-test.js",
"bootstrap": "lerna clean && lerna bootstrap --loglevel silly",
"pub": "npm run build:packages && lerna publish",
"link": "yarn workspace @wya/doc-cli link",
"dev": "yarn workspace @wya/doc-cli dev",
"build": "yarn workspace @wya/doc-cli build",
"pub": "npm publish --access public",
"lint": "esw --ext .vue,.js node/ client/",
"lint": "esw packages/ --ext .vue,.js --color",
"lint:fix": "npm run lint -- --fix --color",
"lint:watch": "npm run lint -- --fix --watch"
},
Expand Down Expand Up @@ -53,8 +57,5 @@
},
"pre-commit": [
"lint-staged"
],
"bin": {
"doc": "bin/doc"
}
]
}
File renamed without changes.
File renamed without changes.
File renamed without changes.
4 changes: 4 additions & 0 deletions packages/cli/bin/doc-cli
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/usr/bin/env node
parseInt(process.versions.node, 10) >= 12
? require('../src/index')
: require('../dist/index');
92 changes: 92 additions & 0 deletions packages/cli/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,92 @@
{
"name": "@wya/doc-cli",
"version": "1.0.0",
"description": "",
"main": "dist/index.js",
"files": [
"dist/**",
"src/**",
"bin/**"
],
"scripts": {
"link": "npm link",
"dev": "doc-cli dev ../../docs",
"build": "doc-cli build ../../docs"
},
"repository": {
"type": "git",
"url": "git+https://github.com/wya-team/wya-doc"
},
"keywords": [],
"author": "wya-team",
"license": "MIT",
"bugs": {
"url": "https://github.com/wya-team/wya-doc/issues"
},
"homepage": "https://github.com/wya-team/wya-doc#readme",
"engines": {
"node": ">=12"
},
"dependencies": {
"@babel/core": "^7.7.5",
"@babel/plugin-proposal-class-properties": "^7.7.4",
"@babel/plugin-proposal-decorators": "^7.7.4",
"@babel/plugin-proposal-export-default-from": "^7.7.4",
"@babel/plugin-proposal-export-namespace-from": "^7.7.4",
"@babel/plugin-proposal-function-bind": "^7.7.4",
"@babel/plugin-syntax-dynamic-import": "^7.7.4",
"@babel/plugin-syntax-jsx": "^7.7.4",
"@babel/plugin-transform-modules-commonjs": "^7.7.5",
"@babel/preset-env": "^7.7.6",
"@babel/preset-env-standalone": "^7.7.7",
"@babel/runtime": "^7.7.4",
"@babel/standalone": "^7.7.7",
"@wya/doc-playground": "^1.0.0",
"@wya/doc-utils": "^1.0.0",
"@wya/http": "^1.4.5",
"@wya/ps": "^1.0.2",
"@wya/sass": "^1.2.0",
"@wya/socket": "^1.1.0",
"@wya/utils": "^1.6.1",
"@wya/vc": "^2.0.0-alpha.58",
"babel-loader": "^8.0.6",
"babel-plugin-import": "^1.13.0",
"babel-plugin-syntax-jsx": "^6.18.0",
"babel-plugin-transform-vue-jsx": "^3.7.0",
"cac": "^6.5.3",
"chalk": "^3.0.0",
"chokidar": "^3.3.0",
"codemirror": "^5.49.2",
"css-loader": "^3.3.0",
"friendly-errors-webpack-plugin": "^1.7.0",
"fs-extra": "^8.1.0",
"highlight.js": "^9.16.2",
"html-loader": "^0.5.5",
"html-webpack-plugin": "^3.2.0",
"js-beautify": "^1.10.2",
"lodash": "^4.17.15",
"markdown-it": "^10.0.0",
"markdown-it-anchor": "^5.2.5",
"markdown-it-chain": "^1.3.0",
"markdown-it-container": "^2.0.0",
"node-sass": "^4.13.0",
"portfinder": "^1.0.25",
"sass-loader": "^8.0.0",
"sass-resources-loader": "^2.0.1",
"upath": "^1.2.0",
"url-loader": "^3.0.0",
"vue": "^2.6.10",
"vue-loader": "^15.7.2",
"vue-router": "^3.1.3",
"vue-style-loader": "^4.1.2",
"vue-template-compiler": "^2.6.10",
"vue-template-es2015-compiler": "^1.9.1",
"webpack": "^4.41.2",
"webpack-cli": "^3.3.10",
"webpack-dev-server": "^3.9.0",
"webpack-merge": "^4.2.2"
},
"bin": {
"doc-cli": "bin/doc-cli"
}
}
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import Vue from 'vue';
import Router from 'vue-router';
import routes from './routes';
import routes from './.temp/routes';
import App from './app.vue';
import GLOBAL, { Global } from './global';

Expand All @@ -11,7 +11,7 @@ if (__DEV__) {
}

// 使用import 会比上面提前引入
require('@style/index.scss');
require('./style/index.scss');

const { baseSiteDir } = Global.docConfig || {};
Vue.use(GLOBAL);
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
3 changes: 3 additions & 0 deletions packages/cli/src/docs/doc.browser.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
import * as __UTILS__ from '@wya/utils';

window.__UTILS__ = __UTILS__;
59 changes: 59 additions & 0 deletions packages/cli/src/docs/doc.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
const path = require('path');
const sidebar = require('./nav.config.js');

const ENV_IS_DEV = process.env.NODE_ENV === 'development';

module.exports = {
version: '1.0.0',
/**
* null | './xxx/xxx.vue' | 'default' | json;
*/
routes: {
'/': '/index',
'/index': {
default: './components/index.vue',
sidebar: null,
header: 'default',
footer: 'default',
extra: null,
},
'/components/:name': {
default: 'default',
sidebar,
header: 'default',
footer: 'default',
extra: null,
},
'/api/:name': {
default: 'default',
sidebar,
header: './components/header.vue',
footer: './components/footer.vue',
extra: null,
},
'*': (to) => {
return '/zh-CN/index';
}
},
locales: {
'zh-CN': '简体中文',
'en-US': 'English'
},
webpackConfig: {
output: {
path: path.resolve(__dirname, '../site/'),
publicPath: ENV_IS_DEV
? '/'
: '/wya-doc/site/'
},
devServer: {},
},
runtime: {
define: {
__DOC_SITE_DIR__: ENV_IS_DEV ? '/' : '/wya-doc/site/',
__DOC_MD_DIR__: ENV_IS_DEV ? '/docs/' : '/wya-doc/docs/',
// __DOC_MD_DIR__: (lang, name) => { return lang + name; },
__DOC_VERSION__: "1.0.0",
}
}
};
13 changes: 13 additions & 0 deletions packages/cli/src/docs/en-US/components/footer.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<template>
<div>this is footer</div>
</template>

<script>
export default {
name: 'hhh'
};
</script>

<style lang="scss">
</style>
13 changes: 13 additions & 0 deletions packages/cli/src/docs/en-US/components/header.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<template>
<div>this is header</div>
</template>

<script>
export default {
name: 'hhh'
};
</script>

<style lang="scss">
</style>
24 changes: 24 additions & 0 deletions packages/cli/src/docs/en-US/components/index.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
<template>
<div class="v-index">
<router-link to="/en-US/components/installation">
<h1>Hello @wya/doc - en-US</h1>
</router-link>
</div>
</template>

<script>
export default {
name: 'v-index',
};
</script>

<style lang="scss">
.v-index {
display: flex;
align-items: center;
justify-content: center;
flex: 1;
min-height: 600px;
}
</style>
Loading

0 comments on commit 521bc7a

Please sign in to comment.