Skip to content

Commit

Permalink
refactor: apply lerna (#10)
Browse files Browse the repository at this point in the history
* refactor: apply lerna

* chore: move test codes

* chore: fix lerna scripts

* chore: fix github actions workflows

* chore: fix github actions workflows

* chore: fix github actions workflows

* chore: update release-helper version
  • Loading branch information
daybrush committed May 11, 2022
1 parent a56cd37 commit ec71888
Show file tree
Hide file tree
Showing 311 changed files with 13,254 additions and 5,868 deletions.
4 changes: 4 additions & 0 deletions .github/workflows/run-e2e.yml
Expand Up @@ -10,11 +10,15 @@ jobs:
node-version: 14.15.4
- name: install
run: npm install
working-directory: ./packages/conveyer
- name: lint
run: npm run lint
working-directory: ./packages/conveyer
- name: test
run: npm run coverage
working-directory: ./packages/conveyer
- name: Coveralls GitHub Action
uses: coverallsapp/github-action@v1.1.2
with:
path-to-lcov: ./packages/conveyer/coverage/lcov.info
github-token: ${{ secrets.GITHUB_TOKEN }}
7 changes: 1 addition & 6 deletions .gitignore
Expand Up @@ -206,12 +206,7 @@ GitHub.sublime-settings
report/
temp/
doc/
demo/_data/version.yml
demo/build/
demo/i18n/ko/docusaurus-plugin-content-docs/current/
demo/docs/api/
demo/release
demo/storybook
demo/
declaration/
packages/*/dist/
test/e2e/log/
Expand Down
18 changes: 0 additions & 18 deletions .travis.yml

This file was deleted.

1 change: 1 addition & 0 deletions README.md
Expand Up @@ -127,6 +127,7 @@ conveyer.init();
## 📦 Packages
|Package|Version|Description|
|:-----:|:-----:|:-----:|
|[**@egjs/conveyer**](https://github.com/naver/egjs-conveyer/blob/main/packages/conveyer/README.md)|<a href="https://www.npmjs.com/package/@egjs/conveyer" target="_blank"><img src="https://img.shields.io/npm/v/@egjs/conveyer.svg?style=flat-square&color=eeee55&label=%F0%9F%94%96" alt="version" /></a>|Conveyer adds Drag gestures to your Native Scroll.|
|[**@egjs/ngx-conveyer**](https://github.com/naver/egjs-conveyer/blob/main/packages/ngx-conveyer/README.md)|<a href="https://www.npmjs.com/package/@egjs/ngx-conveyer" target="_blank"><img src="https://img.shields.io/npm/v/@egjs/ngx-conveyer.svg?style=flat-square&color=dd0031&label=%F0%9F%94%96" alt="version" /></a>|<img width="15" src="https://naver.github.io/egjs-conveyer/img/icons/angular.svg" valign="middle" alt="Angular" /> [Angular](https://angular.io/) port of @egjs/conveyer|
|[**@egjs/react-conveyer**](https://github.com/naver/egjs-conveyer/blob/main/packages/react-conveyer/README.md)|<a href="https://www.npmjs.com/package/@egjs/react-conveyer" target="_blank"><img src="https://img.shields.io/npm/v/@egjs/react-conveyer.svg?style=flat-square&color=00d8ff&label=%F0%9F%94%96" alt="version" /></a>|<img width="15" src="https://naver.github.io/egjs-conveyer/img/icons/react.svg" valign="middle" alt="React" /> [React](https://reactjs.org/) port of @egjs/conveyer|
|[**@egjs/vue-conveyer**](https://github.com/naver/egjs-conveyer/blob/main/packages/vue-conveyer/README.md)|<a href="https://www.npmjs.com/package/@egjs/vue-conveyer" target="_blank"><img src="https://img.shields.io/npm/v/@egjs/vue-conveyer.svg?style=flat-square&color=42b883&label=%F0%9F%94%96" alt="version" /></a>|<img width="15" src="https://naver.github.io/egjs-conveyer/img/icons/vue.svg" valign="middle" alt="Vue.js" /> [Vue.js@3](https://vuejs.org/v2/guide/index.html) port of @egjs/conveyer|
Expand Down
16 changes: 8 additions & 8 deletions config/docs-version-up.js
Expand Up @@ -5,7 +5,7 @@ const path = require("path");

const fs = require("fs-extra");

const package = require("../package.json");
const package = require("../packages/conveyer/package.json");

const currentVersion = package.version;

Expand All @@ -14,14 +14,14 @@ if (!/^\d+\.\d+\.\d+$/.test(currentVersion)) {
}

const DIR = {
VERSION_JSON: path.resolve(__dirname, "../demo/versions.json"),
VERSION_JSON: path.resolve(__dirname, "../packages/docs/versions.json"),
I18N: (lang, content) => lang
? content
? path.resolve(__dirname, `../demo/i18n/${lang}/${content}`)
: path.resolve(__dirname, `../demo/i18n/${lang}`)
: path.resolve(__dirname, `../demo/i18n`),
VERSIONED_DOCS: path.resolve(__dirname, "../demo/versioned_docs"),
VERSIONED_SIDEBARS: path.resolve(__dirname, "../demo/versioned_sidebars")
? path.resolve(__dirname, `../packages/docs/i18n/${lang}/${content}`)
: path.resolve(__dirname, `../packages/docs/i18n/${lang}`)
: path.resolve(__dirname, `../packages/docs/i18n`),
VERSIONED_DOCS: path.resolve(__dirname, "../packages/docs/versioned_docs"),
VERSIONED_SIDEBARS: path.resolve(__dirname, "../packages/docs/versioned_sidebars")
};

const getDirectories = dir => fs.readdirSync(dir, { withFileTypes: true })
Expand Down Expand Up @@ -60,7 +60,7 @@ const runVersionUpScript = () => new Promise((resolve, reject) => {
removeCurrentVersion();
}

process.chdir(path.resolve(__dirname, "../demo"));
process.chdir(path.resolve(__dirname, "../packages/docs"));
const build = spawn("./node_modules/.bin/docusaurus", [
"docs:version",
`${currentVersion}`
Expand Down
6 changes: 3 additions & 3 deletions jsdoc-to-mdx.json
@@ -1,7 +1,7 @@
{
"locales": ["ko"],
"outDir": "./demo/docs/api",
"localesDir": "./demo/i18n/{locale}/docusaurus-plugin-content-docs/current/api",
"sidebar": "./demo",
"outDir": "./packages/docs/docs/api",
"localesDir": "./packages/docs/i18n/{locale}/docusaurus-plugin-content-docs/current/api",
"sidebar": "./packages/docs",
"jsdoc": "./jsdoc.json"
}
6 changes: 3 additions & 3 deletions jsdoc.json
Expand Up @@ -8,10 +8,10 @@
},
"source": {
"include": [
"src",
"README.md",
"node_modules/@egjs/component/src/Component.ts",
"node_modules/@egjs/component/src/ComponentEvent.ts"
"packages/conveyer/src",
"packages/conveyer/node_modules/@egjs/component/src/Component.ts",
"packages/conveyer/node_modules/@egjs/component/src/ComponentEvent.ts"
],
"includePattern": ".+\\.(j|t)s(doc|x)?$",
"excludePattern": "(^|\\/|\\\\)_"
Expand Down
22 changes: 22 additions & 0 deletions lerna.json
@@ -0,0 +1,22 @@
{
"packages": [
"packages/*"
],
"version": "independent",
"lernaHelperOptions": {
"deployFileMap": [
{
"basePath": "packages/conveyer/dist",
"dists": [
"demo/release/{{version}}/dist",
"demo/release/latest/dist"
]
}
],
"beforeReleaseScripts": [
"npm run packages:build",
"npm run demo:build",
"npm run demo:deploy"
]
}
}

0 comments on commit ec71888

Please sign in to comment.