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

API overhaul (v1.0.0 preview) #15

Open
wants to merge 244 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
244 commits
Select commit Hold shift + click to select a range
529d86a
API overhaul
pygy Jan 17, 2016
13fde2a
Add back the default instance.
pygy Jan 17, 2016
0dae7bd
`sheets` and `remove` belong to a museum... err... a plugin.
pygy Jan 17, 2016
1be3c46
Add the filter interface
pygy Jan 26, 2016
b4c3394
Correctly handle comas in complex selectors. Close #20
pygy Jan 28, 2016
5c204ee
Also ignore comas in selector comments (see #20)
pygy Jan 28, 2016
36c50e5
Extend now works with selector lists. Closes #17.
pygy Jan 28, 2016
7a564d3
Rename @extend @composes and constrain the context where it can be us…
pygy Jan 29, 2016
ee947c6
Tolerate global() function without ':'
pygy Jan 30, 2016
27972e8
Accept vendor-prefixed at-rules as input
pygy Jan 30, 2016
da96b02
Fix and test the filter interface for inline styles
pygy Jan 30, 2016
c039de0
Review, clean up and tighten the inline test suite
pygy Jan 30, 2016
197649d
More test refactoring
pygy Jan 30, 2016
74e02ca
Homogenize buffer output (makes nicer filters) and test sheet filters
pygy Jan 31, 2016
9647bf8
Move the current prefix behavior to j2c-plugin-prefix-legacy.
pygy Feb 2, 2016
0c81c64
Cleanup the at-rule handling
pygy Feb 2, 2016
b8f663b
Refactor the plugin API, isolate flatIter
pygy Feb 7, 2016
6ac1f43
Refactor at rules handling, Add @font-feature-values and friends
pygy Feb 7, 2016
130eead
Simplified localization Regexp following the previous at-rule refacto…
pygy Feb 7, 2016
763a294
Add @counter-style + basic tests for all at-rules
pygy Feb 7, 2016
a89a221
Added kv(), at() and global()
pygy Feb 8, 2016
4f2aa5d
Improve the & operator. Fix #18 and #21.
pygy Feb 8, 2016
263e5f6
Remove the now redundant 'postprocess' plugins
pygy Feb 8, 2016
52f729a
README update, WIP
pygy Feb 8, 2016
b05bcea
Re-enable Coveralls for debuging.
pygy Feb 8, 2016
eaf0498
restore coveralls
pygy Feb 8, 2016
e6ed10d
Fix oversight regarding resilience against modifications of Object.pr…
pygy Feb 8, 2016
66523a5
Test the @local at rule
pygy Feb 8, 2016
b3b8126
100% coverage at the branch level
pygy Feb 9, 2016
fa8f29e
Simplify branchy code a bit, and update the tests to visit all branches.
pygy Feb 9, 2016
0418edb
Remove duplicate test
pygy Feb 10, 2016
f50fdca
remove superfulous hack conversion
pygy Feb 10, 2016
f9e2da4
add a 'dev' npm script for quick building/testing
pygy Feb 10, 2016
aa924c1
Simplify @composes
pygy Feb 10, 2016
aeec432
Also test the default j2c instance
pygy Feb 10, 2016
8cb29fe
Reindent the test suite
pygy Feb 10, 2016
f80fdb3
Give CodeCov a try
pygy Feb 10, 2016
5b13f1c
@compose now only accepts global classes as sources
pygy Feb 12, 2016
8316e69
Refactor the plugin system
pygy Feb 12, 2016
49f5165
Streamline plugin interface, improve terminology, cleanups and comments
pygy Feb 13, 2016
1e81d62
Move the $ handling of root properties to sheet.js (saves a function …
pygy Feb 13, 2016
126c35b
Turn @composes into j2c.compose, improve regexp accuracy
pygy Feb 13, 2016
3a5701d
Remove source validation for j2c.compose
pygy Feb 13, 2016
8c048ec
Remove a stray comment
pygy Feb 13, 2016
40a978e
Remove leftover code
pygy Feb 14, 2016
84db7b0
Bump eslint version
pygy Feb 15, 2016
2465740
Roll back to ESLint v1.x for now since v2 breaks Bithound at the moment.
pygy Feb 18, 2016
fcc0ac7
Add `$at` plugins
pygy Feb 22, 2016
128b55a
Make `$at` plugins more powerful, cut back on esoteric at-rules, remo…
pygy Feb 23, 2016
8b99f45
Improve argument order of once private, now public tree walking funct…
pygy Feb 24, 2016
86b79e9
Custom at-rules take precedence on default ones + misc cleanup)
pygy Feb 24, 2016
af61b0d
Better handlers
pygy Feb 28, 2016
b8aaaf5
Dedupe identical, sucessive selectors
pygy Feb 28, 2016
01cd448
Yet another $filter plugin improvement. Heavy :-/
pygy Feb 29, 2016
5498b6c
Build before running on Travis
pygy Mar 4, 2016
364a60a
Make localize robust in the presence of strings or comments in selectors
pygy Mar 4, 2016
30cd486
Improve and test malformed at-rules handling
pygy Mar 4, 2016
7ce1712
Cleanup and comments
pygy Mar 4, 2016
062e64c
Add back @extend^H@composes as @coopt
pygy Mar 4, 2016
be1780a
Fool Bithound regarding a dupe false positive
pygy Mar 4, 2016
1583e27
Another attempt at ESLint 2.x
pygy Mar 4, 2016
63c8e7d
Added CommonMark and jsdom dependencies.
pygy Mar 7, 2016
b603911
Moved public helpers to their own place
pygy Mar 7, 2016
c88c271
@coopt => @adopt (which has only one accepted spelling)
pygy Mar 8, 2016
2a241da
1.0.0-0
pygy Mar 8, 2016
70c8b8c
1.0.0-1
pygy Mar 8, 2016
a68512b
`.use({$names:...})` rather than the cashless
pygy Mar 8, 2016
39b1140
Don't localize CSS variables
pygy Mar 8, 2016
7a8ce25
Update HISTORY.md
pygy Mar 9, 2016
54f11d2
Clarify the change log
pygy Mar 9, 2016
62f045f
Allow $filter plugins to omit the streams they don't touch
pygy Mar 9, 2016
ee17bb7
Added a temporary notice until the docs are up to date
pygy Mar 11, 2016
35990ae
Various cleanups and better naming
pygy Mar 17, 2016
1019134
Cleanups
pygy Mar 17, 2016
2b0ef89
1.0.0-2
pygy Mar 17, 2016
c3faef2
1.0.0-3
pygy Mar 18, 2016
e4648f9
remove retired dev dep
pygy Mar 19, 2016
1e59d5a
Handle ampersand corner case
pygy Mar 19, 2016
67d4f3a
Cleanup HISTORY.md
pygy Mar 22, 2016
87de08c
Add Cash dependency, hopefully this will make the npm-run scripts win…
pygy Mar 22, 2016
bd56fdd
cash-global => cash-true
pygy Apr 7, 2016
1b162c3
Add assertion indirection. Paves the way for ospec
pygy May 29, 2016
76182c7
Added the possibility to trim the line endings.
pygy May 29, 2016
209cf75
Cleanup and comments
pygy May 29, 2016
ba8831e
Use longer names for the plugin API
pygy Jun 17, 2016
f3dbed1
README/HISTORY cleanup
pygy Sep 25, 2016
275f50e
Don't expose the walkers in filters
pygy Sep 11, 2016
2cc9b6c
Move the PostCSS plugin to the main repo
pygy Dec 11, 2016
acafe3b
NPM => Yarn
pygy Dec 11, 2016
ef2aded
Move the tests suite to ospec
pygy Dec 12, 2016
98feeb7
Cleanup
pygy Dec 16, 2016
b7fefd0
Add the WIP j2c-plugin-prefix-browser
pygy Dec 16, 2016
c332192
Browser plugin, more WIP (still not tested)
pygy Dec 21, 2016
4615c8c
Docs and typos
pygy Dec 23, 2016
6b93c21
[chore]: fix up ESLint and BitHound config
pygy Dec 23, 2016
1a24d2b
[chore] bump yarn version
pygy Dec 24, 2016
66242b4
[chore] Reformat tests
pygy Dec 24, 2016
84b4d07
Add a global option to j2c.inline
pygy Dec 24, 2016
7c660b3
Also emit the kind of at-rule
pygy Dec 25, 2016
eeff1f2
Get rid of the basic assertion wrappers
pygy Dec 25, 2016
021e7d8
Improve error reporting
pygy Dec 26, 2016
1f02cac
Stronger @adopt checks
pygy Dec 26, 2016
7cc20fe
Use the ospec runner
pygy Dec 27, 2016
5d381c2
[plugin-prefix-browser] Refactor the PrefixFree code, add flexbox sup…
pygy Dec 27, 2016
619cbcd
Update regexp.js to match the actual source
pygy Dec 31, 2016
0ffe250
Numerous fixes and refactors
pygy Jan 5, 2017
843cdbb
Add tests for the detection phase
pygy Jan 5, 2017
4f515ba
build
pygy Jan 5, 2017
bf7d1c7
Add license
pygy Jan 5, 2017
6f5b83d
More tests and fixes
pygy Jan 5, 2017
bd424a2
[plugin-prefix-browser] Test @media (resolution:...) prefix/polyfill
pygy Jan 5, 2017
54f0eb9
[prefix-browser] Fix the name of the rules fixer test suite
pygy Jan 6, 2017
dc53c2f
[prefix-plugin] Sort the flexbox tables and fill in some blanks
pygy Jan 6, 2017
2686689
[prefix-plugin] Add support for the ::placeholder selector
pygy Jan 6, 2017
47601b1
[prefix-plugin] Make it possible to specify fixers.fixProperty manually
pygy Jan 6, 2017
68f94d2
[prefix-plugin] Add flex-flow support, fix flex-direction for vertica…
pygy Jan 6, 2017
ca27ce3
[prefix-plugin] (comments) Improve the flexbox conversion table
pygy Jan 6, 2017
4511b4e
[plugin-prefix] Fix a bug in fixers.fixValue
pygy Jan 6, 2017
622275a
[prefix-plugin] consistent file naming
pygy Jan 6, 2017
0f90203
[prefix-plugin] Refactor selector handling
pygy Jan 7, 2017
12326a4
[prefix-plugin] Fix lint issue
pygy Jan 7, 2017
92f0635
[prefix-plugin] More flexbox fixes
pygy Jan 7, 2017
f245cea
Update the coverage scripts now use the ospec binary
pygy Jan 7, 2017
38044e5
[prefix-plugin] Improve coverage, build
pygy Jan 7, 2017
8e3a31b
[prefix-plugin] Clean up the fixers code
pygy Jan 7, 2017
9b4e71b
[prefix-plugin] More tests
pygy Jan 7, 2017
6e13553
[prefix-plugin] rearrange the value fixers so that they compound
pygy Jan 8, 2017
96b83e1
[prefix-plugin] The tests now use the same flexbox data structures as…
pygy Jan 8, 2017
eb41c7f
[prefix-plugin] 100% testing coverage, finalize the functions handling
pygy Jan 8, 2017
5679c73
[prefix-plugin] Improve state cleanup in the tests
pygy Jan 8, 2017
5216e65
[prefix-plugin] Add a test with a value that needs several fix passes
pygy Jan 8, 2017
a2416b8
[prefix-plugin] Only handle the arguments of unprefixed at-rules
pygy Jan 8, 2017
9a307d7
[prefix-plugin] Add @supports integration tests and a live test page
pygy Jan 8, 2017
4296512
[prefix-plugin] Use correct file name, improve flexbox support
pygy Jan 8, 2017
634f544
[prefix-plugin] Only use prefixed flexbox when unprefixed is unavailable
pygy Jan 8, 2017
129ebeb
[prefix-plugin] improve test page
pygy Jan 8, 2017
01e971a
[prefix-plugin] `dppx`, not `ddpx`
pygy Jan 9, 2017
8567cfb
[prefix-plugin] build
pygy Jan 10, 2017
f85aa4c
[prefix-plugin] Use distinct ospec instances
pygy Jan 10, 2017
57ae7a7
[prefix-plugin] simplify command forwarding
pygy Jan 10, 2017
f2dbb8e
[prefix-plugin] pre-cache 2009 flexbox properties
pygy Jan 10, 2017
af93de6
[prefix-plugin] Attempt at fixing issues with supportedDecl
pygy Jan 10, 2017
86db0ee
[prefix-plugin] Improve test page browser compat
pygy Jan 10, 2017
2339d79
Tidy up the README, fix license field in package.json
pygy Jan 10, 2017
b7879e4
[prefix-plugin] version 1.0
pygy Jan 10, 2017
c922884
[prefix-plugin] Handle non-string values
pygy Jan 11, 2017
a21e2c7
[prefix-plugin] add :fullscreen and ::backdrop support
pygy Jan 11, 2017
2ecc660
[prefix-plugin] -ms-flex-flow is actually suppported by ie10, despite…
pygy Jan 11, 2017
9979a5f
Beef up the README
pygy Jan 11, 2017
e64e290
[prefix-plugin] README: TOC diet, add license reference
pygy Jan 11, 2017
edc6ac8
[prefix-plugin] Put actual files paths in the package.json main/jsnex…
pygy Jan 11, 2017
2ca2bfd
[prefix-plugin] Put actual files paths in the package.json main/jsnex…
pygy Jan 11, 2017
eb3b3d9
[prefix-plugin] Improve the README
pygy Jan 11, 2017
9fc04ae
[prefix-plugin] Fix the lib entry point
pygy Jan 11, 2017
6952d76
[prefix-plugin] v1.0.2
pygy Jan 12, 2017
1ffe5b9
[prefix-plugin] Add a section to the TOC
pygy Jan 12, 2017
038bf3a
[prefix-browser] README tweaks
pygy Jan 12, 2017
e66a443
[prefix-browser] move a branch and a possibly costly function out of …
pygy Jan 12, 2017
a83e187
[prefix-plugin] test-mocks: add a special case to simulate old Opera
pygy Jan 12, 2017
23612e7
[prefix-plugin] v1.0.4
pygy Jan 12, 2017
e6782b3
[prefix-plugin] README use the latest version of the demo
pygy Jan 12, 2017
44b94fd
[prefix-plugin] v1.0.5
pygy Jan 12, 2017
ddb44ba
Improve error messages
pygy Jan 12, 2017
d750a18
[prefix-plugin] Flesh out the package.json
pygy Jan 13, 2017
60ac517
Localization should only apply to animation names
pygy Jan 13, 2017
fcb7699
1.0.0-4
pygy Jan 14, 2017
4ce8c61
Add a raw method to the backend and the possibility to have different…
pygy Jan 14, 2017
0233192
emit.raw respects _instance.endline
pygy Jan 15, 2017
d3dcb71
Augment emit.atrule() signature to specify the kind of block it takes
pygy Jan 15, 2017
86a59bf
Simplify plugin handling a bit, add a few sink tests
pygy Jan 15, 2017
cd0f5b6
Add source maps to the non-minified build artifacts
pygy Jan 15, 2017
442bfa8
[plugin-postcss] bring the PostCSS plugin to the current sink spec
pygy Jan 15, 2017
f574703
add the test-utils directory
pygy Jan 15, 2017
bc543a6
[prefix-postcss] make the test suite available to the global runner
pygy Jan 15, 2017
39aa6bd
Mandate a function wrapper for sink plugins
pygy Jan 15, 2017
33c3089
[plugin-postcss] tie up loose ends
pygy Jan 15, 2017
54a5e76
chore: Clean up travis-related files, hopefully we'll get a green mark
pygy Jan 16, 2017
6e95256
Add a build step to the install-plugins script
pygy Jan 16, 2017
d290ee6
scripts/install-plugins: returning an object from an ES6 lambda requi…
pygy Jan 17, 2017
57c8ea1
Simplify plugin and config loading. Get rid of the dollar signs
pygy Jan 17, 2017
5128845
Some more bikeshedding over the options and plugin loading
pygy Jan 18, 2017
253bbf4
[prefix-plugin] Update the demo code
pygy Jan 20, 2017
b9783cc
Add a tweak for raw values
pygy Jan 20, 2017
5700da1
Add some preliminary docs for plugin authors
pygy Jan 20, 2017
6e01ad9
Plugins docs tweaks
pygy Jan 20, 2017
f7eb24e
Revamped the plugin API some more, added namespaces (tests needed)
pygy Jan 20, 2017
5dfbe61
Change log tweaks
pygy Jan 20, 2017
98776ad
Polish namespaces, test them
pygy Jan 21, 2017
a037cfe
Make plugin.set values objects. Update the tests and plugins accordingly
pygy Jan 21, 2017
752d77a
Update the plugins docs
pygy Jan 21, 2017
b52190f
do not localize list-style
pygy Jan 22, 2017
666e0b7
Sanity check for empty selectors
pygy Jan 22, 2017
4e25089
add a module field in package.json
pygy Jan 22, 2017
b47acbb
[prefix-plugin] add user-select and appearance to the test page
pygy Jan 22, 2017
b2cf92c
[prefix-plugin] tweak README
pygy Jan 22, 2017
b65796e
Fix dppx detection in Edge. Addresses one half of #32
pygy Jan 23, 2017
40ea1e7
[prefix-plugin] remove the parts extracted verbatim from PrefixFree
pygy Jan 23, 2017
0b880e5
[prefix-plugin] rename detectors/util.js => .../core.js
pygy Jan 23, 2017
7a90017
[prefix-plugin] add tests for a corner case where ::placeholder exist…
pygy Jan 23, 2017
c708018
[prefix-plugin] don't prefix ::placeholder when it is also supported …
pygy Jan 23, 2017
87ea36f
[prefix-plugin] Avoid branches in most cases
pygy Jan 24, 2017
b5fa650
[prefix-plugin] remove redundancy in the selctor detection code
pygy Jan 25, 2017
50f3522
[postcss-plugin] Update the usage docs
pygy Jan 25, 2017
a690e9a
Typo
pygy Jan 25, 2017
dab6084
Tweak error message
pygy Jan 25, 2017
080524e
[prefix-plugin] Improve the @supports params regexp
pygy Jan 26, 2017
705a97c
Update the exported name to J2c in the global build
pygy Jan 28, 2017
8e3e1d3
The at-rules prelude can contain new lines
pygy Jan 28, 2017
8da1a93
[prefix-plugin] The test page is now reactive
pygy Jan 28, 2017
8d5052c
Remove the source maps from the builds for now
pygy Jan 28, 2017
721a485
[prefix-plugin] test/index.html make the CSS display inert
pygy Jan 28, 2017
f9993ab
[prefix-plugin] test/index.html typo
pygy Jan 28, 2017
617c315
[prefix-plugin] demo: fix a layout bug
pygy Jan 29, 2017
803fede
[prefix-plugin] demo: move the styles at the top of the source
pygy Jan 29, 2017
0f4b53a
[prefix-plugin] Fix ie9 layout bug
pygy Jan 29, 2017
ae7e2b1
[prefix-plugin] demo: fix selection in Firefox, tweaks
pygy Jan 29, 2017
17b035b
[prefix-browser] demo: some more styles
pygy Jan 29, 2017
33e6ff6
[prefix-plugin] RegExp typo
pygy Jan 29, 2017
64b7d63
[prefix-plugin] Update README with the new live demo
pygy Jan 29, 2017
5eaf5fd
chore: bump ospec version
pygy Feb 1, 2017
dfba456
Inline syntax changes
pygy Feb 1, 2017
732f4f1
[prefix-plugin] build
pygy Feb 17, 2017
adef992
Simplify the `at()` extra
pygy Apr 13, 2017
1315412
[prefix-plugin] Preliminary support for multiple prefixes
pygy May 20, 2017
ea86780
[prefix-plugin] map 'flex-grow' to '-x-box-flex'
pygy May 20, 2017
6eb0e3d
[prefix-plugin] Support both -ms- and -webkit- prefixes for Edge (key…
pygy May 21, 2017
d2d4092
Add properties that need to be supported with webkit prefix no matter…
pygy May 21, 2017
882cec9
Hopefully fix the Travis run
pygy May 21, 2017
fda65ed
[prefix-plugin] Actually prefix background-clip:text
pygy May 21, 2017
408a85f
[prefix-plugin] Update the demo page for the latest features
pygy May 21, 2017
e3142d6
Simplify the handling of @page blocks
pygy May 24, 2017
2c6f938
Replace Regexp test with charAt() to detect at-rules
pygy May 24, 2017
c792349
Revamp at-rules handling/plugins to make it more generic)
pygy May 24, 2017
3039875
some more optimizations and refactorings
pygy May 25, 2017
85050ba
Move the declaration filter to the fixers file, have @support params …
pygy Oct 8, 2017
3e68cd5
Enable support for JS flexbox polyfills for IE9-
pygy Oct 8, 2017
3d124b0
Add anonymous keyframes
pygy Oct 20, 2017
e7772ef
Fix the random identifier for anonymous keyframes blocks, add a test
pygy Oct 22, 2017
b6869bf
Move the CSS modules-related tests from the old to the new suite, add…
pygy Oct 22, 2017
5c3b7cf
Add support for localizing fallback animation names when using variables
pygy Oct 22, 2017
dd4706d
Preserve step() keyword arguments when localizing animations
pygy Oct 22, 2017
c3d3832
Simplify the ns/prefix business, get rid of suffixes
pygy Oct 22, 2017
59a0097
[prefix-plugin] preliminary flexbox improvements
pygy Nov 6, 2017
786f768
[prefix-browser]: support for :matches => :-x-any conversion
pygy Dec 7, 2017
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
10 changes: 9 additions & 1 deletion .bithoundrc
Original file line number Diff line number Diff line change
@@ -1,6 +1,14 @@
{
"ignore": [
"dist/*.js",
"example/*.js"
"example/*.js",
"plugins/postcss/dist/*.js",
"plugins/postcss/node_modules/**/*.js",
"plugins/prefix-browser/dist/*.js",
"plugins/prefix-browser/node_modules/**/*.js",
"plugins/prefix-browser/src/extracted/*.js",
"plugins/prefix-browser/upstream/**/*.js",
"plugins/prefix-iso/**/*.js",
"plugins/prefix-server/**/*.js"
]
}
14 changes: 14 additions & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
coverage
dist
example
gh_pages
modules
plugins/postcss/dist
plugins/postcss/node_modules
plugins/prefix-browser/dist
plugins/prefix-browser/node_modules
plugins/prefix-browser/src/extracted
plugins/prefix-browser/test-utils/exposed.js
plugins/prefix-browser/upstream
plugins/prefix-iso
plugins/prefix-server
12 changes: 7 additions & 5 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -1,22 +1,24 @@
module.exports = {
rules: {
indent: [
2, 2
"error", 2
],
quotes: [
2,
"error",
"single",
"avoid-escape"
],
"linebreak-style": [
2,
"error",
"unix"
],
semi: [
2,
"error",
"never"
],
"no-trailing-spaces": [2]
"no-trailing-spaces": "error",
"comma-dangle": "error",
"no-native-reassign": "error"
},
parserOptions: {
ecmaVersion: 6,
Expand Down
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
node_modules
gh_pages
coverage
7 changes: 3 additions & 4 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
language: node_js
node_js:
- '0.10'
- '0.11'
- '5.0'
script: npm run cover
- node
cache: yarn
script: "yarn install-plugins && yarn run travis"
62 changes: 62 additions & 0 deletions DEVELOPMENT.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
# `j2c` development

If you want to install `j2c` to work on it, first fork the repo and clone the fork locally

```BASH
$ git clone https://github.com/yourAccount/j2c
```

Then add `j2css/j2c` as a remote for pulling, then create your work branch. My advice is to never work on the master branch directly as it will make it easier to pull remote changes and handle merge conflicts (unless you know your way around git, then do whatever you like).

```BASH
$ cd j2c
$ git remote add j2css https://github.com/j2css/j2c.git
$ git checkout -b your-work-branch-here
```

Now install the dependencies and the plugin dependencies ([yarn](https://yarnpkg.com/) is recommended but you can use NPM as well):

```BASH
$ yarn # resp. npm install
$ yarn run install-plugins # resp. npm run install-plugins
```

Now run the full QA suite to verify that everything works fine.

```BASH
$ yarn run all # runs `lint`, `build`, `cover` (which runs the tests) and `check-coverage`
```

While developing, you'll probably want to use `yarn run dev` instead of `all`. It only runs the `build` and `test` tasks.

While `yarn run build` will only build the core, the `test`, `lint` and `cover` tasks work on the whole project, plugins included. This ensures that changes in the core do not break plugins.

## working on a plugin.

The plugins are set up in distinct folders with their own `package.json` and dedicated `build` and `dev` scripts, and they rely on the main tasks to run the tests, linting and coverage.

When working in a plugin directory the `yarn run go x` command (or `yarn go x`) will be forwarded to the scripts at the `j2c` root (it literally calls `cd ../.. && yarn run x`).

The test suites of the plugins depend on the `j2c` version at the root of the directory, not on the `npm` dependency.

## rebasing on top of upstream changes

If you want to submit a PR but other changes that were committed in the mean time, you can rebase your changes on top of them.

```BASH
$ git checkout master # resp. your target branch
$ git pull --rebase j2css # the --rebase option gets rids of ugly merge commits
$ git checkout your-work-branch-here
$ git rebase master
```

If there are conflicts:

1. resolve potential conflicts in your text editor (identify the problem files using `git diff` or `git status`)
2. then run

```BASH
$ git add previously-conflictual-file
$ git rebase continue
```
rinse and repeat until there are no conflicts anymore.
109 changes: 95 additions & 14 deletions HISTORY.md
Original file line number Diff line number Diff line change
@@ -1,21 +1,97 @@
# Change log

## v0.11.1 (2016-03-8) and v0.11.2

- Patch bump to fix what `npm` installs by default (I erronously published `v1.0.0-x` on without `--tag next`, twice) Note to self, don't publish in the
wee hours.
## v1.0.0 (WIP)

### Breaking changes
- The exported object is a factory, users have to create instances
manually as `var j2c = new J2c(options)`.
- Local scope is now per instance rather than per sheet.
- `j2c.sheet()` and `j2c.inline()` return plain strings rather than
`String` objects.
- `j2c.names` holds the local -> global mappings for use in the (v)DOM.
- syntax changes for properties and nested sub-properties.
tl;dr: `{foo_bat: {baz: 5}}` must now be written `{fooBar: {Baz: 5}}`
- underscores are not converted to dashes anymore (use CamelCase)
- sub-properties must start with an upper case letter
- the `*` hack is supported for old IE.
- Removed the partial auto-prefix insertion from the core. There's now a
fully fledged prefix plugin for the browser, and Autoprefixer can be
used on the server by using the PostCSS adapter.
- Revamped the plugin system.
- Removed `$postprocess` plugins that were taking and returning the full
buffer.
- Introduced `filter` system that can patch values on the fly on their
way between the compiler and the buffer.
- Introduced `sink` plugin that allow to subvert the sheet building
process to implement systems like Radium or Descartes.
- Introduced `at` filters that can handle at-rules beside the ones that
j2c supports out of the box.
- Revamped the poorly named `@extend` into `@adopt`, based on @tivac's
Modular CSS `composes`. The semantics are too distant from either `@extend`
or `composes` to use their name witout introducing potential confusion,
hence the new name.

So: `j2c.sheet({'@adopt .foo': ['.bar']})` where foo is a local class that
adopts the behavior of the global `.bar`.

### Additions
- Added a namespace mechanism to scope the styles per component wihtout having to
use BEM-like classes or having to create a distinct `j2c` instance for each
component.
- Prefixed at-rules are treated like their unprefixed counterparts.
- Added `@local` as a counterpart to `@global`.
- Consecutive, identical selectors are deduped in the output. Using mixins
won't cause duplicate selectors anymore.

### Fixes
- `& > &` with a selector list as parent will perform their cartesian product
like SASS and LESS do.
- Robust parsing of selectors. Comas, ampersands and class-like parts
in strings are now ignored by the compiler.

```JS
j2c.sheet({'p':{'[foo="&,.bar"]': {color: 'red'}}})
```

produces

```CSS
p[foo="&,.bar"] {color:red}
```

Whereas previous versions would produce

```CSS
[foo="p,p.bar_j2c_ubv4pc_knzcqw_ngjme7_1usit1c_9"] {color: red;}
```

Likewise, `':not(p, a, ul, li)'` (a CSS4 addition) will not be split.

### Size

2.4Kb mingzipped (+ ~700 bytes).

## v0.11.1 (2016-03-8) and v0.11.2 (2016-03-17)

- Patch bump to fix what `npm` installs by default (I erronously published `
v1.0.0-x` on without `--tag next`, twice) Note to self, don't publish in
the wee hours.

## v0.11.0

- Refactor the innards so that the source order is completely respected in the output, including conditional at-rules.
- Refactor the innards so that the source order is completely respected in
the output, including conditional at-rules.
- Speed ++
- Autoprefix all animation-* and transition.
- Some error messages are now inserted in the result as -error-prefixed at-rules and :pseudo-classes.
- Some error messages are now inserted in the result as -error-prefixed
at-rules and :pseudo-classes.

## v0.10.0

- At long last allow element selectors without a prepended space at the top level
- Autoprefix animation and animation-name with -webkit- too like we do for `@keyframes`.
- At long last allow element selectors without a prepended space at the top
level
- Autoprefix animation and animation-name with -webkit- too like we do for
`@keyframes`.
- Tweaks and cleanup

## v0.9.0
Expand All @@ -40,21 +116,26 @@ wee hours.

## v0.8.0

- classes and animations/@keyframes names are now localized by default in `j2c.sheet()`.
- classes and animations/@keyframes names are now localized by default in
`j2c.sheet()`.
- introduced `@global{}` and `:global()` to reach global names
- dropped `j2c.scoped()` which is obsoleted by the above.
- dropped bulk auto-prefixing.
- better at-rules handling.
- support for autoDeCamelization of property-names.
- New signature for `j2c.sheet([namespace1, namespace2, ] source)` where `namespace` is an object
with plain -> localized names for classes and animations.
- allow to create custom j2c instances that can be extended with plugins *[needs docs]*.
- New signature for `j2c.sheet([namespace1, namespace2, ] source)` where
`namespace` is an object with plain -> localized names for classes and
animations.
- allow to create custom j2c instances that can be extended with plugins
*[needs docs]*.
- Hardened the test suite.
- Bug fix: the source order is now respected in the output, with the caveat that, for nested selector, the children appear in source before the parent.
- Bug fix: the source order is now respected in the output, with the caveat
that, for nested selector, the children appear in source before the parent.

## v0.7.3

- Identical to `v0.7.2`. Somehow a bad commit ended up on NPM for that version.
- Identical to `v0.7.2`. Somehow a bad commit ended up on NPM for that
version.

## v0.7.2

Expand Down
Loading