Skip to content

Commit

Permalink
chore: apply lerna
Browse files Browse the repository at this point in the history
  • Loading branch information
daybrush committed Aug 13, 2022
1 parent adaaea2 commit 39520c3
Show file tree
Hide file tree
Showing 181 changed files with 20,906 additions and 43,722 deletions.
38 changes: 8 additions & 30 deletions .github/ISSUE_TEMPLATE/--bug-report.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,33 +3,11 @@ name: "\U0001F41BBug report"
about: Create a report to help us improve

---

**Describe the bug**
A clear and concise description of what the bug is.

**To Reproduce**
Steps to reproduce the behavior:
1. Go to '...'
2. Click on '....'
3. Scroll down to '....'
4. See error

**Expected behavior**
A clear and concise description of what you expected to happen.

**Screenshots**
If applicable, add screenshots to help explain your problem.

**Desktop (please complete the following information):**
- OS: [e.g. iOS]
- Browser [e.g. chrome, safari]
- Version [e.g. 22]

**Smartphone (please complete the following information):**
- Device: [e.g. iPhone6]
- OS: [e.g. iOS8.1]
- Browser [e.g. stock browser, safari]
- Version [e.g. 22]

**Additional context**
Add any other context about the problem here.
## Environments
* Framework name:
* Framework version:
* Moveable Component version:
* Testable Address(optional):

## Description
<!-- Let me know your situation -->
8 changes: 8 additions & 0 deletions .github/ISSUE_TEMPLATE/-questions---help.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,11 @@ about: I have questions or need help with scenejs
---


## Environments
* Framework name:
* Framework version:
* Moveable Component version:
* Testable Address(optional):

## Description
<!-- Let me know your situation -->
24 changes: 24 additions & 0 deletions .github/workflows/run-e2e.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
name: Run tests
on: [push, pull_request]
jobs:
unit:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/[email protected]
with:
node-version: 14.15.4
- name: install
run: npm install
working-directory: ./packages/scenejs
- name: lint
run: npm run lint
working-directory: ./packages/scenejs
- name: test
run: npm run coverage
working-directory: ./packages/scenejs
- name: Coveralls GitHub Action
uses: coverallsapp/[email protected]
with:
path-to-lcov: ./packages/scenejs/coverage/lcov.info
github-token: ${{ secrets.GITHUB_TOKEN }}
4 changes: 2 additions & 2 deletions jsdoc.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@
},
"source": {
"include": [
"./src",
"README.md",
"./packages/scenejs/src",
"./README.md",
"./node_modules/@scena/event-emitter/src/"
],
"includePattern": "(.+\\.js(doc|x)?|.+\\.ts(doc|x)?)$",
Expand Down
57 changes: 0 additions & 57 deletions karma.conf.js

This file was deleted.

31 changes: 31 additions & 0 deletions lerna.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
{
"npmClient": "yarn",
"useWorkspaces": true,
"packages": [
"packages/*"
],
"version": "independent",
"lernaHelperOptions": {
"deployFileMap": [
{
"basePath": "packages/moveable/dist",
"dists": [
"demo/release/{{version}}/dist",
"demo/release/latest/dist"
]
},
{
"basePath": "doc",
"dists": [
"demo/release/{{version}}/doc",
"demo/release/latest/doc"
]
}
],
"beforeReleaseScripts": [
"npm run packages:build",
"npm run demo:build",
"npm run deploy"
]
}
}
119 changes: 64 additions & 55 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,29 +1,9 @@
{
"name": "scenejs",
"version": "1.5.0",
"name": "scenejs-root",
"version": "0.0.0",
"description": "JavaScript & CSS timeline-based animation library",
"main": "dist/scene.cjs.js",
"module": "dist/scene.esm.js",
"sideEffects": false,
"types": "declaration/index.d.ts",
"scripts": {
"lint": "tslint -c tslint.json 'src/**/*.ts'",
"coverage": "karma start --coverage && print-coveralls --sort=desc",
"test": "karma start",
"start": "rollup -c -w",
"test:chrome": "karma start --chrome",
"build": "npm run build:rollup && npm run declaration",
"declaration": "rm -rf declaration && tsc -p tsconfig.declaration.json",
"tsc": "tsc -p tsconfig.json",
"build:rollup": "rollup -c && print-sizes ./dist",
"deploy": "gh-pages -d ./demo --dest=./ --add --remote origin",
"coveralls": "cat ./coverage/lcov.info | coveralls",
"doc": "rm -rf ./doc && jsdoc -c jsdoc.json",
"demo:start": "rollup -c rollup.config.demo.js -w",
"demo:build": "rm -rf ./demo/dist && rollup -c rollup.config.demo.js",
"release": "npm run build && npm run doc && npm run demo:build && release --dirs dist,doc,examples",
"release:build": "npm run build && npm run doc && npm run demo:build && prerelease --dirs dist,doc,examples"
},
"private": true,
"repository": {
"type": "git",
"url": "https://github.com/daybrush/scenejs.git"
Expand All @@ -46,42 +26,71 @@
"url": "https://github.com/daybrush/scenejs/issues"
},
"homepage": "https://daybrush.com/scenejs",
"scripts": {
"bootstrap": "lerna bootstrap",
"build": "npm run build --prefix ./packages/scenejs",
"packages:update": "lerna-helper version",
"packages:build": "npm run build --prefix packages/scenejs && lerna run build --ignore scenejs --ignore demo",
"packages:publish": "lerna-helper publish --commit 'chore: publish packages' --ignore demo",
"changelog": "lerna-helper changelog --type all --base scenejs",
"doc": "rm -rf ./doc && jsdoc -c jsdoc.json",
"demo:start": "rollup -c rollup.config.demo.js -w",
"demo:build": "rm -rf ./demo/dist && rollup -c rollup.config.demo.js",
"demo:deploy": "gh-pages -d ./demo --dest=./ --add --remote origin",
"deploy": "lerna-helper deploy --base scenejs",
"release": "lerna-helper release --base scenejs"
},
"devDependencies": {
"@daybrush/builder": "^0.1.0",
"@daybrush/jsdoc": "^0.3.10",
"@daybrush/page": "^0.2.0",
"@daybrush/release": "^0.2.4",
"@types/karma-chai": "^0.1.1",
"@types/mocha": "^5.2.5",
"@types/sinon": "^7.0.2",
"chai": "^4.1.2",
"coveralls": "^3.0.0",
"daybrush-jsdoc-template": "^1.6.0",
"@daybrush/builder": "^0.1.2",
"@daybrush/jsdoc": "^0.4.0",
"@daybrush/release": "^0.5.2",
"cpx": "1.5.0",
"daybrush-jsdoc-template": "^1.7.0",
"gh-pages": "^2.0.1",
"karma": "^1.7.1",
"karma-chai": "^0.1.0",
"karma-chrome-launcher": "^2.2.0",
"karma-mocha": "^1.3.0",
"karma-mocha-reporter": "^2.2.5",
"karma-typescript": "^3.0.13",
"mocha": "^4.0.1",
"print-coveralls": "^1.2.2",
"print-sizes": "^0.0.3",
"rollup-plugin-css-bundle": "^1.0.4",
"shape-svg": "^0.3.1",
"sinon": "^4.1.2",
"source-map-support": "^0.5.12",
"tslib": "^2.0.1",
"tslint": "^5.14.0",
"typescript": "^3.9.7"
"intercept-stdout": "0.1.2",
"lerna": "^4.0.0",
"lerna-changelog": "2.2.0",
"typescript": "^4.5.0 <4.6.0"
},
"workspaces": {
"packages": [
"packages/*"
]
},
"resolutions": {
"@daybrush/utils": "^1.7.1",
"@types/react": "^16.9.17",
"typescript": "^4.5.0 <4.6.0",
"@scena/event-emitter": "^1.0.3",
"css-styled": "^1.0.0",
"order-map": "^0.2.2"
},
"dependencies": {
"@daybrush/utils": "^1.3.1",
"overrides": {
"@daybrush/utils": "^1.7.1",
"@types/react": "^16.9.17",
"typescript": "^4.5.0 <4.6.0",
"@scena/event-emitter": "^1.0.3",
"css-styled": "^1.0.0",
"order-map": "^0.2.2"
},
"peerDependencies": {
"order-map": ">=0.2.2"
}
}
"nohoist": [
"**/@egjs/build-helper",
"**/@egjs/build-helper/**",
"**/rollup-plugin-vue",
"**/rollup-plugin-vue/**",
"**/karma",
"**/karma/**",
"**/karma-*",
"**/karma-*/**",
"**/@tyoes/chai",
"**/@tyoes/chai/**",
"**/@types/karma-chai",
"**/@types/karma-chai/**",
"**/@types/mocha",
"**/@types/mocha/**",
"**/@vue/*",
"**/@vue/*/**",
"**/vue",
"**/vue/**"
]
}
41 changes: 41 additions & 0 deletions packages/demo/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
{
"name": "demo",
"description": "Scene.js demo",
"private": true,
"repository": {
"type": "git",
"url": "https://github.com/daybrush/scenejs.git"
},
"keywords": [
"scene",
"scene.js",
"scenejs",
"keyframes",
"timeline",
"animate",
"animation",
"css",
"requestAnimationFrame",
"motion"
],
"author": "Daybrush",
"license": "MIT",
"bugs": {
"url": "https://github.com/daybrush/scenejs/issues"
},
"homepage": "https://daybrush.com/scenejs",
"scripts": {
"build": "rm -rf ../../demo/dist && rollup -c rollup.config.js"
},
"dependencies": {
"@daybrush/utils": "^1.7.0",
"@daybrush/page": "^0.2.0",
"shape-svg": "^0.3.1",
"scenejs": "~1.6.0"
},
"devDependencies": {
"@daybrush/builder": "^0.1.2",
"typescript": "^4.5.0 <4.6.0",
"rollup-plugin-css-bundle": "^1.0.4"
}
}
23 changes: 23 additions & 0 deletions packages/demo/rollup.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
import builder from "@daybrush/builder";
import cssbundle from "rollup-plugin-css-bundle";

export default builder([
{
input: './src/index/index.ts',
output: "../../demo/dist/index.js",
format: "iife",
exports: "named",
plugins: [cssbundle({output: "../../demo/dist/index.css"})],
resolve: true,
uglify: true,
},
{
input: './src/features/index.ts',
output: "../../demo/dist/features.js",
format: "iife",
exports: "named",
plugins: [cssbundle({output: "../../demo/dist/features.css"})],
resolve: true,
uglify: true,
},
]);
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,9 @@ import "./css/monokai-sublime.css";

declare var utils: typeof nativeUtils;
declare var hljs: any;
document.querySelector(".container_overview").insertAdjacentHTML("beforeend", Pages(datas));
document.querySelector(".classes").innerHTML = Navigations(datas);

document.querySelector(".container_overview")!.insertAdjacentHTML("beforeend", Pages(datas));
document.querySelector(".classes")!.innerHTML = Navigations(datas);

let exportMouseCount = 0;
utils.toArray(document.querySelectorAll(".feature")).forEach(feature => {
Expand Down
File renamed without changes.
File renamed without changes.
Loading

0 comments on commit 39520c3

Please sign in to comment.