Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sync Canary to Master - Stable Version #91

Merged
merged 72 commits into from
Mar 19, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
72 commits
Select commit Hold shift + click to select a range
2d763f4
docs(contributing md): add contributing documentation (#16)
alvinkl Jan 23, 2019
892f63b
docs(readmemd): fix contributing url (#18)
alvinkl Jan 23, 2019
064352c
fix(babelconfigjs): fix built absolute path to relative path (#19)
alvinkl Jan 25, 2019
c48b77d
test(test): make babel-jest working (#20)
alvinkl Jan 25, 2019
8850805
chore(package json example): remove example from workspace (#21)
alvinkl Jan 28, 2019
c8b20a3
docs(readme): fixed typo on getinitalprops to getinitialprops (#22)
senacand Jan 28, 2019
8a4435c
refactor(md): clean up md and template (#23)
alvinkl Jan 28, 2019
6bf3d0a
chore(circleci): remove job to only build
alvinkl Jan 30, 2019
38d6403
test(packagejson travis circle): add coveralls and travisyml (#27)
alvinkl Jan 30, 2019
7faa18b
test(jest test): add enzyme config and document test (#28)
alvinkl Feb 2, 2019
159e30a
fix(webpack): missing .js extension on filename (#30)
alvinkl Feb 7, 2019
e40897b
feat(maleo playground): add default server and client (#29)
alvinkl Feb 14, 2019
8a9f326
fix(webpack client server): remove hmr but fix sync (#33)
alvinkl Feb 14, 2019
24a835b
docs(readme): adjust readme to default register (#34)
alvinkl Feb 15, 2019
3b45e4e
feat(maleo webpack): add rimraf before run and cache server (#35)
alvinkl Feb 15, 2019
a80c4e9
feat(webpack loaders routes): add auto code splitting on routes (#36)
alvinkl Feb 25, 2019
bf7abce
docs(readmemd): add contributors (#38)
alvinkl Mar 1, 2019
167054a
docs(readmemd): add license (#39)
alvinkl Mar 1, 2019
e5d0cc9
fix(require cache hmr): add nextjs license (#40)
alvinkl Mar 1, 2019
114c465
fix(webpack stats-writer plugin): add dynamic key on stats json (#41)
alvinkl Mar 1, 2019
61fc321
feat(webpack client preset): add simple hmr refresh (#37)
alvinkl Mar 1, 2019
7a61301
feat(maleo-routes-split): auto add key for routes (#42)
alvinkl Mar 1, 2019
48651bd
docs(readmemd): add badges (#43)
alvinkl Mar 4, 2019
84ed4c3
chore(lerna travis package): prepare for npm publish automation (#44)
alvinkl Mar 5, 2019
5d69109
chore(travis gitignore): add separation on branch master and canary (…
alvinkl Mar 5, 2019
8514985
chore(travis yml): testing deploy (#46)
alvinkl Mar 5, 2019
e323dd1
chore(travis): testing chore (#47)
alvinkl Mar 5, 2019
7e67643
fix(css-plugin): first render isl not working (#48)
alvinkl Mar 11, 2019
835b83a
chore(yarn lock): update yarn lock to use static reactdom (#51)
alvinkl Mar 13, 2019
81584c6
chore(travis.yml, publish-canary.sh): publishing to canary with sh fi…
alvinkl Mar 13, 2019
2ce02d7
chore(package.json): publish to canary and add dist-tag (#53)
alvinkl Mar 13, 2019
8c8b6c5
chore(travis.yml): add registry auth token before deploy (#54)
alvinkl Mar 13, 2019
af0e177
chore(travis.yml): add access public npm (#55)
alvinkl Mar 13, 2019
0347b5b
chore(package.json): comment gren for now (#56)
alvinkl Mar 13, 2019
67bee70
chore(package.json): try to use publish from-git (#57)
alvinkl Mar 13, 2019
c967df9
chore(travis.yml): remove tag require (#58)
alvinkl Mar 13, 2019
f805f62
chore(package.json): remove from-git tag (#59)
alvinkl Mar 13, 2019
215d7b9
chore(package.json): bump version to v0.0.2 (#60)
alvinkl Mar 13, 2019
8b1d3be
chore(package.json): bump version to 3 and add force-publish (#61)
alvinkl Mar 13, 2019
e7801b2
chore(lerna.json, package.json, .travis.yml): add lerna version confi…
alvinkl Mar 13, 2019
020fc08
chore(package.json): bump version manually (#63)
alvinkl Mar 13, 2019
229f1a3
chore(lerna.json): move all the versoin config to publish (#64)
alvinkl Mar 18, 2019
3419fc9
chore(package.json): bump version to 0.0.5 (#65)
alvinkl Mar 18, 2019
29e269d
chore(package.json): bump version and add conventional commit tag (#66)
alvinkl Mar 18, 2019
3b51c53
chore(lerna.json, package.json): add version bump prerelease (#67)
alvinkl Mar 18, 2019
801f74b
chore(publish-canary.sh): attach ci to head when publish canary (#68)
alvinkl Mar 18, 2019
f4162aa
chore(publish-canary): remove local (#69)
alvinkl Mar 18, 2019
78a0973
chore(publish-canary): change return to exit 1 (#70)
alvinkl Mar 18, 2019
9919fa3
chore(release): publish %s [skip ci]
Mar 18, 2019
11e10f8
chore(travis.yml, lerna.json): add checkout branch sh, no force publi…
alvinkl Mar 18, 2019
e9cb4dd
chore(ci): move ci related commands to new folder (#72)
alvinkl Mar 18, 2019
3697202
docs(readme.md): update register routes docs (#73)
alvinkl Mar 18, 2019
b3b9e2f
feat(webpack): change maleo-routes.json to routes.json (#74)
alvinkl Mar 18, 2019
31c1b95
chore(release): publish %s [skip ci]
airyrooms-engineering Mar 18, 2019
0d6a260
chore(lerna.json): force publish @airy/maleo (#75)
alvinkl Mar 18, 2019
fac3f34
chore(package.json): bump version to 0.0.7 (#76)
alvinkl Mar 18, 2019
67b59b5
chore(release): publish %s [skip ci]
airyrooms-engineering Mar 18, 2019
bc3f3f9
chore(package.json changelog): change alpha to canary, remove changel…
alvinkl Mar 18, 2019
e791452
chore(package.json): fix changelog typo and bump versoin (#78)
alvinkl Mar 18, 2019
95dcd68
chore(release): publish %s [skip ci]
airyrooms-engineering Mar 18, 2019
594186a
docs(readme): add npm badge and fix contributors (#79)
alvinkl Mar 19, 2019
cbe4fb1
chore(package.json, travis): publish stable (#80)
alvinkl Mar 19, 2019
1650a4b
chore(travis.yml): move test:cov to before_deploy (#81)
alvinkl Mar 19, 2019
f4b0665
docs(readme): add @canary docs (#82)
alvinkl Mar 19, 2019
421ab96
chore(package.json, yarn.lock): bump react-router version to 5.0.0 (#83)
alvinkl Mar 19, 2019
eb9bf18
chore(release): publish %s [skip ci]
airyrooms-engineering Mar 19, 2019
dc6d3a9
docs(readme.md): fix trailing commas, and add dev (#84)
alvinkl Mar 19, 2019
6c57397
Merge branch 'master' into canary
alvinkl Mar 19, 2019
ddd5dca
chore(publish-stable): undo automatic publishing for stable
alvinkl Mar 19, 2019
f4d46b2
revert: chore publish
alvinkl Mar 19, 2019
3c52e02
chore(publish-stable): manual publish (#93)
alvinkl Mar 19, 2019
63ab40f
revert: npm publish
alvinkl Mar 19, 2019
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
37 changes: 8 additions & 29 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
version: 2

jobs:
lint:
build:
working_directory: ~/tmp
docker:
- image: circleci/node:10.11.0
Expand All @@ -25,35 +24,15 @@ jobs:
- run:
name: Lint
command: yarn lint

build:
working_directory: ~/tmp
docker:
- image: circleci/node:10.11.0
steps:
- checkout
- run:
name: Install Latest Yarn
command: 'sudo npm install --global yarn@latest'
- restore_cache:
name: Restore Yarn Package Cache
keys:
- yarn-packages-{{ checksum "yarn.lock" }}
- run:
name: Install Dependencies
command: yarn install --frozen-lockfile
- save_cache:
name: Save Yarn Package Cache
key: yarn-packages-{{ checksum "yarn.lock" }}
paths:
- ~/.cache/yarn
- run:
name: Build Test
name: Run Build
command: yarn build


- run:
name: Run Unit Test
command: yarn test

workflows:
version: 2
install_and_lint:
lint-build:
jobs:
- lint
- build
38 changes: 38 additions & 0 deletions .github/lock.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
# Configuration for Lock Threads - https://github.com/dessant/lock-threads

# Number of days of inactivity before a closed issue or pull request is locked
daysUntilLock: 365

# Skip issues and pull requests created before a given timestamp. Timestamp must
# follow ISO 8601 (`YYYY-MM-DD`). Set to `false` to disable
skipCreatedBefore: false

# Issues and pull requests with these labels will be ignored. Set to `[]` to disable
exemptLabels: []

# Label to add before locking, such as `outdated`. Set to `false` to disable
lockLabel: 'outdated'

# Comment to post before locking. Set to `false` to disable
lockComment: >
This thread has been automatically locked since there has not been
any recent activity after it was closed. Please open a new issue for
related bugs.

# Assign `resolved` as the reason for locking. Set to `false` to disable
setLockReason: false

# Limit to only `issues` or `pulls`
# only: issues

# Optionally, specify configuration settings just for `issues` or `pulls`
# issues:
# exemptLabels:
# - help-wanted
# lockLabel: outdated

# pulls:
# daysUntilLock: 30

# Repository to extend settings from
# _extends: repo
8 changes: 5 additions & 3 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<!-- Maleo.JS Pull Request Template -->
<!-- Maleo.js Pull Request Template -->

<!-- IMPORTANT Please review https://github.com/airyrooms/maleo.js/blob/master/CONTRIBUTING.md for detailed contributing guidelines -->
<!-- Help with PRs can be found at (added soon) -->
Expand All @@ -8,8 +8,8 @@
<!-- Go over all points below, and after creating the PR, tick all the checkboxes that apply. -->
<!-- All points should be verified, otherwise, read the CONTRIBUTING guidelines from above-->
<!-- If you're unsure about any of these, don't hesitate to ask. We're here to help! -->
- [ ] Your pull request targets the `canary` branch of Maleo.JS.
- [ ] Branch starts with either `fix/`, `feature/`, `optimization/`, or `translate/` (e.g. `fix/build-issue`)
- [ ] Your pull request targets the `canary` branch of Maleo.js.
- [ ] Branch starts with either `fix/`, `feature/`, etc (e.g. `fix/build-issue`. [more info](https://github.com/airyrooms/maleo.js/blob/canary/CONTRIBUTING.md))
- [ ] You have only one commit (if not, [squash](http://forum.freecodecamp.org/t/how-to-squash-multiple-commits-into-one-with-git/13231) them into one commit).
- [ ] All new and existing tests pass the command `yarn test`. Use `git commit --amend` to amend any fixes.

Expand All @@ -20,6 +20,8 @@
- [ ] Optimization (non-breaking change which provides better optimization)
- [ ] Breaking change (fix or feature that would change existing functionality)
- [ ] Add new translation (feature adding new translations)
- [ ] Update Documentation (added new docs or doc updates)
- [ ] Other (<!-- Please write more info inside this parentheses --> )

#### Checklist:
<!-- Go over all points below, and after creating the PR, tick the checkboxes that apply. -->
Expand Down
7 changes: 7 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -68,3 +68,10 @@ package-lock.json
@types

.vscode

# ignore yarn lock on example
example/*/yarn.lock
example/*/package-lock.json

# OSX
.DS_Store
12 changes: 12 additions & 0 deletions .grenrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"dataSource": "commits",
"groupBy": {
"Features:": ["feat"],
"Enhancements:": ["refactor", "perf", "build"],
"Bug Fixes:": ["fix"]
},
"ignoreIssuesWith": [
"wontfix",
"duplicate"
]
}
37 changes: 37 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
language: node_js
sudo: required
git:
quiet: true
branches:
only:
- master
- canary
cache:
yarn: true

before_install:
- npm install --global yarn@1.10.1

script:
- yarn build
- yarn test

before_deploy:
- yarn test:cov
- echo "access=public" >> $HOME/.npmrc 2> /dev/null
- echo "//registry.npmjs.org/:_authToken=\${NPM_TOKEN}" >> $HOME/.npmrc 2> /dev/null
- bash ./ci/travis-checkout-branch.sh

deploy:
- provider: script
skip_cleanup: true
script:
- bash ./ci/publish-canary.sh
on:
branch: canary
- provider: script
skip_cleanup: true
script:
- bash ./ci/publish-stable.sh
on:
branch: master
186 changes: 186 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,186 @@
# Contributing Guidelines

Hello 👋!

Maleo.js is an un-opinionated framework to enable Universal Rendering in JavaScript using React with no hassle.

We are here to solve the time consuming setups Universal Rendering Required.

Feel free to contribute to this project. We are grateful for your contributions and we are excited to welcome you abroad!

Happy contributing 🎉!

### Setting Up Maleo.js in Local Environment

**Clone Repo to Local Machine**

[Fork](https://help.github.com/articles/fork-a-repo/) this repository to your GitHub account and then [clone](https://help.github.com/articles/cloning-a-repository/) it to your local machine from forked repo.

```bash
$ git clone https://github.com/<username>/maleo.js.git
$ cd maleo.js
```

Add Maleo.js repo as upstream to keep your fork up to date

```bash
$ git remote add upstream https://github.com/airyrooms/maleo.js
```

Make sure you are currently on branch `canary`, if not you can run this command
```bash
$ git checkout canary
$ git pull upstream canary # sync with Maleo.js repo
```

**Setup**

Make sure you are using the same or higher version of [Node.js](https://nodejs.org/en/) from `.nvmrc` file. (more info about [nvm](https://github.com/creationix/nvm))

We are using [Yarn](https://yarnpkg.com/en/) as package manager

Install yarn as global dependency
```bash
$ npm install --global yarn
```
Should the install fails, use `sudo`

And then, install all the dependencies required by Maleo.js

```bash
$ yarn
```

After the installation finished, run `fix:bin` command to fix binary symlink issue
```bash
$ yarn fix:bin
```

---

***Before making any changes, please check our [issues list](https://github.com/airyrooms/maleo.js/issues), for issues that you want to solve.***

Create a new branch based on what kind of contribution you are going to do.

Here is the draft:
<!-- Do not translate this table -->
<table>
<tr>
<td> Contributing Type </td>
<td> Branch Prefix </td>
<td> Description </td>
</tr>
<tr>
<td> Fix </td>
<td> fix/< name > </td>
<td> Fixing current bug or issues </td>
</tr>
<tr>
<td> Feature </td>
<td> feature/< name > </td>
<td> Adding new feature </td>
</tr>
<tr>
<td> Optimization </td>
<td> optimization/< name > </td>
<td> Optimize current unoptimized code </td>
</tr>
<tr>
<td> Documentation </td>
<td> docs/< name > </td>
<td> Add or edit documentation related file </td>
</tr>
<tr>
<td> Translation </td>
<td> translate/< name > </td>
<td> Add or edit documentation's translation </td>
</tr>
</table>

For example if you want to contribute to fix bug in Maleo.js you need to create new branch with `fix/` as the prefix.

For example:
```bash
$ git checkout -b fix/webpack-bug
```

---

**Development**

You are now ready to contribute to Maleo.js. Yaay 🤓!

To build the module you can run this command:
```bash
$ yarn build
```

During development we are more likely watch our code changes, therefore we use this command:
```bash
$ yarn watch
```

The command above watches for every changes from folder `/packages/plugins` and `/packages/Maleo.js`

**Test**

For every new feature you are required to add unit test.

You can add the unit test on folder `test` with filename having `[feature-name].test.js` prefix.


Running test:
```bash
$ yarn test
```

**Commit and Push Changes**

Awesome 🎉!

You have arrived at this stage, you are almost ready to make your changes available for other people.

After you have made changes and tested, please don't commit the changes using `$ git commit`, instead use this command:
```bash
$ yarn commit
```

The command above will display a wizard for you to fill, it uses our standard commit message. After you have finished filling the answers, we will run [linting](https://stackoverflow.com/questions/8503559/what-is-linting) and `prettify` process to your code and stage those changes to the commit to make sure your code have the same formatting as the other.

If you have passed all the process above you can now push your changes! 😙

```bash
$ git push
```

**Making Pull Request**

YEAH!! 🎉🎉 You are ready to make your changes available for other people

Your code are now available in your repository, but it's time to make a [Pull Request](https://help.github.com/articles/about-pull-requests/) to Maleo.js

## FAQ
<details>
<summary>How to test Maleo.js on local development machine in the <code>example</code> directory?</summary>
Maleo.js is utilizing <a href="https://github.com/lerna/lerna">Lerna</a> and <a href="https://yarnpkg.com/lang/en/docs/workspaces/">Yarn Workspace</a> to manage the mono repo structure.
So you can use the Maleo.js inside <code>package</code> folder or <code>example</code> folder. Because Yarn Workspace and Lerna has hoisted all the dependencies into root directory. Therefore every app inside <code>example</code> able to add symlinked Maleo.js as dependency.
</details>

<br/>

<details>
<summary>How to test Maleo.js on your own app during development?</summary>
You can run this command inside <code>packages/Maleo.js</code> directory
<pre>
$ yarn link # if you are using yarn on your app
$ npm link # if you are using npm on your app</pre>
And then go to your app directory and add <code>@airy/maleo.js</code> to your own app's <code>package.json</code> and run this command:
<pre>$ yarn link @airy/maleo.js</pre>
And you are good to go! Maleo.js are now living in your <code>node_modules</code> directory as a symlinked module

more:
<ul>
<li><a href="https://yarnpkg.com/lang/en/docs/cli/link/">Yarn Link</a></li>
<li><a href="https://docs.npmjs.com/cli/link.html">NPM Link</a></li>
</ul>
</details>
1 change: 1 addition & 0 deletions README.md
4 changes: 4 additions & 0 deletions ci/publish-canary.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
echo "Publishing Canary"
yarn publish:prepublish
yarn publish:version-canary
yarn publish:canary
4 changes: 4 additions & 0 deletions ci/publish-stable.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
echo "Publishing Stable"
yarn publish:prepublish
yarn publish:version-stable
yarn publish:stable
Loading