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

finish microcosm marketing site #506

Closed
wants to merge 391 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
391 commits
Select commit Hold shift + click to select a range
6c52b38
Update changelog
nhunzaker Nov 8, 2017
cf3f4b2
Make flow happy
nhunzaker Nov 8, 2017
b6c8411
Add changelog for 12.12.1/2
nhunzaker Nov 9, 2017
32c6b7d
Bump package.json to 13.0.0-alpha
nhunzaker Nov 9, 2017
01076ec
Ignore test helpers when collecting code coverage
nhunzaker Nov 9, 2017
8e2aa21
Add web deploy command
nhunzaker Nov 10, 2017
b3ddf93
Add slack hook
nhunzaker Nov 10, 2017
052fd89
Format jest config
nhunzaker Nov 10, 2017
3655b45
Install AWS CLI in website task
nhunzaker Nov 10, 2017
1905e56
Web task does not need to attach common workspace
nhunzaker Nov 10, 2017
aa8c899
Add installation caching
nhunzaker Nov 10, 2017
f558679
Do not cache
nhunzaker Nov 10, 2017
de34184
Execute deploy script through yarn
nhunzaker Nov 10, 2017
2eea38e
Attach workspace to website task
nhunzaker Nov 10, 2017
68435ea
Upstream repo.parallel fix
nhunzaker Nov 9, 2017
c418759
Repo.parallel can accept objects (#452)
nhunzaker Nov 13, 2017
a7dbff6
Fix repo.parallel example
nhunzaker Dec 4, 2017
394d0fc
Fix publish script
nhunzaker Dec 4, 2017
9117260
Do not switch to site
nhunzaker Dec 4, 2017
43c0457
Do not switch directories
nhunzaker Dec 4, 2017
ac1dcc3
Switch to the correct directory
nhunzaker Dec 4, 2017
4b40f75
One less step
nhunzaker Dec 4, 2017
25a2764
set up structure and JS (#455)
Jan 3, 2018
659a17d
ch/design tweaks (#461)
Jan 4, 2018
76f25e6
refactor images, change heading colors on scroll (#464)
Jan 9, 2018
aae54b4
Add public path to new site deployment
nhunzaker Jan 9, 2018
b0fe11d
Remove workspaces
nhunzaker Jan 9, 2018
71f0bc6
No reason to use defaults for one CI job
nhunzaker Jan 9, 2018
b30c061
lazy load images (#469)
Jan 11, 2018
a2a0002
Ch/animate text and graphics (#471)
Jan 26, 2018
de365f3
Ch/change breakpoint (#473)
Jan 30, 2018
df945c4
scss fixes for IE
ccchwang Feb 1, 2018
d61ca54
Ch/refactor scroll (#475)
Feb 7, 2018
d41681f
added section-specific touches to graphic
ccchwang Feb 5, 2018
50b66f3
refactored to take advantage of parent selector
ccchwang Feb 5, 2018
0c341a0
created animtion for checkmark on panel 8
ccchwang Feb 6, 2018
165039a
fixed animation for safari
ccchwang Feb 6, 2018
493b6ba
Add path prefix
nhunzaker Jan 9, 2018
538ae25
Do not duplicate path option
nhunzaker Jan 9, 2018
f7faeab
Move prefix paths to microcosm-www-next
nhunzaker Jan 9, 2018
12c695a
Simplify format and lint commands. Remove bin scripts. Add caching
nhunzaker Feb 9, 2018
0eb2bcd
Add prettierignore file
nhunzaker Feb 9, 2018
a5c7c9e
Fix lint
nhunzaker Feb 9, 2018
32a389d
Add fetching and caching to microcosm-graphql. Flesh out example
nhunzaker Sep 27, 2017
30fe23f
Work in progress
nhunzaker Sep 28, 2017
b77883d
Make execute blocking
nhunzaker Oct 18, 2017
eed3e80
WIP
nhunzaker Oct 20, 2017
8cb5a2a
Rethink queries in terms of questions and answers
nhunzaker Oct 23, 2017
8533e80
Use a separate cache for preparation and resolution
nhunzaker Oct 24, 2017
b7b609f
There is no need for hashing based on object identities
nhunzaker Oct 24, 2017
7762b08
Make caching configurable
nhunzaker Oct 24, 2017
a7e4141
Start thinking through pagination
nhunzaker Oct 25, 2017
2d0a50c
Update configuration, simplify some operations
nhunzaker Nov 10, 2017
0d14245
Unskip an execute test
nhunzaker Nov 10, 2017
2c39e76
Simplify resolvers
nhunzaker Nov 10, 2017
95b7038
Add concept of subject, update domain dispatch
nhunzaker Nov 28, 2017
54459b4
Add custom observable
nhunzaker Dec 4, 2017
21ffacf
Flesh out more usage of observables. Build fails, but it'll fail for …
nhunzaker Dec 6, 2017
d73d959
Rework some modules to cut size and fix promise middleware
nhunzaker Dec 12, 2017
c5c5a40
Fix some lint errors (but not all of them)
nhunzaker Dec 12, 2017
6532cb5
Fix thunk middleware test
nhunzaker Dec 12, 2017
3ec27af
Observable hooks are autobound, remove uid and cancel
nhunzaker Dec 12, 2017
4649b8a
Get some more tests to pass, wireup more generator actions
nhunzaker Dec 13, 2017
ea79f5e
Get history removal tests to pass. Add tree visualization.
nhunzaker Dec 19, 2017
d19739c
Fix the tree visualization
nhunzaker Dec 19, 2017
d38918c
Remove extraneous tests. Update promise and toggle tests
nhunzaker Dec 19, 2017
28ce661
Pass more tests
nhunzaker Dec 20, 2017
6faf5be
Begin thinking about fetching
nhunzaker Jan 3, 2018
a48fea3
Start consolidating features to achieve stability
nhunzaker Jan 5, 2018
e26ff65
Move microcosm addons out into microcosm-react
nhunzaker Jan 9, 2018
2d24dd9
Format
nhunzaker Jan 9, 2018
d039c13
Almost there. Almost all tests pass
nhunzaker Jan 16, 2018
9b87767
Fix microcosm-react tests
nhunzaker Jan 17, 2018
8b4b338
Update CircleCI command
nhunzaker Jan 17, 2018
81a49e1
Add clean up step. Fix some microcosm-react tests
nhunzaker Jan 18, 2018
f8edf58
Clean up
nhunzaker Jan 19, 2018
e47bb70
Pass through parent option, define state as a getter
nhunzaker Jan 19, 2018
0973a97
Re-enable fork benchmark
nhunzaker Jan 19, 2018
19ae3df
Clean up
nhunzaker Jan 19, 2018
8bac88f
Remove unused import in microcosm.js
nhunzaker Jan 19, 2018
9dba8d5
Update preact tests. Properly build microcosm-preact/react
nhunzaker Jan 26, 2018
ec30822
Fix lint
nhunzaker Jan 26, 2018
f2c4e42
Remove microcosm-react-router
nhunzaker Jan 26, 2018
bd71ff1
Update microcosm-http tests
nhunzaker Feb 8, 2018
9d99a70
Fix lint issue
nhunzaker Feb 8, 2018
32bcbd8
Ignore preact build directory
nhunzaker Feb 8, 2018
5fe1d41
Update subject and observable tests. Achieve full coverage for subject
nhunzaker Feb 8, 2018
d5eefcc
Unsubscribe is now cancel. Full test coverage of Observable and Subject
nhunzaker Feb 8, 2018
9397d6d
Format
nhunzaker Feb 8, 2018
c039ea0
Merge Microcosm preact and Microcosm react
nhunzaker Feb 8, 2018
a7f149c
Use microcosm-dom in package.json workspace
nhunzaker Feb 8, 2018
7fdcce3
Format
nhunzaker Feb 8, 2018
4ae6a4b
Fix microcosm-http tests
nhunzaker Feb 9, 2018
4d8cb86
Fix final efficiency tests. Update bundler
nhunzaker Feb 9, 2018
d61d1f6
Fix flow issues
nhunzaker Feb 9, 2018
7b958d5
Consistently return null from tree operations
nhunzaker Feb 9, 2018
6a35f78
Remove eslint cache. Tweak tests after rebase
nhunzaker Feb 9, 2018
146f20a
Revert bootstrap change to circleci.yml
nhunzaker Feb 9, 2018
a4b7c36
Add bootstrap command
nhunzaker Feb 9, 2018
2e2613d
Update flow, merge microcosm-dom test suite
nhunzaker Feb 12, 2018
ed07092
Fix lint
nhunzaker Feb 12, 2018
36f393c
Fix reference to bad jest config in microcosm-dom
nhunzaker Feb 14, 2018
4f15c8a
Remove duplicative assignments in GraphQL webpack config
nhunzaker Feb 14, 2018
331325c
Fix bad references to addons in microcosm-dev-tools
nhunzaker Feb 14, 2018
cfcb34c
Make a few assertion tests dev only
nhunzaker Feb 14, 2018
57e1b2a
Move microcosm-dom docs to associated packages. Format docs.
nhunzaker Feb 20, 2018
ba06a99
Add linting to flow config
nhunzaker Feb 20, 2018
649b4bf
Directly reference eslint in lint command
nhunzaker Feb 20, 2018
b136cee
Remove microcosm-dom docs from microcosm
nhunzaker Feb 20, 2018
0262bc1
Presenter::intercept can have multiple handlers
nhunzaker Feb 20, 2018
3684b6d
Fix typo in presenter comment
nhunzaker Feb 20, 2018
117e9de
Upgrade node version on CI
nhunzaker Feb 20, 2018
93f53e5
Remove duplicate bootstrap command
nhunzaker Feb 21, 2018
462b4bb
Remove deploy script. Use Netlify
nhunzaker Feb 21, 2018
c8d81dd
Remove concent of "unstarted". Fix start callback in microcosm-dom.
nhunzaker Feb 27, 2018
873e0a6
Clean up Subject, Observable, and History interface
nhunzaker Feb 21, 2018
2c7fa97
Make observable error dev only
nhunzaker Feb 21, 2018
8d1e152
Replace package-lock.json with yarn.lock
nhunzaker Mar 9, 2018
8894ba9
Do not setup enzyme when testing microcosm
nhunzaker Mar 16, 2018
548ecc9
Fix lifecycle test
nhunzaker Mar 16, 2018
0e2ad88
Fix circular dependency
nhunzaker Mar 16, 2018
9433739
Make assertion test dev-only
nhunzaker Mar 16, 2018
5936d39
Update and prune dependencies
nhunzaker Mar 16, 2018
efbada0
Move cache-directory to node_modules
nhunzaker Mar 16, 2018
b3b3986
Fix modelWillUpdate reference in changelog
nhunzaker Mar 16, 2018
e473962
Update benchmark build references
nhunzaker Mar 16, 2018
474b6f0
Only collect coverage from microcosm src directory
nhunzaker Mar 16, 2018
0e5dede
Inline jest extensions
nhunzaker Mar 16, 2018
6c103a4
Do not format snapshots
nhunzaker Mar 16, 2018
b826c97
Domains and effects are standalone entities
nhunzaker Feb 21, 2018
1ba83ce
Remove form-serialize dependency from Microcosm
nhunzaker Mar 19, 2018
af36b87
Wrap action-form tests in describe block
nhunzaker Mar 20, 2018
ee1bb57
Domains are subjects
nhunzaker Mar 19, 2018
0c66124
Add Observable::map
nhunzaker Mar 19, 2018
617db91
Add value prop to ActionForm
nhunzaker Mar 20, 2018
945e928
Add documentation for ActionForm value prop
nhunzaker Mar 21, 2018
f820d4b
Domains can be defined as observables
nhunzaker Mar 17, 2018
537c4a4
Lower max-age cache on build badge.
nhunzaker Mar 23, 2018
239b3c3
Micromanage inception
nhunzaker Mar 23, 2018
6cf52a9
Add before/after examples to Micromanage readme
nhunzaker Mar 23, 2018
c1d0c84
[micromanage] Downgrade version to 0.0.0. Add jest
nhunzaker Mar 28, 2018
b99482d
[micromanage] Add schemas
nhunzaker Mar 27, 2018
d6492c5
updated graphic for intro section
ccchwang Apr 2, 2018
868cba1
[microcosm] Unify effect and domain behavior through agent class
nhunzaker Apr 11, 2018
1e37997
Add some extra test coverage for proto. Patch up existing coverage
nhunzaker Apr 12, 2018
502c706
Add license to repo root and reference in readme
nhunzaker Apr 12, 2018
80d4f62
update packages in readme
nhunzaker Apr 12, 2018
349403d
trying out new scroll behaviour/look
ccchwang Apr 4, 2018
c029d09
tweaking layout for new scroll
ccchwang Apr 6, 2018
98f6dd9
added js to stick section to bottom
ccchwang Apr 6, 2018
4c1d2bf
made toggle container responsive
ccchwang Apr 12, 2018
3989018
fixed footer color
ccchwang Apr 12, 2018
1e4bb36
recalc elem stick upon view change
ccchwang Apr 12, 2018
4967893
made sections fade in and out
ccchwang Apr 12, 2018
1e9d636
tweak nav
ccchwang Apr 13, 2018
6d95cb1
got rid of slow box shadow
ccchwang Apr 13, 2018
4c93f62
finished styling nav/footer
ccchwang Apr 13, 2018
5ecf7de
ran prettier
ccchwang Apr 13, 2018
88a1c6f
small tweaks
ccchwang Apr 13, 2018
803d37d
fixed scss formatting
ccchwang Apr 13, 2018
e93e67c
format
ccchwang Apr 13, 2018
94e4e1f
Increase coverage for microcosm-http
nhunzaker Apr 13, 2018
bf9be88
Update CONTRIBUTING with the correct bootstrap command
nathanielw Apr 16, 2018
dde7615
Document use of yarn workspace
nathanielw Apr 16, 2018
d7a8a96
Update license documents and use consistent file extension
nhunzaker Apr 17, 2018
34f2a31
Fix bad reference to moved license file
nhunzaker Apr 17, 2018
5929d8e
[microcosm] Add remove data helper. Setting undefined removes props
nhunzaker Apr 17, 2018
aad9f15
[microcosm] Refactor data functions
nhunzaker Apr 17, 2018
424afff
[microcosm] Rework key path terminology
nhunzaker Apr 17, 2018
7d76d5c
[microcosm] Increase test coverage for remove
nhunzaker Apr 17, 2018
249cd81
[microcosm] Increase coverage on merge utility
nhunzaker Apr 17, 2018
d41be02
Change the way merge works to avoid returning EMPTY_OBJECT
nhunzaker Apr 18, 2018
7b31736
[microcosm] Remove React dev dependencies
nhunzaker Apr 23, 2018
08af954
[microcosm] Patch and Reset only trigger on complete
nhunzaker Apr 23, 2018
f09e3f3
[microcosm] Do not process actions that are only started
nhunzaker Apr 23, 2018
8c3dac9
[microcosm] Update flow types to better handle default state
nhunzaker Apr 23, 2018
7baa304
Fix examples. Fix ReactRouter edge case with Presenters
nhunzaker Apr 24, 2018
ce71391
Replace console.assert with assert
nhunzaker Apr 24, 2018
afbf1cb
Remove unused webpack variable in microcosm-devtools
nhunzaker Apr 24, 2018
9fd1671
Add file-uploader example. Updates to microcosm-dom
nhunzaker Apr 24, 2018
7ca692d
Fix typos and rephrase some tests
nhunzaker Apr 24, 2018
f9b316f
Use older version of workspaces pattern
nhunzaker Apr 24, 2018
b1ce78a
Update data helpers to fix flow issues
nhunzaker Apr 25, 2018
8d004b4
A few minor fixes to history
nhunzaker Apr 25, 2018
1b642d0
[microcosm] Async observables
nhunzaker Apr 25, 2018
01c5181
Move cleanup code in observable so that it is closer together
nhunzaker Apr 26, 2018
00fa702
Move position of incrementer in observer queue
nhunzaker Apr 26, 2018
d68a540
Fix typo in observable test
nhunzaker Apr 26, 2018
405d2bc
Subscription states should be incremental
nhunzaker Apr 26, 2018
536ccf2
[microcosm] Async, scheduled, Subjects
nhunzaker Apr 25, 2018
b484299
Update tests with asychronous behavior
nhunzaker Apr 26, 2018
e403a5c
Clean up some final items from async work
nhunzaker Apr 26, 2018
16ddcdf
Use subscriber interface in Subject
nhunzaker Apr 26, 2018
55c31b1
Use wildcards to avoid circular dependencies
nhunzaker Apr 27, 2018
7ada715
Drop new keyword in front of Subject.hash
nhunzaker Apr 27, 2018
f9865cb
Fix some edge cases in remove tests for arrays
nhunzaker Apr 27, 2018
0372345
Remove rollup-plugin-json
nhunzaker Apr 27, 2018
01d1f19
[microcosm] Split Subject.hash into SubjectMap class
nhunzaker Apr 26, 2018
52cb4be
Update README.md
nhunzaker May 2, 2018
7c4c0d7
Use proper name for subject-map tests
nhunzaker May 8, 2018
f83103c
[microcosm] Always, synchronously, emit the first observer.next()
nhunzaker May 8, 2018
052495b
Add note about scheduler error
nhunzaker May 9, 2018
8ce2c5e
Update babel-env settings
nhunzaker May 16, 2018
0c4da0a
Update broken links
dlederle Jun 7, 2018
f36662a
Address dependency issue with microcosm-devtools
nhunzaker Jun 12, 2018
03ce9f4
Bump microcosm devtools to 0.0.4
nhunzaker Jun 12, 2018
d476e8b
Add notes to help with debugging of chrome extension. Tweek text size…
nhunzaker Jun 12, 2018
8a94645
Format devtools example
nhunzaker Jun 12, 2018
4fa4226
Bump microcosm 13.0.0-alpha.0
nhunzaker Jun 13, 2018
87656ba
[micromanage] Use JSON schemas. Start Collection
nhunzaker Mar 29, 2018
3908789
Start thinking about the breakdown
nhunzaker May 4, 2018
4d7cc4e
Start fleshing out the cache
nhunzaker May 8, 2018
1716b1f
Start thinking through a presentation layer cache
nhunzaker May 14, 2018
1da0ede
Fix lint issues
nhunzaker May 15, 2018
95634b9
Resolve pagination problem
nhunzaker May 16, 2018
25e5325
Resolve pagination problem
nhunzaker May 16, 2018
4b8d437
Handle override case
nhunzaker May 16, 2018
eb02392
Add todo note
nhunzaker May 16, 2018
ed0a26f
Cleanup
nhunzaker May 16, 2018
16ac381
Cleanup micromanage dependencies
nhunzaker May 16, 2018
7ab8a38
Remove micromanage lockfile
nhunzaker May 16, 2018
d990479
Rename connect to query, use Apollo-like interface
nhunzaker Jun 13, 2018
a48523f
Fix flow type
nhunzaker Jun 13, 2018
e2dcde2
Bump microcosm and microcosm-dom to 13.0.0-alpha.1
nhunzaker Jun 13, 2018
3998f20
Fix build issue in microcosm-dom
nhunzaker Jun 13, 2018
23c59a3
Avoid using Object.assign
nhunzaker Jun 13, 2018
d2df390
Drop assertion usage
nhunzaker Jun 13, 2018
1b3fc02
Bump microcosm-dom to 13.0.0-alpha.2
nhunzaker Jun 13, 2018
98dc74f
Update microcosm-dom readme
nhunzaker Jun 13, 2018
c45ad88
Drop hard dependency on Microcosm in MicrocosmDOM
nhunzaker Jun 13, 2018
67d96af
Add back patch/reset API
nhunzaker Jun 18, 2018
fbd3d38
Add exceptions for push/reset in flow
nhunzaker Jun 18, 2018
7e89273
Pass next when completing with a payload. Improve efficiency
nhunzaker Jun 18, 2018
542b2d5
Format. Fix flow issues
nhunzaker Jun 18, 2018
6d94b88
Revert assertion change to function guard
nhunzaker Jun 18, 2018
67c4ee8
Use lifecycle constants in Subject
nhunzaker Jun 18, 2018
f810c13
Add confirmation that filter does not eagerly process iterations
nhunzaker Jun 18, 2018
609c6da
Make domain creation when using observables clearer
nhunzaker Jun 19, 2018
9fb52dc
Add back max history option
nhunzaker Jun 19, 2018
308ebfd
Upgrade build dependencies (#522)
nhunzaker Jun 27, 2018
55395fe
[microcosm] Add flow types for scheduler
nhunzaker Jun 27, 2018
08d5535
Testing the scheduler is dev-only
nhunzaker Jun 27, 2018
ed603ac
Pass correct arguments into dev description block
nhunzaker Jun 27, 2018
9d8741d
Handle promise errors using second argument of then() (#524)
nhunzaker Jun 29, 2018
771c6d9
finish microcosm marketing site
leobauza Apr 19, 2018
646a99e
fix unused import error
leobauza Apr 19, 2018
77c2258
add description, image, and favico
leobauza Apr 23, 2018
d6a827c
tweak sizing of slides
leobauza Apr 24, 2018
53ad183
add hamburger menu and remove oversized panels
leobauza Apr 27, 2018
96bea03
update copy
leobauza Jul 18, 2018
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
12 changes: 9 additions & 3 deletions .babelrc
Original file line number Diff line number Diff line change
@@ -1,10 +1,16 @@
{
"presets": [
[
"es2015",
"env",
{
"loose": true,
"modules": false
"modules": false,
"useBuiltIns": "usage",
"targets": {
"browsers": [
">= 0.25%"
]
}
}
],
"stage-2",
Expand All @@ -14,7 +20,7 @@
"env": {
"test": {
"presets": [
"es2015",
"env",
"stage-2",
"react"
]
Expand Down
57 changes: 10 additions & 47 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -1,59 +1,22 @@
version: 2

defaults: &defaults
docker:
- image: circleci/node:7
working_directory: ~/repo

restore-npm-cache: &restore-npm-cache
restore_cache:
keys:
- v1-dependencies-{{ checksum "package.json" }}
- v1-dependencies-

jobs:
build:
<<: *defaults
working_directory: /home/circleci/microcosm
docker:
- image: circleci/node:8.10
steps:
- checkout
- <<: *restore-npm-cache
- restore_cache:
keys:
- yarn-cache-{{ checksum "yarn.lock" }}
- run: yarn install
- save_cache:
paths:
- node_modules
key: v1-dependencies-{{ checksum "package.json" }}
audit:
<<: *defaults
steps:
- checkout
- <<: *restore-npm-cache
key: yarn-cache-{{ checksum "yarn.lock" }}
- run: yarn flow
- run: yarn lint
test-dev:
<<: *defaults
steps:
- checkout
- <<: *restore-npm-cache
- run: yarn test:cov
- run: yarn report-coverage
test-prod:
<<: *defaults
steps:
- checkout
- <<: *restore-npm-cache
- run: yarn test:prod

workflows:
version: 2
microcosm:
jobs:
- build
- audit:
requires:
- build
- test-dev:
requires:
- build
- test-prod:
requires:
- build
- run: yarn test:cov --ci
- run: yarn codecov coverage/lcov.info
- run: yarn test:prod --ci
3 changes: 3 additions & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
**/build/**
**/node_modules/**
**/coverage/**
48 changes: 48 additions & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
var isIntegration = !!process.env.CI

module.exports = {
env: {
browser: true,
commonjs: true,
es6: true,
node: true,
jest: true
},
parser: 'babel-eslint',
parserOptions: {
ecmaVersion: 7,
ecmaFeatures: {
experimentalObjectRestSpread: true,
jsx: true
}
},
settings: {
flowtype: {
onlyFilesWithFlowAnnotation: true
}
},
extends: ['eslint:recommended', 'plugin:flowtype/recommended'],
plugins: ['react', 'jest', 'prettier', 'flowtype', 'flowtype-errors'],
rules: {
semi: 'off',
'no-console': 'off',
'no-debugger': isIntegration ? 'error' : 'off',
'no-unused-vars': [
1,
{ args: 'none', ignoreRestSiblings: true, varsIgnorePattern: '^_' }
],
'no-return-assign': 'error',
'react/jsx-no-duplicate-props': ['warn', { ignoreCase: true }],
'react/jsx-no-undef': 'error',
'react/jsx-uses-react': 'warn',
'react/jsx-uses-vars': 'warn',
'react/no-danger-with-children': 'warn',
'react/no-direct-mutation-state': 'warn',
'react/no-is-mounted': 'warn',
'react/react-in-jsx-scope': 'error',
'react/require-render-return': 'warn',
'react/style-prop-object': 'warn',
'jest/no-focused-tests': isIntegration ? 'error' : 'warn',
'prettier/prettier': isIntegration ? 'error' : 'warn'
}
}
57 changes: 0 additions & 57 deletions .eslintrc.json

This file was deleted.

15 changes: 9 additions & 6 deletions .flowconfig
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,17 @@
.*/node_modules/.*
.*/build/.*
.*/test/.*
# TODO: Remove these
.*/packages/microcosm-devtools/.*
.*/packages/microcosm-graphql/.*
.*/packages/microcosm-www/.*
.*/packages/microcosm-www-next/.*

[include]
src/
examples/
packages/microcosm/src

[libs]
flow/
packages/microcosm/flow

[options]
experimental.const_params=true
unsafe.enable_getters_and_setters=true
[lints]
all=warn
9 changes: 6 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,10 +1,13 @@
coverage
stats.json
node_modules
build
!bin/build
*.asm
*.cfg
build
tmp
npm-debug.log
.DS_Store
.babel-cache
lerna-debug.log
npm-debug.log
*.zip
.eslintcache
1 change: 0 additions & 1 deletion .nvmrc

This file was deleted.

4 changes: 4 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
**/node_modules/**
**/build/**
**/coverage/**
**/*.js.snap
75 changes: 25 additions & 50 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,72 +15,65 @@ You use the same node version we are developing with by running
nvm use
```

> You may need to run `nvm install` if you haven't installed the node version on `.nvmrc`
> You may need to run `nvm install` if you haven't installed the node version we require.

## Getting Started

All commands should be run using yarn. If you haven't switched to [yarn](https://yarnpkg.com/en/) yet, now's a great time!

> If you are familiar with npm then using yarn should be a breeze. You can keep using npm if you'd prefer but you will miss out on the safety and security of yarn

You can install dependencies with:

```bash
yarn install
```

### Examples
The Microcosm repo manages multiple projects using [yarn workspaces](https://yarnpkg.com/lang/en/docs/workspaces/). Each project lives within a sub-folder of the `./packages` directory.

The [examples section](examples) showcase Microcosm features. These may be helpful as you develop new features or improve existing ones. Check out the [examples section of this repo](examples) to get started running the examples.
To install dependencies for all projects, run `yarn install` from the repo root.

### Docs

Documentation found on the [Microcosm site](http://code.viget.com/microcosm) is generated from markdown files in the [docs section](docs).
Documentation found on the [Microcosm site](http://code.viget.com/microcosm) is generated from markdown files in the [docs section of the `microcosm` package](./packages/microcosm/docs).

> We would love your help in improving documentation. Get involved by creating a pull request addressing an issue with the label `documentation`, by creating a documentation issue, or contributing to the conversation on existing [issues](https://github.com/vigetlabs/microcosm/issues?q=is%3Aissue+is%3Aopen+label%3Adocumentation).

### Site

You may want to run what you see on [code.viget.com/microcosm](http://code.viget.com/microcosm) locally. To do so head over the [site section of this repo](site).
You may want to run what you see on [code.viget.com/microcosm](http://code.viget.com/microcosm) locally. To do so head over the [site section of this repo](./packages/microcosm-www).

## Prettier

We are using [prettier](https://github.com/prettier/prettier) combined with [eslint](http://eslint.org/) to keep formatting and format linting easy. We do that by running:
We use [prettier](https://github.com/prettier/prettier) to ensure consistent style across all packages. Automated tests continually check that code formatting is consistent, failing the build if it is not. Make sure this doesn't happen by running:

```bash
yarn run pretty
yarn format
```

or
This will run `prettier` on all relevant fils in the repo.

```bash
make pretty
```
## Testing

These will first run `prettier` to format our code and then run `eslint --fix` to make additional style changes and fixes.
A few of our packages depend on the built output of other packages. For example, `microcosm-preact` depends on a production build of `microcosm`. When working locally, incrementally build all packages by running the `watch` command.

### Things to note about the prettier/eslint combo
First make sure you have fswatch:

We are defaulting to prettier's opinions on some things (the ones it forces us to). Most notably single quotes. Prettiers **will** use double quotes (even in single quote mode) when it is "prettier" to do so.
```bash
brew install fswatch
```

ie:
```javascript
// prettier will do this (what we chose to do)
"I am using double quotes because it's prettier"
Then execute:

// eslint --fix would do this
'I am using single quotes because it\'s eslint --fix'
```bash
yarn watch
```

We are letting this happen for two reasons:
Then in another terminal, run:

1. Write whatever you want, prettier will fix it, that's the point
2. Our `yarn run lint` task would error out if we did a `eslint --fix`. There is no way to turn change prettier's behaviour but we can turn off the offending eslint rule
```bash
yarn test
```

## Testing
This run tests for every package. That's a lot of tests! To reduce down the number of tests that execute, consider running the test command with a filter:

```bash
yarn test
yarn test microcosm-preact
```

For test coverage:
Expand All @@ -90,8 +83,7 @@ yarn run test:cov
open ./coverage/index.html
```

> Be sure to check the `./coverage` folder to verify all code paths are
touched.
> Be sure to check the `./coverage` folder to verify all code paths are touched.

## Deployment

Expand All @@ -116,23 +108,6 @@ with:
make prerelease
```

## Conventions

**Consider master unsafe**, use [`npm`](https://www.npmjs.com/package/microcosm) for the latest stable version.

### Javascript

Microcosm uses ES6 Javascript (compiled using [Babel](babeljs.io)). As
for style:

- No semicolons (enforced by `.eslintrc.json`)
- 2 spaces for indentation (no tabs) (enforced by `.editorconfig`)
- Prefer ' over ", use string interpolation (enforced by `.eslintrc.json`)
- 80 character line length (enforced by `.editorconfig`)

> We recommend using an [editorconfig](http://editorconfig.org/), a [eslint](http://eslint.org/) plugin, and [prettier](https://github.com/prettier/prettier) integration for your editor during development to ensure standards are met.

### Reviews

All changes should be submitted through pull request. Ideally, at
least two :+1:s should be given before a pull request is merge.
All changes should be submitted through pull request. Ideally, at least two :+1:s should be given before a pull request is merge.
Loading