Skip to content

Commit

Permalink
Sync Canary to Master (#26)
Browse files Browse the repository at this point in the history
* docs(contributing md): add contributing documentation (#16)

docs(readmemd): add initial readme md until dynamic import

* docs(readmemd): fix contributing url (#18)

fix contributing url on readme md

* fix(babelconfigjs): fix built absolute path to relative path (#19)

Fix built file path and extract customizable to outer maleo

fix(playground): change path to root maleo

fix(plugins): change name of plugins into maleo-

fix(maleo binary): add figlet to maleo binary

* test(test): make babel-jest working (#20)

Adding babelrc and @babel/plugin-transform-modules-commonjs to make babel-jest works

* chore(package json example): remove example from workspace (#21)

need to remove example from workspace since we dont want hoisted dependency to be used by example,
it doesnt really mimic how the library works

fix(maleo/build/webpack): resolve

add node modules on project root directory to resolve

fix(webpackts): change nodeexternals to own function

remove node externals switch it to our own function

fix(package json): add dev dependencies react and react router

fix(webpack): add nodeexternals add airy maleo

* docs(readme): fixed typo on getinitalprops to getinitialprops (#22)

* refactor(md): clean up md and template (#23)

* chore(circleci): remove job to only build

* test(packagejson travis circle): add coveralls and travisyml (#27)

chore(lock.yml): add lock.yml to automatically lock issues and pr

test(loadinitialprops test): add more unit test for load props

test(routehandler): add test for routehandler

test(utils index): add utilities test

* test(jest test): add enzyme config and document test (#28)

* fix(webpack): missing .js extension on filename (#30)

* feat(maleo playground): add default server and client (#29)

add defult server, client, and routes for auto import, so user no need to register snippet

BREAKING CHANGE: client haven't use the route yet

feat(client route): add register route

added register route for client to be able to pass it to window and feed to default client

docs(readmemd): update docs for default server and client

feat(webpack client wrap): add register wrap to window

feat(webpack register-loader client): auto register

add auto register using register loader for wrap and routes to be used by client

feat(webpack app client): add auto register for app

refactor(webpack): clean up static entries

refactor static entries to be more readable

fix(webpack): comment out hardsourcewbp

fix(webpack): fix node externals

fix(webpack server tsplugin): fix error not bundling on client

error caused by webpack getting imported to server.ts not sure what cause the error

feat(client): added register entry class

docs(readmemd): update register route readme

* fix(webpack client server): remove hmr but fix sync (#33)

* docs(readme): adjust readme to default register (#34)

* feat(maleo webpack): add rimraf before run and cache server (#35)

* feat(webpack loaders routes): add auto code splitting on routes (#36)

* docs(readmemd): add contributors (#38)

* docs(readmemd): add license (#39)

* docs(readmemd): add license

* Update README.md

* fix(require cache hmr): add nextjs license (#40)

* fix(webpack stats-writer plugin): add dynamic key on stats json (#41)

added dynamic key to stats json so maleo wont serve dynamic file as normal file

* feat(webpack client preset): add simple hmr refresh (#37)

fix(clienthmr): hot module now accepting new changes

BREAKING CHANGE: new hash is not synced

* feat(maleo-routes-split): auto add key for routes (#42)

docs(readmemd): update docs remove routes key

remove routes key

* docs(readmemd): add badges (#43)

ci(travis circleci): yml

* chore(lerna travis package): prepare for npm publish automation (#44)

* chore(travis gitignore): add separation on branch master and canary (#45)

* chore(travis yml): testing deploy (#46)

* chore(travis): testing chore (#47)

* fix(css-plugin): first render isl not working (#48)

fix(withstyles): change stylecontext to function generate

* chore(yarn lock): update yarn lock to use static reactdom (#51)

chore(package.json): do semver to 0.0.1

chore(package.json): add gren

chore(travis.yml): add script for prepublish and publish canary

* chore(travis.yml, publish-canary.sh): publishing to canary with sh file (#52)

* chore(package.json): publish to canary and add dist-tag (#53)

* chore(travis.yml): add registry auth token before deploy (#54)

* chore(travis.yml): add access public npm (#55)

chore(package.json yarn.lock): add the correct gren

* chore(package.json): comment gren for now (#56)

* chore(package.json): try to use publish from-git (#57)

* chore(travis.yml): remove tag require (#58)

* chore(package.json): remove from-git tag (#59)

* chore(package.json): bump version to v0.0.2 (#60)

* chore(package.json): bump version to 3 and add force-publish (#61)

* chore(lerna.json, package.json, .travis.yml): add lerna version config (#62)

* chore(package.json): bump version manually (#63)

* chore(lerna.json): move all the versoin config to publish (#64)

* chore(package.json): bump version to 0.0.5 (#65)

* chore(package.json): bump version and add conventional commit tag (#66)

* chore(lerna.json, package.json): add version bump prerelease (#67)

* chore(publish-canary.sh): attach ci to head when publish canary (#68)

* chore(publish-canary): remove local (#69)

* chore(publish-canary): change return to exit 1 (#70)

* chore(release): publish %s [skip ci]

 - @airy/maleo@0.0.6-canary.50
 - @airy/maleo-css-plugin@0.0.6-canary.50
 - @airy/maleo-gulp-plugin@0.0.6-canary.50
 - @airy/maleo-redux-plugin@0.0.6-canary.50
 - @airy/maleo-typescript-plugin@0.0.6-canary.50

* chore(travis.yml, lerna.json): add checkout branch sh, no force publish (#71)

* chore(ci): move ci related commands to new folder (#72)

chore(changelog): remove changelog

* docs(readme.md): update register routes docs (#73)

* feat(webpack): change maleo-routes.json to routes.json (#74)

use exact path ro routes.json and add react router dep

refactor(package.json, yarn.lock): remove react and react-router core

* chore(release): publish %s [skip ci]

 - @airy/maleo@0.0.6-canary.51

* chore(lerna.json): force publish @airy/maleo (#75)

* chore(package.json): bump version to 0.0.7 (#76)

* chore(release): publish %s [skip ci]

 - @airy/maleo@0.0.8-alpha.0
 - @airy/maleo-css-plugin@0.0.8-alpha.0
 - @airy/maleo-gulp-plugin@0.0.8-alpha.0
 - @airy/maleo-redux-plugin@0.0.8-alpha.0
 - @airy/maleo-typescript-plugin@0.0.8-alpha.0

* chore(package.json changelog): change alpha to canary, remove changelog (#77)

* chore(package.json): fix changelog typo and bump versoin (#78)

* chore(release): publish %s [skip ci]

 - @airy/maleo@0.0.8-canary.2
 - @airy/maleo-css-plugin@0.0.8-canary.2
 - @airy/maleo-gulp-plugin@0.0.8-canary.2
 - @airy/maleo-redux-plugin@0.0.8-canary.2
 - @airy/maleo-typescript-plugin@0.0.8-canary.2

* docs(readme): add npm badge and fix contributors (#79)

* chore(package.json, travis): publish stable (#80)

* chore(travis.yml): move test:cov to before_deploy (#81)

* docs(readme): add @canary docs (#82)

* chore(package.json, yarn.lock): bump react-router version to 5.0.0 (#83)

* chore(release): publish %s [skip ci]

 - @airy/maleo@0.0.8-canary.3

* docs(readme.md): fix trailing commas, and add dev (#84)

t push --force# with '#' will be ignored, and an empty message aborts the commit.
  • Loading branch information
alvinkl authored and AndariasSilvanus committed Mar 19, 2019
1 parent 12b6414 commit e8a2bb5
Show file tree
Hide file tree
Showing 102 changed files with 4,165 additions and 1,119 deletions.
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

0 comments on commit e8a2bb5

Please sign in to comment.